搭建iview环境

时间:2023-03-10 02:24:30
搭建iview环境

一、最快捷方式安装:

$ npm install iview --save

二、一般在 webpack 入口页面 main.js 中如下配置:

import Vue from 'vue';
import VueRouter from 'vue-router';
import App from 'components/app.vue';
import Routers from './router.js';
import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(VueRouter);
Vue.use(iView); // The routing configuration
const RouterConfig = {
routes: Routers
};
const router = new VueRouter(RouterConfig); new Vue({
el: '#app',
router: router,
render: h => h(App)
});

如上所述,即可,若有问题,请加群:659182980

搭建iview环境搭建iview环境