We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDE:VS Code Vue + TypeScript
现象:引入vue-lazyload,虽然已经在本地安装,但是typescript还是提示找不到模块。原因是typescript是从node_modules/@types目录下去找模块声明,有些库并没有提供typescript的声明文件,所以就需要自己去添加。
vue-lazyload
解决方法: 在src目录下新建types-shims/tools.d.ts文件,增加如下代码:
src
types-shims/tools.d.ts
declare module 'qs' { const qs: any; export default qs; } declare module 'vue-awesome-swiper' { export const swiper: any export const swiperSlide: any } declare module 'vue-lazyload'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
IDE:VS Code
Vue + TypeScript
现象:引入
vue-lazyload
,虽然已经在本地安装,但是typescript还是提示找不到模块。原因是typescript是从node_modules/@types目录下去找模块声明,有些库并没有提供typescript的声明文件,所以就需要自己去添加。解决方法:
在
src
目录下新建types-shims/tools.d.ts
文件,增加如下代码:The text was updated successfully, but these errors were encountered: