vue typescript 引入vue-meta报错?

在main.ts中引入:

import VueMeta from 'vue-meta';
Vue.use(VueMeta, {
  refreshOnceOnNavigation: true
})

报错:

 Types of property 'metaInfo' are incompatible.
          Type '{ title: string; titleTemplate: string; htmlAttrs: { lang: string; amp: boolean; }; meta: ({ charset: string; name?: undefined; content?: undefined; } | { name: string; content: string; charset?: undefined; })[]; }' is not assignable to type 'MetaInfo | MetaInfoComputed | undefined'.
            Type '{ title: string; titleTemplate: string; htmlAttrs: { lang: string; amp: boolean; }; meta: ({ charset: string; name?: undefined; content?: undefined; } | { name: string; content: string; charset?: undefined; })[]; }' is not assignable to type 'MetaInfo'.

请问,应该怎么解决呢?

阅读 1.7k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
Microsoft
子站问答
访问
宣传栏