npm i --save-dev @types/swiper
(如果存在),或者添加一个包含 declare module 'swiper';
的新声明(.d.ts)文件ts(7016)defineComponent()
internally to support intellisense on IDE for backward compatible, but this is an hacking which lead to this component type inconsistent with same script code on .js / .ts. Recommended wrap component options by Vue.extends()
or defineComponent()
. Or you can configure "experimentalShamefullySupportOptionsApi": true / false
in "vueCompilerOptions"
property in tsconfig / jsconfig to disable this warning.volarnode_modules模块下,没这个包,可能安装不成功
可以尝试将Vue Language Features (Volar)禁用掉,重启vscode,再启用volar(确保是最新版),或者更换Vetur插件