summaryrefslogtreecommitdiff
path: root/frontend/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/main.js')
-rw-r--r--frontend/src/main.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/frontend/src/main.js b/frontend/src/main.js
new file mode 100644
index 0000000..308f444
--- /dev/null
+++ b/frontend/src/main.js
@@ -0,0 +1,26 @@
+// 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 App from './App'
+import router from './router'
+// import ElementUI from 'element-ui';
+// import 'bootstrap/dist/css/bootstrap.min.css'
+// import 'bootstrap/dist/js/bootstrap.min'
+
+// 设置反向代理,前端请求默认发送到 http://192.168.10.136:8443
+var axios = require('axios')
+axios.defaults.baseURL = 'http://192.168.10.136:8443'
+// 全局注册,之后可在其他组件中通过 this.$axios 发送数据
+Vue.prototype.$axios = axios
+
+// Vue.use(ElementUI);
+
+Vue.config.productionTip = false
+
+/* eslint-disable no-new */
+new Vue({
+ el: '#app',
+ router,
+ components: { App },
+ template: '<App/>'
+})