| 
									
										
										
										
											2018-03-26 16:04:04 +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 VueRouter from 'vue-router' | 
					
						
							|  |  |  | import routes from './route' | 
					
						
							|  |  |  | import App from './App' | 
					
						
							| 
									
										
										
										
											2018-12-13 17:07:42 +08:00
										 |  |  | import FastClickDefault, {FastClick} from 'fastclick' | 
					
						
							| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  | import '../components/_style/global.styl' | 
					
						
							|  |  |  | import './theme.custom.styl' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-13 17:07:42 +08:00
										 |  |  | const _attach = FastClickDefault.attach || FastClick.attach | 
					
						
							| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  | if ('ontouchstart' in window) { | 
					
						
							| 
									
										
										
										
											2018-12-13 17:07:42 +08:00
										 |  |  |   _attach(document.body) | 
					
						
							| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Vue.config.productionTip = false | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Vue.use(VueRouter) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const isProd = process.env.NODE_ENV === 'production' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const router = new VueRouter({ | 
					
						
							| 
									
										
										
										
											2018-03-28 13:55:43 +08:00
										 |  |  |   mode: 'hash', | 
					
						
							| 
									
										
										
										
											2018-03-26 16:04:04 +08:00
										 |  |  |   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, | 
					
						
							|  |  |  | }) |