forked from useryangtao/vue-wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
42 lines (29 loc) · 779 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import Vue from 'vue'
import Vuex from 'vuex'
import VueRouter from 'vue-router'
import { sync } from 'vuex-router-sync'
import VueTouch from 'vue-touch'
import VueAnimatedList from 'vue-animated-list'
import zepto from 'webpack-zepto'
import fastclick from 'fastclick'
import store from 'store'
import routerMap from './route-config.js'
import filters from './filters'
Vue.config.devtools = true;
Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(VueTouch)
Vue.use(VueAnimatedList)
const router = new VueRouter({
hashbang:true,
saveScrollPosition: true
})
routerMap(router)
sync(store, router)
filters(Vue)
fastclick.attach(document.body)
const App = Vue.extend(require('./app.vue'))
router.start(App, 'body')
window.router = router
window.Vue = Vue
window.$ = zepto