[+] Import vue-echarts
This commit is contained in:
+21
-10
@@ -1,18 +1,29 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import ElementUI from 'element-ui';
|
|
||||||
|
|
||||||
import App from './components/app/app.vue';
|
import App from './components/app/app.vue';
|
||||||
import VueCookies from 'vue-cookies';
|
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
// Import Element UI
|
||||||
|
import ElementUI from 'element-ui';
|
||||||
// Use Element UI
|
|
||||||
Vue.use(ElementUI, {locale: 'en-us'});
|
Vue.use(ElementUI, {locale: 'en-us'});
|
||||||
|
|
||||||
// Use Cookies
|
// Import Cookies
|
||||||
|
import VueCookies from 'vue-cookies';
|
||||||
Vue.use(VueCookies);
|
Vue.use(VueCookies);
|
||||||
|
|
||||||
|
// Import ECharts
|
||||||
|
// 在 webpack 环境下指向 components/ECharts.vue
|
||||||
|
const ECharts = require('vue-echarts');
|
||||||
|
Vue.component('v-chart', ECharts);
|
||||||
|
|
||||||
|
// 手动引入 ECharts 各模块来减小打包体积
|
||||||
|
import 'echarts/lib/chart/bar'
|
||||||
|
import 'echarts/lib/component/tooltip'
|
||||||
|
|
||||||
|
// Config
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
// Init app
|
// Init app
|
||||||
new Vue({
|
new Vue(
|
||||||
render: (h) => h(App),
|
{
|
||||||
}).$mount('#app');
|
render: (h) => h(App),
|
||||||
|
})
|
||||||
|
.$mount('#app');
|
||||||
|
|||||||
Reference in New Issue
Block a user