vue-amazing-ui 2.0.2-beta.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -4
- package/README.zh-CN.md +67 -3
- package/dist/index.iife.js +21 -21
- package/dist/index.js +1900 -1887
- package/dist/index.umd.cjs +17 -17
- package/dist/style.css +1 -1
- package/es/alert/Alert.d.ts +2 -1
- package/es/avatar/Avatar.d.ts +3 -2
- package/es/avatar/index.d.ts +3 -3
- package/es/backtop/BackTop.d.ts +2 -1
- package/es/badge/Badge.d.ts +3 -2
- package/es/badge/index.d.ts +1 -1
- package/es/breadcrumb/Breadcrumb.d.ts +3 -2
- package/es/breadcrumb/index.d.ts +1 -1
- package/es/button/Button.d.ts +2 -1
- package/es/card/Card.d.ts +3 -2
- package/es/card/index.d.ts +1 -1
- package/es/carousel/Carousel.d.ts +1 -1
- package/es/carousel/index.d.ts +1 -1
- package/es/cascader/Cascader.d.ts +2 -2
- package/es/cascader/index.d.ts +4 -4
- package/es/checkbox/Checkbox.d.ts +3 -2
- package/es/checkbox/index.d.ts +1 -1
- package/es/collapse/Collapse.d.ts +3 -2
- package/es/collapse/index.d.ts +1 -1
- package/es/countdown/Countdown.d.ts +3 -2
- package/es/countdown/index.d.ts +1 -1
- package/es/descriptions/descriptions/Descriptions.d.ts +7 -6
- package/es/descriptions/descriptions/index.d.ts +1 -1
- package/es/descriptions/descriptionsitem/DescriptionsItem.d.ts +2 -1
- package/es/dialog/Dialog.d.ts +3 -2
- package/es/dialog/index.d.ts +1 -1
- package/es/divider/Divider.d.ts +3 -2
- package/es/divider/index.d.ts +1 -1
- package/es/drawer/Drawer.d.ts +3 -2
- package/es/drawer/index.d.ts +1 -1
- package/es/ellipsis/Ellipsis.d.ts +7 -6
- package/es/ellipsis/index.d.ts +1 -1
- package/es/empty/Empty.d.ts +3 -2
- package/es/empty/index.d.ts +1 -1
- package/es/flex/Flex.d.ts +3 -2
- package/es/flex/index.d.ts +1 -1
- package/es/floatbutton/FloatButton.d.ts +3 -2
- package/es/floatbutton/index.d.ts +3 -3
- package/es/gradienttext/GradientText.d.ts +3 -2
- package/es/gradienttext/index.d.ts +1 -1
- package/es/grid/col/Col.d.ts +3 -2
- package/es/grid/col/index.d.ts +1 -1
- package/es/grid/row/Row.d.ts +3 -2
- package/es/grid/row/index.d.ts +1 -1
- package/es/image/Image.d.ts +3 -2
- package/es/image/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +116 -115
- package/es/input/Input.d.ts +3 -2
- package/es/input/index.d.ts +1 -1
- package/es/inputnumber/InputNumber.d.ts +3 -2
- package/es/inputnumber/index.d.ts +1 -1
- package/es/inputsearch/InputSearch.d.ts +3 -2
- package/es/inputsearch/index.d.ts +1 -1
- package/es/list/list/List.d.ts +3 -2
- package/es/list/list/index.d.ts +1 -1
- package/es/list/listitem/ListItem.d.ts +3 -2
- package/es/list/listitem/index.d.ts +1 -1
- package/es/message/Message.d.ts +1 -1
- package/es/message/index.d.ts +1 -1
- package/es/modal/Modal.d.ts +3 -2
- package/es/modal/index.d.ts +1 -1
- package/es/notification/Notification.d.ts +1 -1
- package/es/notification/index.d.ts +1 -1
- package/es/numberanimation/NumberAnimation.d.ts +1 -1
- package/es/numberanimation/index.d.ts +1 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/index.d.ts +1 -1
- package/es/popconfirm/Popconfirm.d.ts +7 -6
- package/es/popconfirm/index.d.ts +1 -1
- package/es/popover/Popover.d.ts +3 -2
- package/es/popover/index.d.ts +1 -1
- package/es/progress/Progress.d.ts +2 -1
- package/es/qrcode/QRCode.d.ts +1 -1
- package/es/qrcode/index.d.ts +1 -1
- package/es/radio/Radio.d.ts +3 -2
- package/es/radio/index.d.ts +1 -1
- package/es/rate/Rate.d.ts +3 -2
- package/es/rate/index.d.ts +1 -1
- package/es/result/Result.d.ts +3 -2
- package/es/result/index.d.ts +1 -1
- package/es/scrollbar/Scrollbar.d.ts +3 -2
- package/es/scrollbar/index.d.ts +1 -1
- package/es/segmented/Segmented.d.ts +3 -2
- package/es/segmented/index.d.ts +1 -1
- package/es/select/Select.d.ts +1 -1
- package/es/select/index.d.ts +1 -1
- package/es/skeleton/Skeleton.d.ts +2 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/space/Space.d.ts +3 -2
- package/es/space/index.d.ts +1 -1
- package/es/spin/Spin.d.ts +3 -2
- package/es/spin/index.d.ts +1 -1
- package/es/statistic/Statistic.d.ts +3 -2
- package/es/statistic/index.d.ts +1 -1
- package/es/steps/Steps.d.ts +1 -1
- package/es/steps/index.d.ts +1 -1
- package/es/swiper/Swiper.css +1 -1
- package/es/swiper/Swiper.vue.js +1 -1
- package/es/swiper/Swiper.vue2.js +65 -62
- package/es/switch/Switch.d.ts +3 -2
- package/es/switch/index.d.ts +1 -1
- package/es/table/Table.d.ts +31 -30
- package/es/table/index.d.ts +17 -17
- package/es/tabs/Tabs.d.ts +4 -3
- package/es/tabs/index.d.ts +1 -1
- package/es/tag/Tag.d.ts +2 -1
- package/es/textarea/Textarea.d.ts +1 -1
- package/es/textarea/index.d.ts +1 -1
- package/es/timeline/Timeline.d.ts +3 -2
- package/es/timeline/index.d.ts +1 -1
- package/es/tooltip/Tooltip.d.ts +3 -2
- package/es/tooltip/index.d.ts +1 -1
- package/es/upload/Upload.d.ts +9 -8
- package/es/upload/index.d.ts +1 -1
- package/{lib/utils/resolver.d.ts → es/utils/resolvers.d.ts} +5 -0
- package/es/utils/resolvers.js +104 -0
- package/es/video/Video.d.ts +1 -1
- package/es/video/index.d.ts +1 -1
- package/es/waterfall/Waterfall.d.ts +1 -1
- package/es/waterfall/index.d.ts +1 -1
- package/es/watermark/Watermark.d.ts +3 -2
- package/es/watermark/index.d.ts +1 -1
- package/lib/alert/Alert.d.ts +2 -1
- package/lib/avatar/Avatar.d.ts +3 -2
- package/lib/avatar/index.d.ts +3 -3
- package/lib/backtop/BackTop.d.ts +2 -1
- package/lib/badge/Badge.d.ts +3 -2
- package/lib/badge/index.d.ts +1 -1
- package/lib/breadcrumb/Breadcrumb.d.ts +3 -2
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/button/Button.d.ts +2 -1
- package/lib/card/Card.d.ts +3 -2
- package/lib/card/index.d.ts +1 -1
- package/lib/carousel/Carousel.d.ts +1 -1
- package/lib/carousel/index.d.ts +1 -1
- package/lib/cascader/Cascader.d.ts +2 -2
- package/lib/cascader/index.d.ts +4 -4
- package/lib/checkbox/Checkbox.d.ts +3 -2
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/collapse/Collapse.d.ts +3 -2
- package/lib/collapse/index.d.ts +1 -1
- package/lib/countdown/Countdown.d.ts +3 -2
- package/lib/countdown/index.d.ts +1 -1
- package/lib/descriptions/descriptions/Descriptions.d.ts +7 -6
- package/lib/descriptions/descriptions/index.d.ts +1 -1
- package/lib/descriptions/descriptionsitem/DescriptionsItem.d.ts +2 -1
- package/lib/dialog/Dialog.d.ts +3 -2
- package/lib/dialog/index.d.ts +1 -1
- package/lib/divider/Divider.d.ts +3 -2
- package/lib/divider/index.d.ts +1 -1
- package/lib/drawer/Drawer.d.ts +3 -2
- package/lib/drawer/index.d.ts +1 -1
- package/lib/ellipsis/Ellipsis.d.ts +7 -6
- package/lib/ellipsis/index.d.ts +1 -1
- package/lib/empty/Empty.d.ts +3 -2
- package/lib/empty/index.d.ts +1 -1
- package/lib/flex/Flex.d.ts +3 -2
- package/lib/flex/index.d.ts +1 -1
- package/lib/floatbutton/FloatButton.d.ts +3 -2
- package/lib/floatbutton/index.d.ts +3 -3
- package/lib/gradienttext/GradientText.d.ts +3 -2
- package/lib/gradienttext/index.d.ts +1 -1
- package/lib/grid/col/Col.d.ts +3 -2
- package/lib/grid/col/index.d.ts +1 -1
- package/lib/grid/row/Row.d.ts +3 -2
- package/lib/grid/row/index.d.ts +1 -1
- package/lib/image/Image.d.ts +3 -2
- package/lib/image/index.d.ts +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/input/Input.d.ts +3 -2
- package/lib/input/index.d.ts +1 -1
- package/lib/inputnumber/InputNumber.d.ts +3 -2
- package/lib/inputnumber/index.d.ts +1 -1
- package/lib/inputsearch/InputSearch.d.ts +3 -2
- package/lib/inputsearch/index.d.ts +1 -1
- package/lib/list/list/List.d.ts +3 -2
- package/lib/list/list/index.d.ts +1 -1
- package/lib/list/listitem/ListItem.d.ts +3 -2
- package/lib/list/listitem/index.d.ts +1 -1
- package/lib/message/Message.d.ts +1 -1
- package/lib/message/index.d.ts +1 -1
- package/lib/modal/Modal.d.ts +3 -2
- package/lib/modal/index.d.ts +1 -1
- package/lib/notification/Notification.d.ts +1 -1
- package/lib/notification/index.d.ts +1 -1
- package/lib/numberanimation/NumberAnimation.d.ts +1 -1
- package/lib/numberanimation/index.d.ts +1 -1
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/index.d.ts +1 -1
- package/lib/popconfirm/Popconfirm.d.ts +7 -6
- package/lib/popconfirm/index.d.ts +1 -1
- package/lib/popover/Popover.d.ts +3 -2
- package/lib/popover/index.d.ts +1 -1
- package/lib/progress/Progress.d.ts +2 -1
- package/lib/qrcode/QRCode.d.ts +1 -1
- package/lib/qrcode/index.d.ts +1 -1
- package/lib/radio/Radio.d.ts +3 -2
- package/lib/radio/index.d.ts +1 -1
- package/lib/rate/Rate.d.ts +3 -2
- package/lib/rate/index.d.ts +1 -1
- package/lib/result/Result.d.ts +3 -2
- package/lib/result/index.d.ts +1 -1
- package/lib/scrollbar/Scrollbar.d.ts +3 -2
- package/lib/scrollbar/index.d.ts +1 -1
- package/lib/segmented/Segmented.d.ts +3 -2
- package/lib/segmented/index.d.ts +1 -1
- package/lib/select/Select.d.ts +1 -1
- package/lib/select/index.d.ts +1 -1
- package/lib/skeleton/Skeleton.d.ts +2 -1
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/space/Space.d.ts +3 -2
- package/lib/space/index.d.ts +1 -1
- package/lib/spin/Spin.d.ts +3 -2
- package/lib/spin/index.d.ts +1 -1
- package/lib/statistic/Statistic.d.ts +3 -2
- package/lib/statistic/index.d.ts +1 -1
- package/lib/steps/Steps.d.ts +1 -1
- package/lib/steps/index.d.ts +1 -1
- package/lib/swiper/Swiper.css +1 -1
- package/lib/swiper/Swiper.vue.cjs +1 -1
- package/lib/swiper/Swiper.vue2.cjs +1 -1
- package/lib/switch/Switch.d.ts +3 -2
- package/lib/switch/index.d.ts +1 -1
- package/lib/table/Table.d.ts +31 -30
- package/lib/table/index.d.ts +17 -17
- package/lib/tabs/Tabs.d.ts +4 -3
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tag/Tag.d.ts +2 -1
- package/lib/textarea/Textarea.d.ts +1 -1
- package/lib/textarea/index.d.ts +1 -1
- package/lib/timeline/Timeline.d.ts +3 -2
- package/lib/timeline/index.d.ts +1 -1
- package/lib/tooltip/Tooltip.d.ts +3 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/upload/Upload.d.ts +9 -8
- package/lib/upload/index.d.ts +1 -1
- package/lib/utils/resolvers.cjs +1 -0
- package/{es/utils/resolver.d.ts → lib/utils/resolvers.d.ts} +5 -0
- package/lib/video/Video.d.ts +1 -1
- package/lib/video/index.d.ts +1 -1
- package/lib/waterfall/Waterfall.d.ts +1 -1
- package/lib/waterfall/index.d.ts +1 -1
- package/lib/watermark/Watermark.d.ts +3 -2
- package/lib/watermark/index.d.ts +1 -1
- package/package.json +15 -16
- package/es/utils/resolver.js +0 -93
- package/lib/utils/resolver.cjs +0 -1
- /package/es/node_modules/.pnpm/{@vuepic_vue-datepicker@10.0.0_vue@3.5.13_typescript@5.6.3_ → @vuepic_vue-datepicker@10.0.0_vue@3.5.13_typescript@5.7.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -0
- /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@10.0.0_vue@3.5.13_typescript@5.6.3_ → @vuepic_vue-datepicker@10.0.0_vue@3.5.13_typescript@5.7.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -0
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- The component library is implemented with `Vue@3.5.13`+ `TypeScript@5.
|
|
19
|
+
- The component library is implemented with `Vue@3.5.13`+ `TypeScript@5.7.2` + `Vite@6.0.5` + `Less@4.2.1`.
|
|
20
20
|
- Currently, it includes `63` basic UI components and `16` utility functions, with continuous exploration and updates ongoing...
|
|
21
21
|
- What's more, they are all treeshakable.
|
|
22
22
|
- All the stuff in Vue Amazing UI is written in TypeScript. It can work with your typescript project seamlessly.
|
|
@@ -52,7 +52,7 @@ app.use(VueAmazingUI)
|
|
|
52
52
|
app.mount('#app')
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
**Global Registration
|
|
55
|
+
**Global Partial Registration**
|
|
56
56
|
|
|
57
57
|
*In this form, only components imported will be bundled.*
|
|
58
58
|
|
|
@@ -68,20 +68,84 @@ app.use(Button).use(Tag)
|
|
|
68
68
|
app.mount('#app')
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
**Local Registration
|
|
71
|
+
**Local Registration**
|
|
72
72
|
|
|
73
73
|
*In this form, only components imported will be bundled.*
|
|
74
74
|
|
|
75
75
|
```vue
|
|
76
76
|
<script setup lang="ts">
|
|
77
|
-
import { Button } from 'vue-amazing-ui'
|
|
77
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
78
78
|
import 'vue-amazing-ui/es/button/Button.css'
|
|
79
|
+
import 'vue-amazing-ui/es/tag/Tag.css'
|
|
79
80
|
</script>
|
|
80
81
|
<template>
|
|
81
82
|
<Button>button</Button>
|
|
83
|
+
<Tag>tag</Tag>
|
|
82
84
|
</template>
|
|
83
85
|
```
|
|
84
86
|
|
|
87
|
+
**Auto Import Styles (Recommended)**
|
|
88
|
+
|
|
89
|
+
Use the [`vite-plugin-style-import`](https://github.com/vbenjs/vite-plugin-style-import) plugin to automatically import component styles on demand. The plugin will automatically parse the used components in the template and import their styles.
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
pnpm add vite-plugin-style-import -D
|
|
93
|
+
# or
|
|
94
|
+
npm install vite-plugin-style-import -D
|
|
95
|
+
# or
|
|
96
|
+
yarn add vite-plugin-style-import -D
|
|
97
|
+
# or
|
|
98
|
+
bun add vite-plugin-style-import -D
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
// vite.config.ts
|
|
103
|
+
import { defineConfig } from 'vite'
|
|
104
|
+
import vue from '@vitejs/plugin-vue'
|
|
105
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import'
|
|
106
|
+
// Automatically import component styles
|
|
107
|
+
import { VueAmazingUIStyleResolve } from 'vue-amazing-ui'
|
|
108
|
+
|
|
109
|
+
// https://vitejs.dev/config/
|
|
110
|
+
export default defineConfig({
|
|
111
|
+
plugins: [
|
|
112
|
+
vue(),
|
|
113
|
+
// imports component library styles on demand
|
|
114
|
+
createStyleImportPlugin({
|
|
115
|
+
resolves:[
|
|
116
|
+
VueAmazingUIStyleResolve()
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Then, you can use all components of `vue-amazing-ui` in your code without needing to manually import component styles, whether you are using global partial registration or local registration.
|
|
124
|
+
|
|
125
|
+
- Global Partial Registration
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { createApp } from 'vue'
|
|
129
|
+
import App from './App.vue'
|
|
130
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
131
|
+
|
|
132
|
+
const app = createApp(App)
|
|
133
|
+
app.use(Button).use(Tag)
|
|
134
|
+
app.mount('#app')
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- Local Registration
|
|
138
|
+
|
|
139
|
+
```vue
|
|
140
|
+
<script setup lang="ts">
|
|
141
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
142
|
+
</script>
|
|
143
|
+
<template>
|
|
144
|
+
<Button>button</Button>
|
|
145
|
+
<Tag>tag</Tag>
|
|
146
|
+
</template>
|
|
147
|
+
```
|
|
148
|
+
|
|
85
149
|
**Automatic On-Demand Import (Strongly Recommended)**
|
|
86
150
|
|
|
87
151
|
Use the [`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components) plugin to automatically import components on demand. The plugin will automatically parse the components used in the template and import the components and styles.
|
package/README.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## 特性
|
|
18
18
|
|
|
19
|
-
- 组件库采用 `Vue@3.5.13`+ `TypeScript@5.
|
|
19
|
+
- 组件库采用 `Vue@3.5.13`+ `TypeScript@5.7.2` + `Vite@6.0.5` + `Less@4.2.1` 实现
|
|
20
20
|
- 目前共包含 `63` 个基础 `UI` 组件以及 `16` 个工具函数,并且持续探索更新中...
|
|
21
21
|
- 顺便一提,它们全都可以 `treeshaking`
|
|
22
22
|
- `Vue Amazing UI` 全量使用 `TypeScript` 编写,和你的 `TypeScript` 项目无缝衔接
|
|
@@ -68,20 +68,84 @@ app.use(Button).use(Tag)
|
|
|
68
68
|
app.mount('#app')
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
**局部注册组件**
|
|
72
72
|
|
|
73
73
|
*这种情况下,也只有导入的组件才会被打包*
|
|
74
74
|
|
|
75
75
|
```vue
|
|
76
76
|
<script setup lang="ts">
|
|
77
|
-
import { Button } from 'vue-amazing-ui'
|
|
77
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
78
78
|
import 'vue-amazing-ui/es/button/Button.css'
|
|
79
|
+
import 'vue-amazing-ui/es/tag/Tag.css'
|
|
79
80
|
</script>
|
|
80
81
|
<template>
|
|
81
82
|
<Button>button</Button>
|
|
83
|
+
<Tag>tag</Tag>
|
|
82
84
|
</template>
|
|
83
85
|
```
|
|
84
86
|
|
|
87
|
+
**自动引入样式(推荐)**
|
|
88
|
+
|
|
89
|
+
使用 [`vite-plugin-style-import`](https://github.com/vbenjs/vite-plugin-style-import) 插件来按需自动引入组件样式,插件会自动解析模板中的使用到的组件,并导入其样式
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
pnpm add vite-plugin-style-import -D
|
|
93
|
+
# or
|
|
94
|
+
npm install vite-plugin-style-import -D
|
|
95
|
+
# or
|
|
96
|
+
yarn add vite-plugin-style-import -D
|
|
97
|
+
# or
|
|
98
|
+
bun add vite-plugin-style-import -D
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
// vite.config.ts
|
|
103
|
+
import { defineConfig } from 'vite'
|
|
104
|
+
import vue from '@vitejs/plugin-vue'
|
|
105
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import'
|
|
106
|
+
// 自动引入组件样式
|
|
107
|
+
import { VueAmazingUIStyleResolve } from 'vue-amazing-ui'
|
|
108
|
+
|
|
109
|
+
// https://vitejs.dev/config/
|
|
110
|
+
export default defineConfig({
|
|
111
|
+
plugins: [
|
|
112
|
+
vue(),
|
|
113
|
+
// imports component library styles on demand
|
|
114
|
+
createStyleImportPlugin({
|
|
115
|
+
resolves:[
|
|
116
|
+
VueAmazingUIStyleResolve()
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
然后,你可以在代码中引入使用 `vue-amazing-ui` 的所有组件,无论是全局部分注册的方式,还是局部注册的方式,都无需再额外引入组件样式
|
|
124
|
+
|
|
125
|
+
- 全局部分注册
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { createApp } from 'vue'
|
|
129
|
+
import App from './App.vue'
|
|
130
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
131
|
+
|
|
132
|
+
const app = createApp(App)
|
|
133
|
+
app.use(Button).use(Tag)
|
|
134
|
+
app.mount('#app')
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
- 局部注册
|
|
138
|
+
|
|
139
|
+
```vue
|
|
140
|
+
<script setup lang="ts">
|
|
141
|
+
import { Button, Tag } from 'vue-amazing-ui'
|
|
142
|
+
</script>
|
|
143
|
+
<template>
|
|
144
|
+
<Button>button</Button>
|
|
145
|
+
<Tag>tag</Tag>
|
|
146
|
+
</template>
|
|
147
|
+
```
|
|
148
|
+
|
|
85
149
|
**自动按需引入(强烈推荐)**
|
|
86
150
|
|
|
87
151
|
使用 [`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components) 插件来按需自动加载组件,插件会自动解析模板中的使用到的组件,并导入组件和样式
|