标签:view lint use config col save 统一 ons mod
(1)在git bash中安装iview,即:
npm install iview --save
(2)在main.js中引用并注册iView,即:
import iView from ‘iview‘ import ‘iview/dist/styles/iview.css‘ Vue.use(iView)
(3)为了统一IView标签的书写规范,通过安装iView Loader,即:
npm install iview-loader --save
然后修改webpack选项,如下:
1 rules: [ 2 ...(config.dev.useEslint ? [createLintingRule()] : []), 3 { 4 test: /\.vue$/, 5 use: [ 6 { 7 loader: ‘vue-loader‘, 8 options: vueLoaderConfig 9 }, 10 { 11 loader: ‘iview-loader‘, 12 options: { 13 prefix: false 14 } 15 } 16 ] 17 18 }, 19 { 20 test: /\.js$/, 21 loader: ‘babel-loader‘, 22 include: [resolve(‘src‘), resolve(‘test‘), resolve(‘node_modules/webpack-dev-server/client‘)] 23 }
标签:view lint use config col save 统一 ons mod
原文地址:https://www.cnblogs.com/lanyb009/p/9238111.html