瀏覽代碼

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 }
+  }
+}