// Here are the variables to cover, such as:
@primary-color: #8c0776;
完整的变量列表可以查看 默认样式变量。
然后在入口文件 main.js 内导入这个 less 文件即可:
import Vue from 'vue';
import iView from 'iview';
import '../my-theme/index.less';
Vue.use(iView);
按iview要求引入自定义样式,npm run dev 报错 ,在vue-cli下测试没有问题.
报错内容:
ERROR in ./~/_css-hot-loader@1.3.4@css-hot-loader!./~/_autoprefixer-loader@2.1.0@autoprefixer-loader!./~/_less-loader@2.2.3@less-loader!./src/my-theme/index.less
Module parse failed: E:\study\iview-admin-template\node_modules_css-hot-loader@1.3.4@css-hot-loader\index.js!E:\study\iview-admin-template\node_modules_autoprefixer-loader@2.1.0@autoprefixer-loader\index.js!E:\study\iview-admin-template\node_modules_less-loader@2.2.3@less-loader\index.js!E:\study\iview-admin-template\src\my-theme\index.less Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| .ivu-load-loop {
| -webkit-animation: ani-load-loop 1s linear infinite;
| animation: ani-load-loop 1s linear infinite;
按iview要求引入自定义样式,npm run dev 报错 ,在vue-cli下测试没有问题. 报错内容: