ソースを参照

fix: i18n $t 报错

菲鸽 2 年 前
コミット
9bb7e726ad
1 ファイル変更9 行追加0 行削除
  1. 9 0
      src/i18n.d.ts

+ 9 - 0
src/i18n.d.ts

@@ -0,0 +1,9 @@
+/* eslint-disable no-unused-vars */
+export {}
+
+declare module 'vue' {
+  interface ComponentCustomProperties {
+    $t: (key: string) => string
+    $tm: (key: string) => [] | { [p: string]: any }
+  }
+}