vue-apps/com.actionsoft.apps.kms.mobile/main.js

36 lines
795 B
JavaScript
Raw Normal View History

2025-07-07 13:55:22 +08:00
// 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 Vant from 'vant'
import 'vant/lib/index.css'
import axios from 'axios'
import router from './router'
import store from './store'
Vue.use(Vant)
router.beforeEach((to, from, next) => { //修改title方法
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
// 设置浏览器标题
Vue.directive('title', {
inserted: function (el, binding) {
document.title = el.dataset.title
}
})
Vue.prototype.$ajax = axios
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
store,
render: h => {
return h(App);
},
}).$mount('#app')