37 lines
840 B
JavaScript
37 lines
840 B
JavaScript
|
// 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 VueRouter from 'vue-router'
|
||
|
import routes from './route'
|
||
|
import App from './App'
|
||
|
import FastClick from 'fastclick'
|
||
|
import '../components/_style/global.styl'
|
||
|
import './theme.custom.styl'
|
||
|
|
||
|
if ('ontouchstart' in window) {
|
||
|
FastClick.attach(document.body)
|
||
|
}
|
||
|
|
||
|
Vue.config.productionTip = false
|
||
|
|
||
|
Vue.use(VueRouter)
|
||
|
|
||
|
const isProd = process.env.NODE_ENV === 'production'
|
||
|
|
||
|
const router = new VueRouter({
|
||
|
mode: 'history',
|
||
|
base: isProd ? '/mand-mobile/examples' : '',
|
||
|
routes,
|
||
|
})
|
||
|
|
||
|
router.afterEach(route => {
|
||
|
document.title = route.name ? `${route.name}-Mand Mobile` : 'Mand Mobile'
|
||
|
})
|
||
|
|
||
|
/* eslint-disable no-new */
|
||
|
new Vue({
|
||
|
el: '#app',
|
||
|
render: h => h(App),
|
||
|
router,
|
||
|
})
|