516 Star 7.4K Fork 2.1K

lyt-Top / vue-next-admin

 / 详情

main.ts中,`.use(ElementPlus, { i18n: i18n.global.t })`爆红,不影响是使用,用的是 "typescript": "^4.9.5",网上查好像要配置`vue-i18n/types`什么的.

已完成
创建于  
2023-03-07 14:57

main.ts中,.use(ElementPlus, { i18n: i18n.global.t })爆红,不影响是使用,用的是 "typescript": "^4.9.5",网上查好像要配置vue-i18n/types什么的.

No overload matches this call.
  Overload 1 of 2, '(plugin: Plugin_2<[options?: Partial<ConfigProviderProps> | undefined]>, options?: Partial<ConfigProviderProps> | undefined): App<...>', gave the following error.
    Argument of type '{ i18n: ComposerTranslation<{}, string, RemoveIndexSignature<{ [x: string]: LocaleMessageValue<VueMessageType>; }>, never, never, never>; }' is not assignable to parameter of type 'Partial<ConfigProviderProps>'.
      Object literal may only specify known properties, and 'i18n' does not exist in type 'Partial<ConfigProviderProps>'.
  Overload 2 of 2, '(plugin: Plugin_2<[options?: Partial<ConfigProviderProps> | undefined]>, options: [options?: Partial<ConfigProviderProps> | undefined]): App<...>', gave the following error.
    Argument of type '{ i18n: ComposerTranslation<{}, string, RemoveIndexSignature<{ [x: string]: LocaleMessageValue<VueMessageType>; }>, never, never, never>; }' is not assignable to parameter of type '[options?: Partial<ConfigProviderProps> | undefined]'.
      Object literal may only specify known properties, and 'i18n' does not exist in type '[options?: Partial<ConfigProviderProps> | undefined]'.ts(2769)

评论 (2)

xiaosongzhuo 创建了任务

app.use(pinia).use(router).use(ElementPlus, { i18n: i18n.global.t }).use(i18n).use(VueGridLayout).mount('#app');

其实我不太明白为什么要use(ElementPlus, { i18n: i18n.global.t }),我直接改成下面的也好想也可以run,求解 .^_^,

app.use(pinia).use(router).use(ElementPlus).use(i18n).use(VueGridLayout).mount('#app');

那是以前版本的,ele改了,#I6JRH6:main.ts

lyt-Top 任务状态待办的 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
7783837 lyt top 1625394353
TypeScript
1
https://gitee.com/lyt-top/vue-next-admin.git
git@gitee.com:lyt-top/vue-next-admin.git
lyt-top
vue-next-admin
vue-next-admin

搜索帮助