You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://www.npmjs.com/package/@types/layui
layui 类型声明文件,为 layui 提供编辑器中的代码补全和智能提示,增强开发效率。
使用
构建工具场景
安装
@types/layui依赖非构建工具场景
Jetbrains 系 IDE: 配置自定义第三方 JavaScript 库
@types/layui下载到本地任意目录设置 > 语言和框架 > JavaScript > 库添加按钮(也可以点击下载按钮直接在 IDE 中下载)附加目录选择本地目录的@types/layui确定按钮Visual Studio Code: 使用 JavaScript
@types/layui下载到本地任意目录@types/layui文件复制到 types 文件夹jsconfig.json{ "compilerOptions": { "checkJs": true } }VS Code 不支持 HTML 内联 Script 标签中的第三方库自动补全和提示,参考 https://github.com/microsoft/vscode/issues/26338, 可以安装 html-by-volar-0.0.5-d20be50.vsix.zip 解决。
致谢
感谢 @javabitar,
@types/layui基于 @types/layui-src 制作。因为 npm 包名的不可变性以及 DefinitelyTyped 仓库的更新规则,我们只能创建新的包来更新 layui 类型定义。Beta Was this translation helpful? Give feedback.
All reactions