naive-ui/demo/index.js

146 lines
6.0 KiB
JavaScript
Raw Normal View History

import Vue from 'vue/dist/vue'
import VueRouter from 'vue-router'
import '../styles/index.scss'
2019-06-18 14:53:24 +08:00
import 'codemirror/lib/codemirror.css'
import NaiveUI from '../index'
import SourceBlock from './SourceBlock'
2019-06-24 15:11:27 +08:00
import nimbusServiceLayoutDemo from './components/nimbusServiceLayoutDemo'
2019-06-03 23:42:44 +08:00
import homeDemo from './components/homeDemo'
2019-06-13 17:22:06 +08:00
import gradientTextDemo from './components/gradientTextDemo'
2019-06-13 17:42:42 +08:00
import iconDemo from './components/iconDemo'
2019-06-13 19:17:41 +08:00
import checkboxDemo from './components/checkboxDemo'
2019-06-24 15:29:36 +08:00
import buttonDemo from './components/buttonDemo'
2019-06-14 11:26:46 +08:00
import switchDemo from './components/switchDemo'
2019-06-14 13:43:27 +08:00
import tableDemo from './components/tableDemo'
2019-07-05 15:27:06 +08:00
import advanceTableDemo from './components/advanceTableDemo'
2019-06-14 14:46:13 +08:00
import inputDemo from './components/inputDemo'
2019-06-14 19:33:41 +08:00
import selectDemo from './components/selectDemo'
2019-08-01 12:01:04 +08:00
import cascaderDemo from './components/cascaderDemo'
import inputKeyValuePairsDemo from './components/inputKeyValuePairsDemo'
2019-06-17 14:29:32 +08:00
import modalDemo from './components/modalDemo'
import nimbusFormCardDemo from './components/nimbusFormCardDemo'
2019-06-20 12:46:29 +08:00
import messageDemo from './components/messageDemo'
import tooltipDemo from './components/tooltipDemo'
2019-07-11 19:51:59 +08:00
import popoverDemo from './components/popoverDemo'
import alertDemo from './components/alertDemo'
import datePickerDemo from './components/datePickerDemo'
import inputNumberDemo from './components/inputNumberDemo'
2019-07-15 11:34:30 +08:00
import nimbusIconDemo from './components/nimbusIconDemo'
import radioDemo from './components/radioDemo'
2019-07-22 19:14:47 +08:00
import formDemo from './components/formDemo'
2019-07-29 16:40:11 +08:00
import tabDemo from './components/tabDemo'
import timePickerDemo from './components/timePickerDemo'
2019-08-01 13:46:03 +08:00
import confirmDemo from './components/confirmDemo'
import backTopDemo from './components/backTopDemo'
2019-08-16 16:48:36 +08:00
import dropdownDemo from './components/dropdownDemo'
import scrollbarDebug from './debugComponents/scrollbarDebug'
import scrollbarDebug2 from './debugComponents/scrollbarDebug2'
2019-08-01 11:14:14 +08:00
import badgeDemo from './components/badgeDemo'
import stepsDemo from './components/stepsDemo'
2019-06-20 19:10:53 +08:00
import notificationDemo from './components/notificationDemo'
2019-06-21 13:11:06 +08:00
import nimbusConfirmCardDemo from './components/nimbusConfirmCardDemo'
2019-06-21 23:23:58 +08:00
import paginationDemo from './components/paginationDemo'
2019-06-24 15:11:27 +08:00
import startPage from './components/startPage'
2019-08-01 11:14:14 +08:00
import collapseDemo from './components/collapseDemo'
import tagDemo from './components/tagDemo'
import timelineDemo from './components/timelineDemo'
import progressDemo from './components/progressDemo'
2019-08-08 18:00:30 +08:00
import dividerDemo from './components/dividerDemo'
import popconfirmDemo from './components/popconfirmDemo'
import anchorDemo from './components/anchorDemo'
import popselectDemo from './components/popselectDemo'
import demo from './demo'
import popoverDebug from './debugComponents/popoverDebug'
import routerDebug from './debugComponents/routerDebug'
2019-07-26 16:33:01 +08:00
import modalDebug from './debugComponents/modalDebug'
import datePickerDebug from './debugComponents/datePickerDebug'
import backTopDebug from './debugComponents/backTopDebug'
Vue.use(NaiveUI)
Vue.use(VueRouter)
Vue.component(SourceBlock.name, SourceBlock)
const routes = [
2019-06-26 20:16:11 +08:00
{
path: '/home-demo',
component: homeDemo
},
{
path: '/n-popover-debug',
component: popoverDebug
},
{
path: '/n-back-top-debug',
component: backTopDebug
},
2019-06-28 18:14:06 +08:00
{
path: '/start',
2019-06-23 19:52:26 +08:00
component: demo,
children: [
2019-06-24 15:11:27 +08:00
{ path: '/start', component: startPage },
{ path: '/n-nimbus-service-layout', component: nimbusServiceLayoutDemo },
2019-06-23 19:52:26 +08:00
{ path: '/n-nimbus-home-layout', component: homeDemo },
{ path: '/n-gradient-text', component: gradientTextDemo },
{ path: '/n-icon', component: iconDemo },
{ path: '/n-checkbox', component: checkboxDemo },
2019-06-24 01:16:38 +08:00
{ path: '/n-button', component: buttonDemo },
2019-06-23 19:52:26 +08:00
{ path: '/n-switch', component: switchDemo },
{ path: '/n-table', component: tableDemo },
2019-07-05 15:27:06 +08:00
{ path: '/n-advance-table', component: advanceTableDemo },
2019-06-23 19:52:26 +08:00
{ path: '/n-input', component: inputDemo },
{ path: '/n-select', component: selectDemo },
2019-08-01 12:01:04 +08:00
{ path: '/n-cascader', component: cascaderDemo },
{ path: '/n-InputKeyValuePairs', component: inputKeyValuePairsDemo },
2019-06-23 19:52:26 +08:00
{ path: '/n-modal', component: modalDemo },
{ path: '/n-nimbus-form-card', component: nimbusFormCardDemo },
{ path: '/n-message', component: messageDemo },
{ path: '/n-tooltip', component: tooltipDemo },
2019-07-11 19:51:59 +08:00
{ path: '/n-popover', component: popoverDemo },
2019-06-23 19:52:26 +08:00
{ path: '/n-notification', component: notificationDemo },
{ path: '/n-nimbus-confirm-card', component: nimbusConfirmCardDemo },
{ path: '/n-pagination', component: paginationDemo },
{ path: '/n-alert', component: alertDemo },
{ path: '/n-date-picker', component: datePickerDemo },
2019-07-15 11:34:30 +08:00
{ path: '/n-input-number', component: inputNumberDemo },
{ path: '/n-nimbus-icon', component: nimbusIconDemo },
{ path: '/n-radio', component: radioDemo },
2019-07-24 17:28:31 +08:00
{ path: '/n-form', component: formDemo },
2019-07-29 16:40:11 +08:00
{ path: '/n-tab', component: tabDemo },
{ path: '/n-time-picker', component: timePickerDemo },
2019-08-01 13:46:03 +08:00
{ path: '/n-confirm', component: confirmDemo },
2019-07-26 16:33:01 +08:00
{ path: '/n-router-debug', component: routerDebug },
2019-07-29 17:57:00 +08:00
{ path: '/n-modal-debug', component: modalDebug },
2019-08-01 11:14:14 +08:00
{ path: '/n-scrollbar-debug', component: scrollbarDebug },
{ path: '/n-badge', component: badgeDemo },
{ path: '/n-steps', component: stepsDemo },
{ path: '/n-collapse', component: collapseDemo },
{ path: '/n-progress', component: progressDemo },
{ path: '/n-tag', component: tagDemo },
{ path: '/n-timeline', component: timelineDemo },
{ path: '/n-scrollbar-debug2', component: scrollbarDebug2 },
{ path: '/n-back-top', component: backTopDemo },
2019-08-08 18:00:30 +08:00
{ path: '/n-date-picker-debug', component: datePickerDebug },
{ path: '/n-divider', component: dividerDemo },
{ path: '/n-popconfirm', component: popconfirmDemo },
2019-08-16 16:48:36 +08:00
{ path: '/n-anchor', component: anchorDemo },
{ path: '/n-dropdown', component: dropdownDemo },
{ path: '/n-popselect', component: popselectDemo }
2019-06-23 19:52:26 +08:00
]
2019-06-24 15:11:27 +08:00
},
{
2019-06-24 15:23:36 +08:00
path: '/*',
2019-06-24 15:11:27 +08:00
redirect: '/start'
2019-06-23 19:52:26 +08:00
}
]
const router = new VueRouter({
routes
})
2019-06-26 20:16:11 +08:00
new Vue({
router
2019-06-26 20:16:11 +08:00
}).$mount('#app')