ant-design-vue/examples/index.js

28 lines
693 B
JavaScript
Raw Normal View History

2017-11-03 10:46:18 +00:00
import 'antd/style.js'
2017-10-26 07:18:08 +00:00
import './index.less'
2018-01-23 10:55:39 +00:00
import 'highlight.js/styles/solarized-light.css'
2017-11-03 04:04:39 +00:00
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './routes'
2018-01-24 07:39:21 +00:00
import Md from './components/md'
import Api from './components/api'
2018-01-23 10:55:39 +00:00
import * as Components from '../components/index'
import demoBox from './components/demoBox'
2017-11-03 04:04:39 +00:00
Vue.use(VueRouter)
2017-12-15 04:12:34 +00:00
Vue.component(Md.name, Md)
2018-01-24 07:39:21 +00:00
Vue.component(Api.name, Api)
2018-01-23 10:55:39 +00:00
Vue.component('demo-box', demoBox)
Object.keys(Components).forEach(k => {
const name = `a${k.replace(/([A-Z])/g, '-$1').toLowerCase()}`
Vue.component(name, Components[k])
})
2017-11-03 04:04:39 +00:00
const router = new VueRouter({
2018-01-22 10:56:58 +00:00
mode: 'hash',
2017-11-03 04:04:39 +00:00
routes,
})
2017-10-26 07:18:08 +00:00
new Vue({
el: '#app',
2017-11-03 04:04:39 +00:00
router,
2017-10-26 07:18:08 +00:00
})