JavaScript/vue.js/error:修订间差异
来自康健生活
| 第39行: | 第39行: | ||
* [Vue warn]: Invalid prop: type check failed for prop "index". Expected String, got Number. | * [Vue warn]: Invalid prop: type check failed for prop "index". Expected String, got Number. | ||
*: 使用强制类型转换技巧 <code><el-submenu :index="item.id+''"></code> 转换数据类型 | *: 使用强制类型转换技巧 <code><el-submenu :index="item.id+''"></code> 转换数据类型 | ||
* css 样式抽取极其不稳定,只显示 <code>/*# sourceMappingURL=index_page_script.css.map*/</code>。现在遇到的问题是 MiniCssExtractPlugin.loader 可以提取 css 文件打包使用 link 标签插入,或者 vue-style-loader 抽离 vue 文件中的 css 用 style 标签插入 | * css 样式抽取极其不稳定,只显示 <code>/*# sourceMappingURL=index_page_script.css.map*/</code>。现在遇到的问题是 MiniCssExtractPlugin.loader 可以提取 css 文件打包使用 link 标签插入,或者 vue-style-loader 抽离 vue 文件中的 css 用 style 标签插入<br> | ||
其中 FixStyleOnlyEntriesPlugin 组件一定要与 MiniCssExtractPlugin 同步使用,不然会把 css 的 js 文件删除,导致 css 文件无法插入文本。 | |||
* elementui 更改样式无效,修改 css 标签,去掉 scoped | * elementui 更改样式无效,修改 css 标签,去掉 scoped | ||
*: <syntaxhighlight lang="html"> | *: <syntaxhighlight lang="html"> | ||
<style lang="scss" rel="stylesheet/scss" scoped></syntaxhighlight> | <style lang="scss" rel="stylesheet/scss" scoped></syntaxhighlight> | ||