关键词 nuxt ; iview ; 覆盖 css ; 遇到的问题
在 nuxt 引入 iview
- 在项目plugins 中 新建 my-theme 文件夹
- index.less 中写入
@import '~iview/src/styles/index.less';
// 主题色
@primary-color:#63d7a3;
// 链接颜色
@link-color:#63d7a3;
// 主题文字颜色
.custom-primary-text-color {
color: @primary-color;
}
- 在iview 中引入
遇到的问题
- 路径一定要写对,是 src/ 中的,千万记住
- 遇到不识别路径的
@import 'iview/src/styles/index.less';
^
Can’t resolve ‘./