diff --git a/devui/accordion/index.ts b/devui/accordion/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9c97a7600d257739b338cf5bca265ef5b3e4d4d0
--- /dev/null
+++ b/devui/accordion/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Accordion from './accordion'
+
+Accordion.install = function(Vue: App) {
+ Vue.component(Accordion.name, Accordion)
+};
+
+Accordion.version = '0.0.1'
+
+export default Accordion
diff --git a/devui/alert/index.ts b/devui/alert/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..b42151caa65cf34f066d86aa1aedf7bcb4e0301e
--- /dev/null
+++ b/devui/alert/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Alert from './alert'
+
+Alert.install = function(Vue: App) {
+ Vue.component(Alert.name, Alert)
+};
+
+Alert.version = '0.0.1'
+
+export default Alert
diff --git a/devui/anchor/index.ts b/devui/anchor/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..1be341a8e10604ea021db8e2d0e749afbd856e5c
--- /dev/null
+++ b/devui/anchor/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Anchor from './anchor'
+
+Anchor.install = function(Vue: App) {
+ Vue.component(Anchor.name, Anchor)
+};
+
+Anchor.version = '0.0.1'
+
+export default Anchor
diff --git a/devui/avatar/index.ts b/devui/avatar/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..95cc4267efc4b5e6247cd406abd1f6a58e5e0e9d
--- /dev/null
+++ b/devui/avatar/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Avatar from './avatar'
+
+Avatar.install = function(Vue: App) {
+ Vue.component(Avatar.name, Avatar)
+};
+
+Avatar.version = '0.0.1'
+
+export default Avatar
diff --git a/devui/button/index.ts b/devui/button/index.ts
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..237c5102e976bff08ba43ad82dd1d6a63a5bf7b2 100644
--- a/devui/button/index.ts
+++ b/devui/button/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Button from './button'
+
+Button.install = function(Vue: App) {
+ Vue.component(Button.name, Button)
+};
+
+Button.version = '0.0.1'
+
+export default Button
diff --git a/devui/card/index.ts b/devui/card/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..7eb08522bac21c6180a43df21d8ba9ca1dbfbfc1
--- /dev/null
+++ b/devui/card/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Card from './card'
+
+Card.install = function(Vue: App) {
+ Vue.component(Card.name, Card)
+};
+
+Card.version = '0.0.1'
+
+export default Card
diff --git a/devui/carousel/index.ts b/devui/carousel/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..2a01d52afb111358681e3034d593abf682ab3472
--- /dev/null
+++ b/devui/carousel/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Carousel from './carousel'
+
+Carousel.install = function(Vue: App) {
+ Vue.component(Carousel.name, Carousel)
+};
+
+Carousel.version = '0.0.1'
+
+export default Carousel
diff --git a/devui/checkbox/index.ts b/devui/checkbox/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f63d359e37c506f3ed090deb455405820c63bba1
--- /dev/null
+++ b/devui/checkbox/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Checkbox from './src/checkbox'
+
+Checkbox.install = function(Vue: App) {
+ Vue.component(Checkbox.name, Checkbox)
+};
+
+Checkbox.version = '0.0.1'
+
+export default Checkbox
diff --git a/devui/icon/index.ts b/devui/icon/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..aedc16ad9af5ad8675d2fefa6466335c5c96288f
--- /dev/null
+++ b/devui/icon/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Icon from './src/icon'
+
+Icon.install = function(Vue: App) {
+ Vue.component(Icon.name, Icon)
+};
+
+Icon.version = '0.0.1'
+
+export default Icon
diff --git a/devui/panel/index.ts b/devui/panel/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..a5e6113689b03d835eba59021df21aea29565996
--- /dev/null
+++ b/devui/panel/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Panel from './panel'
+
+Panel.install = function(Vue: App) {
+ Vue.component(Panel.name, Panel)
+};
+
+Panel.version = '0.0.1'
+
+export default Panel
diff --git a/devui/radio/index.ts b/devui/radio/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8e6500eea786d07d669908ab4fa6be5c831e3a75
--- /dev/null
+++ b/devui/radio/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Radio from './src/radio'
+
+Radio.install = function(Vue: App) {
+ Vue.component(Radio.name, Radio)
+};
+
+Radio.version = '0.0.1'
+
+export default Radio
diff --git a/devui/search/index.ts b/devui/search/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..197e0c2cb2d55feac2b3ec321727f8f1b15b04b1
--- /dev/null
+++ b/devui/search/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Search from './search'
+
+Search.install = function(Vue: App) {
+ Vue.component(Search.name, Search)
+};
+
+Search.version = '0.0.1'
+
+export default Search
diff --git a/devui/switch/index.ts b/devui/switch/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..ec8e8efe2b629724cc49d8e8f24655faf75f0ad0
--- /dev/null
+++ b/devui/switch/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Switch from './src/switch'
+
+Switch.install = function(Vue: App) {
+ Vue.component(Switch.name, Switch)
+};
+
+Switch.version = '0.0.1'
+
+export default Switch
diff --git a/devui/tabs/index.ts b/devui/tabs/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..6a1e89a351f6f02ae51da49509034ac7d673e75b
--- /dev/null
+++ b/devui/tabs/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import Tabs from './tabs'
+
+Tabs.install = function(Vue: App) {
+ Vue.component(Tabs.name, Tabs)
+};
+
+Tabs.version = '0.0.1'
+
+export default Tabs
diff --git a/devui/tags-input/index.ts b/devui/tags-input/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..f055ddea856396f3d073fc591eb0a53bad92727e
--- /dev/null
+++ b/devui/tags-input/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import TagsInput from './src/tags-input'
+
+TagsInput.install = function(Vue: App) {
+ Vue.component(TagsInput.name, TagsInput)
+};
+
+TagsInput.version = '0.0.1'
+
+export default TagsInput
diff --git a/devui/text-input/index.ts b/devui/text-input/index.ts
new file mode 100644
index 0000000000000000000000000000000000000000..4a68f956771b742e4b25b947af484eb95c3bd935
--- /dev/null
+++ b/devui/text-input/index.ts
@@ -0,0 +1,10 @@
+import { App } from 'vue'
+import TextInput from './src/text-input'
+
+TextInput.install = function(Vue: App) {
+ Vue.component(TextInput.name, TextInput)
+};
+
+TextInput.version = '0.0.1'
+
+export default TextInput
diff --git a/devui/vue-devui.ts b/devui/vue-devui.ts
index e13a3207801a3e8b37e55f882b506f3a7e709625..009113da50a79204110c000d7ead26df9f6c6c31 100644
--- a/devui/vue-devui.ts
+++ b/devui/vue-devui.ts
@@ -1,40 +1,30 @@
import { App } from 'vue';
// 通用
-import Button from './button/button';
-import Icon from './icon/src/icon';
-import Panel from './panel/panel';
+import Button from './button';
+import Icon from './icon';
+import Panel from './panel';
// 导航
-import Tabs from './tabs/tabs';
+import Tabs from './tabs';
// 反馈
-import Alert from './alert/alert';
+import Alert from './alert';
// 数据录入
-import Checkbox from './checkbox/src/checkbox';
-import Radio from './radio/src/radio';
-import Switch from './switch/src/switch';
-import TagsInput from './tags-input/src/tags-input';
-import TextInput from './text-input/src/text-input';
+import Checkbox from './checkbox';
+import Radio from './radio';
+import Switch from './switch';
+import TagsInput from './tags-input';
+import TextInput from './text-input';
// 数据展示
-import Avatar from './avatar/avatar';
-import Carousel from './carousel/carousel';
-import CarouselItem from './carousel/item';
+import Avatar from './avatar';
+import Carousel from './carousel';
-function install(app: App) {
- const packages = [
- Button, Icon, Panel,
- Tabs,
- Alert,
- Checkbox, Radio, Switch, TagsInput, TextInput,
-
- Avatar,
- Carousel,
- CarouselItem,
- ];
- packages.forEach((item:any) => {
+function install(app: App): void {
+ const packages = [ Button, Icon, Panel, Tabs, Alert, Checkbox, Radio, Switch, TagsInput, TextInput, Avatar, Carousel ];
+ packages.forEach((item: any) => {
if (item.install) {
app.use(item);
} else if (item.name) {
@@ -43,18 +33,5 @@ function install(app: App) {
});
}
-export {
- Button, Icon, Panel,
-
- Tabs,
-
- Alert,
-
- Checkbox, Radio, Switch, TagsInput, TextInput,
-
- Avatar,
- Carousel,
- CarouselItem,
-};
-
-export default { install, version: '0.0.1' };
+export { Button, Icon, Panel, Tabs, Alert, Checkbox, Radio, Switch, TagsInput, TextInput, Avatar, Carousel };
+export default { install, version: '0.0.1' };
\ No newline at end of file
diff --git a/package.json b/package.json
index bbac5659838fef1d880ebfcd804efa2e8d1ed189..394425958b56d79e8e41ddabe2b47aece1aa18ba 100644
--- a/package.json
+++ b/package.json
@@ -19,19 +19,20 @@
"module": "vue-devui.es.js",
"style": "style.css",
"scripts": {
- "docs:dev": "vitepress dev sites",
- "docs:build": "vitepress build sites",
- "docs:serve": "vitepress serve sites",
- "dev": "vite",
- "build": "vite build",
- "build:lib": "vite build --config vite.config.build.ts && cp package.json dist && cp README.md dist",
+ "dev": "vitepress dev sites",
+ "build": "vitepress build sites",
+ "serve": "vitepress serve sites",
+ "app:dev": "vite",
+ "app:build": "vite build",
+ "build:lib": "yarn run generate:devui && vite build --config vite.config.build.ts && cp package.json dist && cp README.md dist",
"test": "jest --config jest.config.js",
"ls-lint": "ls-lint",
"lint": "eslint \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
"lint:fix": "eslint --fix \"{src,devui}/**/*.{vue,js,ts,jsx,tsx}\"",
"stylelint": "stylelint --fix \"{devui,src}/**/*.{scss,css}\"",
"convert:route": "node ./scripts/convert-component-route.js",
- "publish": "cd dist && npm publish"
+ "publish": "cd dist && npm publish",
+ "generate:devui": "node scripts/generate-devui.js"
},
"dependencies": {
"@devui-design/icons": "^1.3.0",
@@ -74,7 +75,8 @@
"vite": "^2.4.4",
"vite-plugin-md": "^0.6.0",
"vitepress": "^0.15.6",
- "vue-tsc": "^0.2.2"
+ "vue-tsc": "^0.2.2",
+ "yarn": "^1.22.11"
},
"husky": {
"hooks": {
diff --git a/scripts/generate-devui.js b/scripts/generate-devui.js
new file mode 100644
index 0000000000000000000000000000000000000000..34976e1a6281aae361cf4a6f33933aa84b0b37ff
--- /dev/null
+++ b/scripts/generate-devui.js
@@ -0,0 +1,47 @@
+require('esbuild-register');
+
+const path = require('path');
+const fs = require('fs-extra');
+
+const config = require('../sites/.vitepress/config/sidebar').default;
+console.log('config:', config);
+
+let importStr = `import { App } from 'vue';\n\n`;
+const components = [];
+
+config['/'].forEach(({ text: ctext, children }) => {
+ if (ctext !== '快速开始') {
+ importStr += `// ${ctext}\n`;
+ console.log('ctext:', ctext);
+ console.log('children:', children);
+ children && children.forEach(({ text, link }) => {
+ const name = text.split(' ')[0];
+ const linkItem = link.split('/').filter(item => item);
+ const filename = linkItem[1];
+ importStr += `import ${name} from './${filename}';\n`;
+ components.push(name);
+ })
+ importStr += `\n`;
+ }
+});
+
+const componentStr = components.join(', ');
+
+let installStr = `function install(app: App): void {
+ const packages = [ ${componentStr} ];
+ packages.forEach((item: any) => {
+ if (item.install) {
+ app.use(item);
+ } else if (item.name) {
+ app.component(item.name, item);
+ }
+ });
+}\n\n`;
+
+const exportStr = `export { ${componentStr} };
+export default { install, version: '0.0.1' };`;
+
+const fileStr = importStr + installStr + exportStr;
+
+const targetFile = path.resolve(__dirname, '../devui/vue-devui.ts');
+fs.outputFile(targetFile, fileStr, 'utf8');
diff --git a/src/app.route.ts b/src/app.route.ts
deleted file mode 100644
index 0eb527c6fb524137a5b0072e3ef3ed9b6fc14146..0000000000000000000000000000000000000000
--- a/src/app.route.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { createRouter, createWebHistory } from 'vue-router'
-import AppContentRoutes from './components/component.route'
-import AppContent from './components/app-content.vue'
-
-const routerHistory = createWebHistory()
-
-const router = createRouter({
- history: routerHistory,
- routes: [
- {
- path: '/',
- redirect: '/components'
- },
- {
- path: '/components',
- component: AppContent,
- children: AppContentRoutes
- }
- ]
-})
-
-export default router
diff --git a/src/app.vue b/src/app.vue
index 61262d06f7c9efc942c1dc8d0c5b1e0547e86fe0..76ccddf536fbf4e584fccc3c8b392789d0c2ce8c 100644
--- a/src/app.vue
+++ b/src/app.vue
@@ -1,698 +1,22 @@
-
+ Vue DevUI
-
\ No newline at end of file
+
diff --git a/src/assets/styles.scss b/src/assets/styles.scss
deleted file mode 100755
index bf47d33d9ea8876d687f390c334fd62abcb48afd..0000000000000000000000000000000000000000
--- a/src/assets/styles.scss
+++ /dev/null
@@ -1,182 +0,0 @@
-@import '../devui/style/devui';
-// @import '~@devui-design/icons/icomoon/devui-icon.css';
-@import '../devui/style/theme/_font';
-
-.markdown {
- color: $devui-text;
- font-size: $devui-font-size-page-title;
- line-height: 1.8;
-
- a {
- color: $devui-link;
-
- &:hover {
- color: $devui-link-active;
- text-decoration: underline;
- cursor: pointer;
- }
- }
-}
-
-.highlight {
- line-height: 1.5;
- position: relative;
-}
-
-code[class*='language-'],
-pre[class*='language-'],
-pre code {
- white-space: pre;
- font-family: Lucida Console, Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
-}
-
-pre {
- display: block;
- margin: 0 0 10px;
- line-height: 1.42857143;
- color: $devui-text;
- word-break: break-all;
- word-wrap: break-word;
- border: 1px solid $devui-dividing-line;
- border-radius: 1px;
-}
-
-.hljs {
- background: $devui-area;
- color: $devui-text;
- font-size: $devui-font-size;
-}
-
-pre code {
- display: block;
- color: $devui-text;
- background: $devui-base-bg;
- line-height: 1.5;
- padding: 10px 15px;
- border-radius: 4px;
- overflow-x: auto;
-}
-
-code,
-kbd,
-pre,
-samp {
- font-family: Consolas, Menlo, Courier, monospace;
-}
-
-section {
- margin-bottom: 0 !important;
-}
-
-.markdown {
- width: 100%;
- display: block;
- overflow-x: auto;
-
- table {
- font-size: $devui-font-size;
- }
-
- p {
- margin: 1em 0;
- }
-
- a code {
- text-decoration: underline;
- }
-
- pre code {
- font-size: $devui-font-size;
- padding: 0.5em;
- background-color: $devui-area;
- }
-}
-
-.markdown table {
- border-collapse: collapse;
- border-spacing: 0;
- empty-cells: show;
- border: 1px solid $devui-line;
- width: 100%;
- margin: 8px 0 16px;
-
- th,
- td {
- border: 1px solid $devui-dividing-line;
- padding: 8px 16px;
- text-align: left;
- }
-
- th {
- background: $devui-area;
- white-space: nowrap;
- color: $devui-text;
- font-weight: 600;
- }
-}
-
-.markdown h2 {
- font-size: 22px;
-}
-
-.markdown h3 {
- font-size: 18px;
-}
-
-.markdown h2,
-.markdown h3,
-.markdown h4,
-.markdown h5,
-.markdown h6 {
- color: $devui-text;
- margin: 1.6em 0 0.6em;
- font-weight: 500;
- clear: both;
-}
-
-code {
- padding: 2px 4px;
- // font-size: 90%;
- color: #c7254e;
- background-color: $devui-area;
- border-radius: 1px;
-}
-
-.readme {
- h1 {
- // font-size: 30px;
- @include font-title();
-
- padding: 20px 0;
- }
-
- h2 {
- // font-size: 24px;
- @include font-title($devui-font-size-card-title);
-
- padding: 40px 0 15px;
- }
-
- h3 {
- // font-size: 18px;
- @include font-title($devui-font-size-card-title);
-
- padding: 30px 0 10px;
- }
-
- h1,
- h2,
- h3 {
- // font-weight: 300;
- margin: 0;
- }
-
- pre code {
- padding: 0.5em;
- }
-}
-
-[dTextInput]::-ms-clear,
-[dTextInput]::-ms-reveal {
- display: none;
-}
diff --git a/src/components/app-content.vue b/src/components/app-content.vue
deleted file mode 100644
index e75bdc0475105744656485f84fb30924697a5609..0000000000000000000000000000000000000000
--- a/src/components/app-content.vue
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/components/app-demo-cell.vue b/src/components/app-demo-cell.vue
deleted file mode 100644
index e99f09a93d500f17f8bb6527021de66be05eb126..0000000000000000000000000000000000000000
--- a/src/components/app-demo-cell.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
diff --git a/src/components/component.route.ts b/src/components/component.route.ts
deleted file mode 100755
index dc3a76aa10dd69f59a82a5371f1487641982b304..0000000000000000000000000000000000000000
--- a/src/components/component.route.ts
+++ /dev/null
@@ -1,740 +0,0 @@
-import ExamplePanelComponent from './app-demo-cell.vue';
-import GetStartedComponent from './app-demo-cell.vue';
-import ColorComponent from './app-demo-cell.vue';
-import ThemeGuideComponent from './app-demo-cell.vue';
-
-import accordionRoutes from '../../devui/accordion/demo/accordion.route'
-import alertRoutes from '../../devui/alert/demo/alert.route'
-import anchorRoutes from '../../devui/anchor/demo/anchor.route'
-import autoCompleteRoutes from '../../devui/auto-complete/demo/auto-complete.route'
-import avatarRoutes from '../../devui/avatar/demo/avatar.route'
-import backTopRoutes from '../../devui/back-top/demo/back-top.route'
-import badgeRoutes from '../../devui/badge/demo/badge.route'
-import breadcrumbRoutes from '../../devui/breadcrumb/demo/breadcrumb.route'
-import buttonRoutes from '../../devui/button/demo/button.route'
-import cardRoutes from '../../devui/card/demo/card.route'
-
-import carouselRoutes from '../../devui/carousel/demo/carousel.route'
-import cascaderRoutes from '../../devui/cascader/demo/cascader.route'
-import checkboxRoutes from '../../devui/checkbox/demo/checkbox.route'
-import dataTableRoutes from '../../devui/data-table/demo/data-table.route'
-import datepickerRoutes from '../../devui/datepicker/demo/datepicker.route'
-import dragdropRoutes from '../../devui/dragdrop/demo/dragdrop.route'
-import drawerRoutes from '../../devui/drawer/demo/drawer.route'
-import dropdownRoutes from '../../devui/dropdown/demo/dropdown.route'
-import editableSelectRoutes from '../../devui/editable-select/demo/editable-select.route'
-import formRoutes from '../../devui/form/demo/form.route'
-
-import fullscreenRoutes from '../../devui/fullscreen/demo/fullscreen.route'
-import ganttRoutes from '../../devui/gantt/demo/gantt.route'
-import imagePreviewRoutes from '../../devui/image-preview/demo/image-preview.route'
-import inputNumberRoutes from '../../devui/input-number/demo/input-number.route'
-import layoutRoutes from '../../devui/layout/demo/layout.route'
-import loadingRoutes from '../../devui/loading/demo/loading.route'
-import modalRoutes from '../../devui/modal/demo/modal.route'
-import multiAutoCompleteRoutes from '../../devui/multi-auto-complete/demo/multi-auto-complete.route'
-import paginationRoutes from '../../devui/pagination/demo/pagination.route'
-import panelRoutes from '../../devui/panel/demo/panel.route'
-
-import popoverRoutes from '../../devui/popover/demo/popover.route'
-import progressRoutes from '../../devui/progress/demo/progress.route'
-import quadrantDiagramRoutes from '../../devui/quadrant-diagram/demo/quadrant-diagram.route'
-import radioRoutes from '../../devui/radio/demo/radio.route'
-import rateRoutes from '../../devui/rate/demo/rate.route'
-import readTipRoutes from '../../devui/read-tip/demo/read-tip.route'
-import searchRoutes from '../../devui/search/demo/search.route'
-import selectRoutes from '../../devui/select/demo/select.route'
-import sliderRoutes from '../../devui/slider/demo/slider.route'
-import splitterRoutes from '../../devui/splitter/demo/splitter.route'
-
-import statusRoutes from '../../devui/status/demo/status.route'
-import stepsGuideRoutes from '../../devui/steps-guide/demo/steps-guide.route'
-import stickyRoutes from '../../devui/sticky/demo/sticky.route'
-import tabsRoutes from '../../devui/tabs/demo/tabs.route'
-import tagsRoutes from '../../devui/tags/demo/tags.route'
-import tagsInputRoutes from '../../devui/tags-input/demo/tags-input.route'
-import textInputRoutes from '../../devui/text-input/demo/text-input.route'
-import textareaRoutes from '../../devui/textarea/demo/textarea.route'
-import timeAxisRoutes from '../../devui/time-axis/demo/time-axis.route'
-import timePickerRoutes from '../../devui/time-picker/demo/time-picker.route'
-
-import toastRoutes from '../../devui/toast/demo/toast.route'
-import switchRoutes from '../../devui/switch/demo/switch.route'
-import tooltipRoutes from '../../devui/tooltip/demo/tooltip.route'
-import transferRoutes from '../../devui/transfer/demo/transfer.route'
-import treeRoutes from '../../devui/tree/demo/tree.route'
-import treeSelectRoutes from '../../devui/tree-select/demo/tree-select.route'
-import uploadRoutes from '../../devui/upload/demo/upload.route'
-
-export const routesConfig = [
- {
- path: '',
- redirect: '/components/button/demo',
- pathMatch: 'full',
- meta: {},
- },
- {
- path: 'get-start',
- component: GetStartedComponent,
- meta: { nodisplay: true },
- },
- {
- path: 'color',
- component: ColorComponent,
- meta: {nodisplay: true}
- },
- {
- path: 'theme-guide',
- component: ThemeGuideComponent,
- meta: { nodisplay: true },
- },
- {
- path: 'accordion',
- component: ExamplePanelComponent,
- children: accordionRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'Accordion',
- cnName: '手风琴',
- done: true,
- },
- },
- {
- path: 'alert',
- component: ExamplePanelComponent,
- children: alertRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Alert',
- cnName: '警告',
- done: true,
- },
- },
- {
- path: 'anchor',
- component: ExamplePanelComponent,
- children: anchorRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'Anchor',
- cnName: '锚点',
- },
- },
- {
- path: 'auto-complete',
- component: ExamplePanelComponent,
- children: autoCompleteRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'AutoComplete',
- cnName: '自动补全',
- },
- },
- {
- path: 'avatar',
- component: ExamplePanelComponent,
- children: avatarRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Avatar',
- cnName: '头像',
- done: true,
- },
- },
- {
- path: 'ImagePreview',
- component: ExamplePanelComponent,
- children: imagePreviewRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'ImagePreview',
- cnName: '图片预览',
- },
- },
- {
- path: 'breadcrumb',
- component: ExamplePanelComponent,
- children: breadcrumbRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'Breadcrumb',
- cnName: '面包屑',
- },
- },
- {
- path: 'back-top',
- component: ExamplePanelComponent,
- children: backTopRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'BackTop',
- cnName: '回到顶部',
- },
- },
- {
- path: 'button',
- component: ExamplePanelComponent,
- children: buttonRoutes,
- meta: {
- name: 'Button',
- cnName: '按钮',
- done: true,
- },
- },
- {
- path: 'badge',
- component: ExamplePanelComponent,
- children: badgeRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Badge',
- cnName: '徽标',
- },
- },
- {
- path: 'card',
- component: ExamplePanelComponent,
- children: cardRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Card',
- cnName: '卡片',
- done: true,
- },
- },
- {
- path: 'carousel',
- component: ExamplePanelComponent,
- children: carouselRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Carousel',
- cnName: '走马灯',
- },
- },
- {
- path: 'checkbox',
- component: ExamplePanelComponent,
- children: checkboxRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'CheckBox',
- cnName: '复选框',
- done: true,
- },
- },
- {
- path: 'common',
- component: ExamplePanelComponent,
- children: accordionRoutes,
- meta: {
- name: 'Common',
- cnName: '公共方法',
- },
- },
- {
- path: 'datatable',
- component: ExamplePanelComponent,
- children: dataTableRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'DataTable',
- cnName: '表格',
- },
- },
- {
- path: 'datepicker',
- component: ExamplePanelComponent,
- children: datepickerRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'DatePicker',
- cnName: '日期选择器',
- },
- },
- {
- path: 'multi-auto-complete',
- component: ExamplePanelComponent,
- children: multiAutoCompleteRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'MultiAutoComplete',
- cnName: '多项自动补全',
- },
- },
- {
- path: 'form',
- component: ExamplePanelComponent,
- children: formRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Form',
- cnName: '表单',
- },
- },
- {
- path: 'fullscreen',
- component: ExamplePanelComponent,
- children: fullscreenRoutes,
- meta: {
- name: 'Fullscreen',
- cnName: '全屏',
- },
- },
- {
- path: 'transfer',
- component: ExamplePanelComponent,
- children: transferRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Transfer',
- cnName: '穿梭框',
- },
- },
- {
- path: 'dragdrop',
- component: ExamplePanelComponent,
- children: dragdropRoutes,
- meta: {
- name: 'DragDrop',
- cnName: '拖拽',
- },
- },
- {
- path: 'drawer',
- component: ExamplePanelComponent,
- children: drawerRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Drawer',
- cnName: '抽屉板',
- },
- },
- {
- path: 'dropdown',
- component: ExamplePanelComponent,
- children: dropdownRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'DropDown',
- cnName: '下拉菜单',
- },
- },
- {
- path: 'editable-select',
- component: ExamplePanelComponent,
- children: editableSelectRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'EditableSelect',
- cnName: '可输入下拉选择框',
- },
- },
- {
- path: 'loading',
- component: ExamplePanelComponent,
- children: loadingRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Loading',
- cnName: '加载提示',
- },
- },
- {
- path: 'modal',
- component: ExamplePanelComponent,
- children: modalRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Modal',
- cnName: '模态弹窗',
- },
- },
- {
- path: 'pagination',
- component: ExamplePanelComponent,
- children: paginationRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'Pagination',
- cnName: '分页',
- },
- },
- {
- path: 'panel',
- component: ExamplePanelComponent,
- children: panelRoutes,
- meta: {
- name: 'Panel',
- cnName: '面板',
- done: true,
- },
- },
- {
- path: 'popover',
- component: ExamplePanelComponent,
- children: popoverRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Popover',
- cnName: '悬浮提示',
- },
- },
- {
- path: 'progress',
- component: ExamplePanelComponent,
- children: progressRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Progress',
- cnName: '进度条',
- },
- },
- {
- path: 'quadrant-diagram',
- component: ExamplePanelComponent,
- children: quadrantDiagramRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Quadrant Diagram',
- cnName: '象限图',
- },
- },
- {
- path: 'radio',
- component: ExamplePanelComponent,
- children: radioRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Radio',
- cnName: '单选框',
- done: true,
- },
- },
- {
- path: 'rate',
- component: ExamplePanelComponent,
- children: rateRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Rate',
- cnName: '等级评估',
- },
- },
- {
- path: 'search',
- component: ExamplePanelComponent,
- children: searchRoutes,
- meta: {
- name: 'Search',
- cnName: '搜索框',
- },
- },
- {
- path: 'select',
- component: ExamplePanelComponent,
- children: selectRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Select',
- cnName: '下拉选择框',
- },
- },
- {
- path: 'cascader',
- component: ExamplePanelComponent,
- children: cascaderRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Cascader',
- cnName: '级联菜单',
- },
- },
- {
- path: 'status',
- component: ExamplePanelComponent,
- children: statusRoutes,
- meta: {
- name: 'Status',
- cnName: '状态',
- },
- },
- {
- path: 'sticky',
- component: ExamplePanelComponent,
- children: stickyRoutes,
- meta: {
- name: 'Sticky',
- cnName: '便贴',
- },
- },
- {
- path: 'tabs',
- component: ExamplePanelComponent,
- children: tabsRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'Tabs',
- cnName: '选项卡切换',
- done: true,
- },
- },
- {
- path: 'tags',
- component: ExamplePanelComponent,
- children: tagsRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Tags',
- cnName: '标签',
- },
- },
- {
- path: 'tags-input',
- component: ExamplePanelComponent,
- children: tagsInputRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'TagsInput',
- cnName: '标签输入',
- done: true,
- },
- },
- {
- path: 'time-axis',
- component: ExamplePanelComponent,
- children: timeAxisRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'TimeAxis',
- cnName: '时间轴',
- },
- },
- {
- path: 'toast',
- component: ExamplePanelComponent,
- children: toastRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Toast',
- cnName: '全局通知',
- },
- },
- {
- path: 'tooltip',
- component: ExamplePanelComponent,
- children: tooltipRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'Tooltip',
- cnName: '提示',
- },
- },
- {
- path: 'read-tip',
- component: ExamplePanelComponent,
- children: readTipRoutes,
- meta: {
- type: '反馈',
- enType: 'Feedback',
- name: 'ReadTip',
- cnName: '阅读提示',
- description: '阅读提示组件。',
- tmw: `当html文档中需要对特定内容进行提示时使用。`,
- },
- },
- {
- path: 'switch',
- component: ExamplePanelComponent,
- children: switchRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Switch',
- cnName: '开关',
- done: true,
- },
- },
- {
- path: 'tree',
- component: ExamplePanelComponent,
- children: treeRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Tree',
- cnName: '树',
- },
- },
- {
- path: 'upload',
- component: ExamplePanelComponent,
- children: uploadRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Upload',
- cnName: '上传',
- },
- },
- {
- path: 'input-number',
- component: ExamplePanelComponent,
- children: inputNumberRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'InputNumber',
- cnName: '数字输入框',
- },
- },
- {
- path: 'tree-select',
- component: ExamplePanelComponent,
- children: treeSelectRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'TreeSelect',
- cnName: '树形选择框',
- },
- },
- {
- path: 'slider',
- component: ExamplePanelComponent,
- children: sliderRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Slider',
- cnName: '滑动输入条',
- },
- },
- {
- path: 'splitter',
- component: ExamplePanelComponent,
- children: splitterRoutes,
- meta: {
- type: '布局',
- enType: 'Layout',
- name: 'Splitter',
- cnName: '分割器',
- },
- },
- {
- path: 'layout',
- component: ExamplePanelComponent,
- children: layoutRoutes,
- meta: {
- type: '布局',
- enType: 'Layout',
- name: 'Layout',
- cnName: '布局',
- },
- },
- {
- path: 'gantt',
- component: ExamplePanelComponent,
- children: ganttRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'Gantt',
- cnName: '甘特图',
- },
- },
- {
- path: 'text-input',
- component: ExamplePanelComponent,
- children: textInputRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'TextInput',
- cnName: '文本框',
- done: true,
- },
- },
- {
- path: 'textarea',
- component: ExamplePanelComponent,
- children: textareaRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'Textarea',
- cnName: '多行文本框',
- },
- },
- {
- path: 'steps-guide',
- component: ExamplePanelComponent,
- children: stepsGuideRoutes,
- meta: {
- type: '导航',
- enType: 'Navigation',
- name: 'StepsGuide',
- cnName: '操作指引',
- },
- },
- {
- path: 'time-picker',
- component: ExamplePanelComponent,
- children: timePickerRoutes,
- meta: {
- type: '数据录入',
- enType: 'Data Entry',
- name: 'TimePicker',
- cnName: '时间选择器',
- },
- },
- {
- path: 'relative-time',
- component: ExamplePanelComponent,
- children: accordionRoutes,
- meta: {
- type: '数据展示',
- enType: 'Data Display',
- name: 'RelativeTime',
- cnName: '人性化时间转换',
- },
- },
-];
-
-export default routesConfig;
diff --git a/src/main.ts b/src/main.ts
index b59e0a2b93ff4deb9a783f684338ac1e7ae05b6c..01433bca2ac76590c48fabfee8d69d7b223f48bb 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,11 +1,4 @@
import { createApp } from 'vue'
-// TypeScript error? Run VSCode command
-// TypeScript: Select TypeScript version - > Use Workspace Version
-import App from './app.vue'
-import appRoutes from './app.route'
+import App from './App.vue'
-const app = createApp(App)
-
-app.use(appRoutes)
-
-app.mount('#app')
+createApp(App).mount('#app')
diff --git a/yarn.lock b/yarn.lock
index 42c5f811d6857908c0dcad0a1052921f6dc09ee6..45d6914ca1992cd465067b948bd70c4a9caf367b 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7312,6 +7312,11 @@ yargs@^16.0.0, yargs@^16.0.3:
y18n "^5.0.5"
yargs-parser "^20.2.2"
+yarn@^1.22.11:
+ version "1.22.11"
+ resolved "https://registry.nlark.com/yarn/download/yarn-1.22.11.tgz?cache=0&sync_timestamp=1627322569698&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyarn%2Fdownload%2Fyarn-1.22.11.tgz#d0104043e7349046e0e2aec977c24be106925ed6"
+ integrity sha1-0BBAQ+c0kEbg4q7Jd8JL4QaSXtY=
+
yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.npm.taobao.org/yocto-queue/download/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"