tiptap/examples/main.js

42 lines
896 B
JavaScript
Raw Normal View History

2018-08-22 15:14:49 +08:00
import '@babel/polyfill'
2018-08-21 05:02:21 +08:00
import Vue from 'vue'
2018-08-22 19:30:53 +08:00
import VueRouter from 'vue-router'
2018-08-21 05:02:21 +08:00
import svgSpriteLoader from 'helpers/svg-sprite-loader'
2018-08-22 20:10:44 +08:00
import App from 'Components/App'
import RouteDefault from 'Components/Routes/Default'
2018-08-22 21:30:26 +08:00
import RouteBubbleMenu from 'Components/Routes/BubbleMenu'
2018-08-22 20:10:44 +08:00
import RouteLinks from 'Components/Routes/Links'
2018-08-21 05:02:21 +08:00
const __svg__ = { path: './assets/images/icons/*.svg', name: 'assets/images/[hash].sprite.svg' }
svgSpriteLoader(__svg__.filename)
Vue.config.productionTip = false
2018-08-22 19:30:53 +08:00
Vue.use(VueRouter)
const routes = [
{
path: '/',
2018-08-22 20:10:44 +08:00
component: RouteDefault,
},
{
2018-08-22 21:30:26 +08:00
path: '/bubble-menu',
component: RouteBubbleMenu,
2018-08-22 20:10:44 +08:00
},
{
path: '/links',
component: RouteLinks,
2018-08-22 19:30:53 +08:00
},
]
const router = new VueRouter({
routes,
2018-08-22 20:10:44 +08:00
linkActiveClass: 'is-active',
linkExactActiveClass: 'is-exact-active',
2018-08-22 19:30:53 +08:00
})
2018-08-21 05:02:21 +08:00
new Vue({
2018-08-22 19:30:53 +08:00
router,
2018-08-21 05:02:21 +08:00
render: h => h(App),
}).$mount('#app')