1234567891011121314151617181920212223242526272829303132 |
- // The Vue build version to load with the `import` command
- // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
- import Vue from 'vue'
- import ElementUI from 'element-ui'
- import 'element-ui/lib/theme-chalk/index.css'
- import App from './App'
- import router from './router'
- import './assets/css/bass.css'
- import './assets/css/common.css'
- import './assets/iconfont/iconfont.css'
- import axios from 'axios'//1.
- import Apiconfig from './apiconfig/api-config.js'
- import qs from 'qs'
- Vue.config.productionTip = false
- Vue.use(ElementUI);
- Vue.prototype.urlApi = Apiconfig;
- Vue.prototype.$axios = axios;//2.通过一二两个步骤可以在全局使用axios工具
- Vue.prototype.$qs = qs;
- /* eslint-disable no-new */
- new Vue({
- el: '#app',
- router,
- components: { App },
- template: '<App/>'
- })
- /*通过注入路由器,我们可以在任何组件内
- 通过 this.$router 访问路由器,也可以
- 通过 this.$route 访问当前路由:*/
|