You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/examples/index.js

37 lines
914 B

7 years ago
import '../components/style.js'
7 years ago
import './index.less'
7 years ago
import 'highlight.js/styles/solarized-light.css'
7 years ago
import Vue from 'vue'
import VueRouter from 'vue-router'
7 years ago
import VueClipboard from 'vue-clipboard2'
7 years ago
import routes from './routes'
7 years ago
import Md from './components/md'
import Api from './components/api'
7 years ago
import * as Components from '../components/index'
import demoBox from './components/demoBox'
7 years ago
Vue.use(VueClipboard)
7 years ago
Vue.use(VueRouter)
7 years ago
Vue.component(Md.name, Md)
7 years ago
Vue.component(Api.name, Api)
7 years ago
Vue.component('demo-box', demoBox)
Object.keys(Components).forEach(k => {
7 years ago
if (k === 'api') {
Object.keys(Components[k]).forEach(api => {
Vue.prototype[`$${api}`] = Components[k][api]
})
} else {
const name = `a${k.replace(/([A-Z])/g, '-$1').toLowerCase()}`
Vue.component(name, Components[k])
}
7 years ago
})
7 years ago
const router = new VueRouter({
7 years ago
mode: 'hash',
7 years ago
routes,
})
7 years ago
new Vue({
el: '#app',
7 years ago
router,
7 years ago
})