You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

4 years ago
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementUI from 'element-ui'
import './assets/element-variables.scss'
import api from './utils/api';
import {
post,
get,
del,
put
} from './utils/http';
import VueCodeMirror from "vue-codemirror";
import "codemirror/lib/codemirror.css";
import vuescroll from "vuescroll"; //引入vuescroll
import "vuescroll/dist/vuescroll.css"; //引入vuescroll样式
import VueDraggableResizable from 'vue-draggable-resizable'
import config from '@/config'
// optionally import default styles
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
Vue.component('vue-draggable-resizable', VueDraggableResizable)
Vue.use(ElementUI);
Vue.use(vuescroll); //使用
Vue.use(VueCodeMirror);
Vue.prototype.api = api;
Vue.prototype.$get = get;
Vue.prototype.$post = post;
Vue.prototype.$del = del;
Vue.prototype.$put = put;
Vue.prototype.$config = config
Vue.config.productionTip = false;
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
new Vue({
router,
store,
render: h => h(App)
}).$mount("#app");