|
1 | | -import Default from '../examples/Default' |
2 | | -import Size from '../examples/Size' |
3 | | -import Tooltips from '../examples/Tooltips' |
4 | | -import Color from '../examples/Color' |
5 | | -import SelectedColor from '../examples/SelectedColor' |
6 | | -import Filter2 from '../examples/Filter2' |
7 | | -import CustomIconSet from '../examples/CustomIconSet' |
8 | | -import UsingQInput from '../examples/UsingQInput' |
9 | | -import UsingIconSlot from '../examples/UsingIconSlot' |
10 | | -import Pagination from '../examples/Pagination' |
11 | | -import PaginationColor from '../examples/PaginationColor' |
12 | | - |
13 | 1 | export default ({ Vue }) => { |
14 | | - Vue.component('Default', Default) |
15 | | - Vue.component('Size', Size) |
16 | | - Vue.component('Tooltips', Tooltips) |
17 | | - Vue.component('Color', Color) |
18 | | - Vue.component('SelectedColor', SelectedColor) |
19 | | - Vue.component('Filter2', Filter2) |
20 | | - Vue.component('CustomIconSet', CustomIconSet) |
21 | | - Vue.component('UsingQInput', UsingQInput) |
22 | | - Vue.component('UsingIconSlot', UsingIconSlot) |
23 | | - Vue.component('Pagination', Pagination) |
24 | | - Vue.component('PaginationColor', PaginationColor) |
| 2 | + const examples = require('../assets/examples').default |
| 3 | + for (const index in examples) { |
| 4 | + import( |
| 5 | + /* webpackChunkName: "examples" */ |
| 6 | + /* webpackMode: "lazy-once" */ |
| 7 | + `../examples/${examples[index].file}.vue` |
| 8 | + ).then(comp => { |
| 9 | + Vue.component(examples[index].file, comp.default) |
| 10 | + }) |
| 11 | + } |
25 | 12 | } |
0 commit comments