vue-amazing-ui 2.2.7 → 2.2.8

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.
Files changed (284) hide show
  1. package/README.md +286 -286
  2. package/README.zh-CN.md +286 -286
  3. package/dist/amazing-icon.svg +24 -24
  4. package/dist/index.iife.js +29 -29
  5. package/dist/index.js +2002 -1999
  6. package/dist/index.umd.cjs +24 -24
  7. package/dist/style.css +1 -1
  8. package/es/alert/Alert.css +1 -1
  9. package/es/alert/Alert.vue.js +2 -2
  10. package/es/amazing-icon.svg +24 -24
  11. package/es/avatar/Avatar.css +1 -1
  12. package/es/avatar/Avatar.vue.js +2 -2
  13. package/es/backtop/BackTop.css +1 -1
  14. package/es/backtop/BackTop.vue.js +2 -2
  15. package/es/backtop/BackTop.vue2.js +63 -60
  16. package/es/badge/Badge.css +1 -1
  17. package/es/badge/Badge.vue.js +3 -3
  18. package/es/breadcrumb/Breadcrumb.css +1 -1
  19. package/es/breadcrumb/Breadcrumb.vue.js +2 -2
  20. package/es/button/Button.css +1 -1
  21. package/es/button/Button.vue.js +1 -1
  22. package/es/calendar/Calendar.css +1 -1
  23. package/es/calendar/Calendar.vue.js +2 -2
  24. package/es/card/Card.css +1 -1
  25. package/es/card/Card.vue.js +3 -3
  26. package/es/carousel/Carousel.css +1 -1
  27. package/es/carousel/Carousel.vue.js +2 -2
  28. package/es/cascader/Cascader.css +1 -1
  29. package/es/cascader/Cascader.vue.js +2 -2
  30. package/es/checkbox/Checkbox.css +1 -1
  31. package/es/checkbox/Checkbox.vue.js +2 -2
  32. package/es/collapse/Collapse.css +1 -1
  33. package/es/collapse/Collapse.vue.js +2 -2
  34. package/es/colorpicker/ColorPicker.css +1 -1
  35. package/es/colorpicker/ColorPicker.vue.js +1 -1
  36. package/es/countdown/Countdown.css +1 -1
  37. package/es/countdown/Countdown.vue.js +2 -2
  38. package/es/datepicker/DatePicker.css +1 -1
  39. package/es/datepicker/DatePicker.vue.js +2 -2
  40. package/es/descriptions/descriptions/Descriptions.css +1 -1
  41. package/es/descriptions/descriptions/Descriptions.vue.js +2 -2
  42. package/es/descriptions/descriptionsitem/DescriptionsItem.css +1 -1
  43. package/es/descriptions/descriptionsitem/DescriptionsItem.vue.js +2 -2
  44. package/es/dialog/Dialog.css +1 -1
  45. package/es/dialog/Dialog.vue.js +2 -2
  46. package/es/divider/Divider.css +1 -1
  47. package/es/divider/Divider.vue.js +2 -2
  48. package/es/drawer/Drawer.css +1 -1
  49. package/es/drawer/Drawer.vue.js +2 -2
  50. package/es/ellipsis/Ellipsis.css +1 -1
  51. package/es/ellipsis/Ellipsis.vue.js +1 -1
  52. package/es/empty/Empty.css +1 -1
  53. package/es/empty/Empty.vue.js +2 -2
  54. package/es/empty/Empty.vue2.js +13 -13
  55. package/es/flex/Flex.css +1 -1
  56. package/es/flex/Flex.vue.js +2 -2
  57. package/es/floatbutton/FloatButton.css +1 -1
  58. package/es/floatbutton/FloatButton.vue.js +2 -2
  59. package/es/gradienttext/GradientText.css +1 -1
  60. package/es/gradienttext/GradientText.vue.js +1 -1
  61. package/es/grid/col/Col.css +1 -1
  62. package/es/grid/col/Col.vue.js +2 -2
  63. package/es/grid/row/Row.css +1 -1
  64. package/es/grid/row/Row.vue.js +1 -1
  65. package/es/image/Image.css +1 -1
  66. package/es/image/Image.vue.js +2 -2
  67. package/es/input/Input.css +1 -1
  68. package/es/input/Input.vue.js +2 -2
  69. package/es/inputnumber/InputNumber.css +1 -1
  70. package/es/inputnumber/InputNumber.vue.js +1 -1
  71. package/es/inputsearch/InputSearch.css +1 -1
  72. package/es/inputsearch/InputSearch.vue.js +2 -2
  73. package/es/list/list/List.css +1 -1
  74. package/es/list/list/List.vue.js +2 -2
  75. package/es/list/listitem/ListItem.css +1 -1
  76. package/es/list/listitem/ListItem.vue.js +2 -2
  77. package/es/loadingbar/LoadingBar.css +1 -1
  78. package/es/loadingbar/LoadingBar.vue.js +3 -3
  79. package/es/message/Message.css +1 -1
  80. package/es/message/Message.vue.js +2 -2
  81. package/es/modal/Modal.css +1 -1
  82. package/es/modal/Modal.vue.js +2 -2
  83. package/es/notification/Notification.css +1 -1
  84. package/es/notification/Notification.vue.js +1 -1
  85. package/es/pagination/Pagination.css +1 -1
  86. package/es/pagination/Pagination.vue.js +2 -2
  87. package/es/popconfirm/Popconfirm.css +1 -1
  88. package/es/popconfirm/Popconfirm.vue.js +2 -2
  89. package/es/popover/Popover.css +1 -1
  90. package/es/popover/Popover.vue.js +1 -1
  91. package/es/progress/Progress.css +1 -1
  92. package/es/progress/Progress.vue.js +2 -2
  93. package/es/qrcode/QRCode.css +1 -1
  94. package/es/qrcode/QRCode.vue.js +1 -1
  95. package/es/radio/Radio.css +1 -1
  96. package/es/radio/Radio.vue.js +1 -1
  97. package/es/rate/Rate.css +1 -1
  98. package/es/rate/Rate.vue.js +2 -2
  99. package/es/result/Result.css +1 -1
  100. package/es/result/Result.vue.js +2 -2
  101. package/es/result/Result.vue2.js +49 -49
  102. package/es/scrollbar/Scrollbar.css +1 -1
  103. package/es/scrollbar/Scrollbar.vue.js +1 -1
  104. package/es/segmented/Segmented.css +1 -1
  105. package/es/segmented/Segmented.vue.js +2 -2
  106. package/es/select/Select.css +1 -1
  107. package/es/select/Select.vue.js +2 -2
  108. package/es/skeleton/Skeleton.css +1 -1
  109. package/es/skeleton/Skeleton.vue.js +2 -2
  110. package/es/slider/Slider.css +1 -1
  111. package/es/slider/Slider.vue.js +2 -2
  112. package/es/space/Space.css +1 -1
  113. package/es/space/Space.vue.js +3 -3
  114. package/es/spin/Spin.css +1 -1
  115. package/es/spin/Spin.vue.js +2 -2
  116. package/es/spin/Spin.vue2.js +31 -31
  117. package/es/statistic/Statistic.css +1 -1
  118. package/es/statistic/Statistic.vue.js +2 -2
  119. package/es/steps/Steps.css +1 -1
  120. package/es/steps/Steps.vue.js +2 -2
  121. package/es/swiper/Swiper.css +1 -1
  122. package/es/swiper/Swiper.vue.js +1 -1
  123. package/es/switch/Switch.css +1 -1
  124. package/es/switch/Switch.vue.js +1 -1
  125. package/es/table/Table.css +1 -1
  126. package/es/table/Table.vue.js +2 -2
  127. package/es/tabs/Tabs.css +1 -1
  128. package/es/tabs/Tabs.vue.js +2 -2
  129. package/es/tag/Tag.css +1 -1
  130. package/es/tag/Tag.vue.js +1 -1
  131. package/es/textarea/Textarea.css +1 -1
  132. package/es/textarea/Textarea.vue.js +4 -4
  133. package/es/textscroll/TextScroll.css +1 -1
  134. package/es/textscroll/TextScroll.vue.js +1 -1
  135. package/es/timeline/Timeline.css +1 -1
  136. package/es/timeline/Timeline.vue.js +2 -2
  137. package/es/tooltip/Tooltip.css +1 -1
  138. package/es/tooltip/Tooltip.vue.js +2 -2
  139. package/es/upload/Upload.css +1 -1
  140. package/es/upload/Upload.vue.js +2 -2
  141. package/es/video/Video.css +1 -1
  142. package/es/video/Video.vue.js +1 -1
  143. package/es/video/Video.vue2.js +1 -1
  144. package/es/waterfall/Waterfall.css +1 -1
  145. package/es/waterfall/Waterfall.vue.js +4 -4
  146. package/lib/alert/Alert.css +1 -1
  147. package/lib/alert/Alert.vue.cjs +1 -1
  148. package/lib/amazing-icon.svg +24 -24
  149. package/lib/avatar/Avatar.css +1 -1
  150. package/lib/avatar/Avatar.vue.cjs +1 -1
  151. package/lib/backtop/BackTop.css +1 -1
  152. package/lib/backtop/BackTop.vue.cjs +1 -1
  153. package/lib/backtop/BackTop.vue2.cjs +2 -2
  154. package/lib/badge/Badge.css +1 -1
  155. package/lib/badge/Badge.vue.cjs +1 -1
  156. package/lib/breadcrumb/Breadcrumb.css +1 -1
  157. package/lib/breadcrumb/Breadcrumb.vue.cjs +1 -1
  158. package/lib/button/Button.css +1 -1
  159. package/lib/button/Button.vue.cjs +1 -1
  160. package/lib/calendar/Calendar.css +1 -1
  161. package/lib/calendar/Calendar.vue.cjs +1 -1
  162. package/lib/card/Card.css +1 -1
  163. package/lib/card/Card.vue.cjs +1 -1
  164. package/lib/carousel/Carousel.css +1 -1
  165. package/lib/carousel/Carousel.vue.cjs +1 -1
  166. package/lib/cascader/Cascader.css +1 -1
  167. package/lib/cascader/Cascader.vue.cjs +1 -1
  168. package/lib/checkbox/Checkbox.css +1 -1
  169. package/lib/checkbox/Checkbox.vue.cjs +1 -1
  170. package/lib/collapse/Collapse.css +1 -1
  171. package/lib/collapse/Collapse.vue.cjs +1 -1
  172. package/lib/colorpicker/ColorPicker.css +1 -1
  173. package/lib/colorpicker/ColorPicker.vue.cjs +1 -1
  174. package/lib/countdown/Countdown.css +1 -1
  175. package/lib/countdown/Countdown.vue.cjs +1 -1
  176. package/lib/datepicker/DatePicker.css +1 -1
  177. package/lib/datepicker/DatePicker.vue.cjs +1 -1
  178. package/lib/descriptions/descriptions/Descriptions.css +1 -1
  179. package/lib/descriptions/descriptions/Descriptions.vue.cjs +1 -1
  180. package/lib/descriptions/descriptionsitem/DescriptionsItem.css +1 -1
  181. package/lib/descriptions/descriptionsitem/DescriptionsItem.vue.cjs +1 -1
  182. package/lib/dialog/Dialog.css +1 -1
  183. package/lib/dialog/Dialog.vue.cjs +1 -1
  184. package/lib/divider/Divider.css +1 -1
  185. package/lib/divider/Divider.vue.cjs +1 -1
  186. package/lib/drawer/Drawer.css +1 -1
  187. package/lib/drawer/Drawer.vue.cjs +1 -1
  188. package/lib/ellipsis/Ellipsis.css +1 -1
  189. package/lib/ellipsis/Ellipsis.vue.cjs +1 -1
  190. package/lib/empty/Empty.css +1 -1
  191. package/lib/empty/Empty.vue.cjs +1 -1
  192. package/lib/empty/Empty.vue2.cjs +1 -1
  193. package/lib/flex/Flex.css +1 -1
  194. package/lib/flex/Flex.vue.cjs +1 -1
  195. package/lib/floatbutton/FloatButton.css +1 -1
  196. package/lib/floatbutton/FloatButton.vue.cjs +1 -1
  197. package/lib/gradienttext/GradientText.css +1 -1
  198. package/lib/gradienttext/GradientText.vue.cjs +1 -1
  199. package/lib/grid/col/Col.css +1 -1
  200. package/lib/grid/col/Col.vue.cjs +1 -1
  201. package/lib/grid/row/Row.css +1 -1
  202. package/lib/grid/row/Row.vue.cjs +1 -1
  203. package/lib/image/Image.css +1 -1
  204. package/lib/image/Image.vue.cjs +1 -1
  205. package/lib/input/Input.css +1 -1
  206. package/lib/input/Input.vue.cjs +1 -1
  207. package/lib/inputnumber/InputNumber.css +1 -1
  208. package/lib/inputnumber/InputNumber.vue.cjs +1 -1
  209. package/lib/inputsearch/InputSearch.css +1 -1
  210. package/lib/inputsearch/InputSearch.vue.cjs +1 -1
  211. package/lib/list/list/List.css +1 -1
  212. package/lib/list/list/List.vue.cjs +1 -1
  213. package/lib/list/listitem/ListItem.css +1 -1
  214. package/lib/list/listitem/ListItem.vue.cjs +1 -1
  215. package/lib/loadingbar/LoadingBar.css +1 -1
  216. package/lib/loadingbar/LoadingBar.vue.cjs +1 -1
  217. package/lib/message/Message.css +1 -1
  218. package/lib/message/Message.vue.cjs +1 -1
  219. package/lib/modal/Modal.css +1 -1
  220. package/lib/modal/Modal.vue.cjs +1 -1
  221. package/lib/notification/Notification.css +1 -1
  222. package/lib/notification/Notification.vue.cjs +1 -1
  223. package/lib/pagination/Pagination.css +1 -1
  224. package/lib/pagination/Pagination.vue.cjs +1 -1
  225. package/lib/popconfirm/Popconfirm.css +1 -1
  226. package/lib/popconfirm/Popconfirm.vue.cjs +1 -1
  227. package/lib/popover/Popover.css +1 -1
  228. package/lib/popover/Popover.vue.cjs +1 -1
  229. package/lib/progress/Progress.css +1 -1
  230. package/lib/progress/Progress.vue.cjs +1 -1
  231. package/lib/qrcode/QRCode.css +1 -1
  232. package/lib/qrcode/QRCode.vue.cjs +1 -1
  233. package/lib/radio/Radio.css +1 -1
  234. package/lib/radio/Radio.vue.cjs +1 -1
  235. package/lib/rate/Rate.css +1 -1
  236. package/lib/rate/Rate.vue.cjs +1 -1
  237. package/lib/result/Result.css +1 -1
  238. package/lib/result/Result.vue.cjs +1 -1
  239. package/lib/result/Result.vue2.cjs +1 -1
  240. package/lib/scrollbar/Scrollbar.css +1 -1
  241. package/lib/scrollbar/Scrollbar.vue.cjs +1 -1
  242. package/lib/segmented/Segmented.css +1 -1
  243. package/lib/segmented/Segmented.vue.cjs +1 -1
  244. package/lib/select/Select.css +1 -1
  245. package/lib/select/Select.vue.cjs +1 -1
  246. package/lib/skeleton/Skeleton.css +1 -1
  247. package/lib/skeleton/Skeleton.vue.cjs +1 -1
  248. package/lib/slider/Slider.css +1 -1
  249. package/lib/slider/Slider.vue.cjs +1 -1
  250. package/lib/space/Space.css +1 -1
  251. package/lib/space/Space.vue.cjs +1 -1
  252. package/lib/spin/Spin.css +1 -1
  253. package/lib/spin/Spin.vue.cjs +1 -1
  254. package/lib/spin/Spin.vue2.cjs +2 -2
  255. package/lib/statistic/Statistic.css +1 -1
  256. package/lib/statistic/Statistic.vue.cjs +1 -1
  257. package/lib/steps/Steps.css +1 -1
  258. package/lib/steps/Steps.vue.cjs +1 -1
  259. package/lib/swiper/Swiper.css +1 -1
  260. package/lib/swiper/Swiper.vue.cjs +1 -1
  261. package/lib/switch/Switch.css +1 -1
  262. package/lib/switch/Switch.vue.cjs +1 -1
  263. package/lib/table/Table.css +1 -1
  264. package/lib/table/Table.vue.cjs +1 -1
  265. package/lib/tabs/Tabs.css +1 -1
  266. package/lib/tabs/Tabs.vue.cjs +1 -1
  267. package/lib/tag/Tag.css +1 -1
  268. package/lib/tag/Tag.vue.cjs +1 -1
  269. package/lib/textarea/Textarea.css +1 -1
  270. package/lib/textarea/Textarea.vue.cjs +1 -1
  271. package/lib/textscroll/TextScroll.css +1 -1
  272. package/lib/textscroll/TextScroll.vue.cjs +1 -1
  273. package/lib/timeline/Timeline.css +1 -1
  274. package/lib/timeline/Timeline.vue.cjs +1 -1
  275. package/lib/tooltip/Tooltip.css +1 -1
  276. package/lib/tooltip/Tooltip.vue.cjs +1 -1
  277. package/lib/upload/Upload.css +1 -1
  278. package/lib/upload/Upload.vue.cjs +1 -1
  279. package/lib/video/Video.css +1 -1
  280. package/lib/video/Video.vue.cjs +1 -1
  281. package/lib/video/Video.vue2.cjs +1 -1
  282. package/lib/waterfall/Waterfall.css +1 -1
  283. package/lib/waterfall/Waterfall.vue.cjs +1 -1
  284. package/package.json +2 -2
package/README.md CHANGED
@@ -1,286 +1,286 @@
1
- <p align="center">
2
- <a href="https://themusecatcher.github.io/vue-amazing-ui/">
3
- <img width="200" src="https://themusecatcher.github.io/vue-amazing-ui/amazing-logo.svg">
4
- </a>
5
- </p>
6
-
7
- <h1 align="center">Vue Amazing UI</h1>
8
- <p align="center">A Vue 3 Component Library</p>
9
- <p align="center">Uses TypeScript, All components are single-file components (SFC), Supports tree shaking.</p>
10
- <p align="center">Kinda Interesting</p>
11
- <p align="center">English | <a href="README.zh-CN.md">中文</a></p>
12
-
13
- ## Documentation
14
-
15
- [Vue Amazing UI](https://themusecatcher.github.io/vue-amazing-ui/)
16
-
17
- ## Features
18
-
19
- - The component library is implemented with `Vue@3.5.13`+ `TypeScript@5.7.3` + `Vite@6.1.1` + `Less@4.2.2`.
20
- - Currently, it includes `65` basic UI components and `16` utility functions, with continuous exploration and updates ongoing...
21
- - What's more, they are all treeshakable.
22
- - All the stuff in Vue Amazing UI is written in TypeScript. It can work with your typescript project seamlessly.
23
- - All components are built in single file component `SFC` style and can be used independently.
24
- - Ready to use out of the box, no fuss.
25
-
26
- ## Installation
27
-
28
- ```sh
29
- pnpm add vue-amazing-ui
30
- # or
31
- npm install vue-amazing-ui
32
- # or
33
- yarn add vue-amazing-ui
34
- # or
35
- bun add vue-amazing-ui
36
- ```
37
-
38
- ## Use Components
39
-
40
- **Global Registration All Components (Not Recommended)**
41
-
42
- *No tree-shaking. Bundle will have redundant codes.*
43
-
44
- ```ts
45
- import { createApp } from 'vue'
46
- import App from './App.vue'
47
- import VueAmazingUI from 'vue-amazing-ui'
48
- import 'vue-amazing-ui/css'
49
-
50
- const app = createApp(App)
51
- app.use(VueAmazingUI)
52
- app.mount('#app')
53
- ```
54
-
55
- **Global Partial Registration**
56
-
57
- *In this form, only the imported components will be bundled.*
58
-
59
- ```ts
60
- import { createApp } from 'vue'
61
- import App from './App.vue'
62
- import { Button, Tag } from 'vue-amazing-ui'
63
- import 'vue-amazing-ui/es/button/Button.css'
64
- import 'vue-amazing-ui/es/tag/Tag.css'
65
-
66
- const app = createApp(App)
67
- app.use(Button).use(Tag)
68
- app.mount('#app')
69
- ```
70
-
71
- **Local Registration**
72
-
73
- *In this form, only the imported components will be bundled as well.*
74
-
75
- ```vue
76
- <script setup lang="ts">
77
- import { Button, Tag } from 'vue-amazing-ui'
78
- import 'vue-amazing-ui/es/button/Button.css'
79
- import 'vue-amazing-ui/es/tag/Tag.css'
80
- </script>
81
- <template>
82
- <Button>button</Button>
83
- <Tag>tag</Tag>
84
- </template>
85
- ```
86
-
87
- **Both Global Partial Registration and Local Registration require manually importing the global default styles of the component library (Automatic On-Demand Import is recommended).**
88
-
89
- ```ts
90
- import { createApp } from 'vue'
91
- import App from './App.vue'
92
- import 'vue-amazing-ui/es/style/global.css' // 引入全局默认样式
93
-
94
- const app = createApp(App)
95
- app.mount('#app')
96
- ```
97
-
98
- **Automatic On-Demand Import (Strongly Recommended)**
99
-
100
- 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.
101
-
102
- ```sh
103
- pnpm add unplugin-vue-components -D
104
- # or
105
- npm install unplugin-vue-components -D
106
- # or
107
- yarn add unplugin-vue-components -D
108
- # or
109
- bun add unplugin-vue-components -D
110
- ```
111
-
112
- ```ts
113
- // vite.config.ts
114
- import { defineConfig } from 'vite'
115
- import vue from '@vitejs/plugin-vue'
116
- import Components from 'unplugin-vue-components/vite'
117
- // vue-amazing-ui on-demand import
118
- import { VueAmazingUIResolver } from 'vue-amazing-ui'
119
-
120
- // https://vitejs.dev/config/
121
- export default defineConfig({
122
- plugins: [
123
- vue(),
124
- Components({
125
- resolvers: [
126
- // auto import components from VueAmazingUI
127
- VueAmazingUIResolver({
128
- cjs: false // whether use commonjs build, default false
129
- })
130
- ]
131
- })
132
- ]
133
- })
134
- ```
135
-
136
- Then, you can directly use all components from `vue-amazing-ui` in your code.
137
-
138
- ```vue
139
- <template>
140
- <Button>button</Button>
141
- <Tag>tag</Tag>
142
- </template>
143
- ```
144
-
145
- ## Use Types
146
-
147
- *All types can be directly imported and used from `vue-amazing-ui` without any additional installation.*
148
-
149
- ```vue
150
- <script setup lang="ts">
151
- import { ref } from 'vue'
152
- import type { ButtonProps } from 'vue-amazing-ui'
153
- const shape = ref<ButtonProps['shape']>('default')
154
- </script>
155
- <template>
156
- <Button :shape="shape">button</Button>
157
- </template>
158
- ```
159
-
160
- ## Use Functions
161
-
162
- ```vue
163
- <script setup lang="ts">
164
- import {
165
- dateFormat,
166
- formatNumber,
167
- rafTimeout,
168
- cancelRaf,
169
- throttle,
170
- debounce,
171
- add,
172
- downloadFile,
173
- toggleDark,
174
- useEventListener,
175
- useMutationObserver,
176
- useScroll,
177
- useFps,
178
- useMediaQuery,
179
- useResizeObserver,
180
- useSlotsExist
181
- } from 'vue-amazing-ui'
182
- </script>
183
- ```
184
-
185
- ## Project
186
-
187
- - Get the project code
188
-
189
- ```sh
190
- git clone https://github.com/themusecatcher/vue-amazing-ui.git
191
- ```
192
-
193
- - Install dependencies
194
-
195
- ```sh
196
- cd vue-amazing-ui
197
-
198
- pnpm i
199
- ```
200
-
201
- - Run project
202
-
203
- ```sh
204
- pnpm dev
205
- ```
206
-
207
- - Run docs
208
-
209
- ```sh
210
- docs:dev
211
- ```
212
-
213
- ## Blogs
214
-
215
- [My CSDN Blogs](https://blog.csdn.net/Dandrose)
216
-
217
- ## Sponsorship
218
-
219
- `Vue Amazing UI` is an open-source project licensed under the `MIT` license, and it is completely free to use. All work on the component library and documentation is completed by the author alone, and the development and iteration process has been challenging. For the healthy and sustainable development of the component library, your support and sponsorship are greatly appreciated.
220
-
221
- #### [Become a Sponsor](https://themusecatcher.github.io/vue-amazing-ui/sponsor/charge.html)
222
-
223
- ## Sponsors 🫡
224
-
225
- All sponsors will be listed here, thank you very much for your support and sponsorship ❤️❤️
226
-
227
- <a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="https://github.com/themusecatcher.png" alt="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatars/1.jpeg" alt="WeChat@Ant" /> <a href="https://github.com/nizhensh-i" target="_blank"><img width="64" height="64" src="./docs/public/avatars/2.jpg" alt="GitHub@nizhensh-i"></a>
228
-
229
- ## Components
230
-
231
- Name | Description | Name | Description
232
- :-- | :-- | :-- | :--
233
- Alert | 警告提示 | Avatar | 头像
234
- BackTop | 回到顶部 | Badge | 徽标
235
- Breadcrumb | 面包屑 | Button | 按钮
236
- Calendar | 日历 | Card | 卡片
237
- Carousel | 轮播图 | Cascader | 级联选择
238
- Checkbox | 复选框 | Collapse | 折叠面板
239
- ColorPicker | 颜色选择器 | Countdown | 倒计时
240
- DatePicker | 日期选择器 | Descriptions | 描述列表
241
- Dialog | 对话框 | Divider | 分割线
242
- Drawer | 抽屉 | Ellipsis | 文本省略
243
- Empty | 空状态 | Flex | 弹性布局
244
- FloatButton | 浮动按钮 | GradientText | 渐变文字
245
- Grid | 栅格 | Image | 图片
246
- Input | 输入框 | InputNumber | 数字输入框
247
- InputSearch | 搜索框 | List | 列表
248
- LoadingBar | 加载条 | Message | 全局提示
249
- Modal | 模态框 | Notification | 通知提醒
250
- NumberAnimation | 数值动画 | Pagination | 分页
251
- Popconfirm | 弹出确认 | Popover | 气泡卡片
252
- Progress | 进度条 | QRCode | 二维码
253
- Radio | 单选框 | Rate | 评分
254
- Result | 结果 | Scrollbar | 滚动条
255
- Segmented | 分段控制器 | Select | 选择器
256
- Skeleton | 骨架屏 | Slider | 滑动输入条
257
- Space | 间距 | Spin | 加载中
258
- Statistic | 统计数值 | Steps | 步骤条
259
- Swiper | 触摸滑动插件 | Switch | 开关
260
- Table | 表格 | Tabs | 标签页
261
- Tag | 标签 | Textarea | 文本域
262
- TextScroll | 文字滚动 | Timeline | 时间轴
263
- Tooltip | 文字提示 | Upload | 上传
264
- Video | 播放器 | Waterfall | 瀑布流
265
- Watermark | 水印
266
-
267
- ## Functions
268
-
269
- Name | Description | Type
270
- :-- | :-- | :--
271
- dateFormat | Format date-time string function | (value: number &#124; string &#124; Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
272
- formatNumber | Number formatting function | (value: number &#124; string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
273
- rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) => object
274
- cancelRaf | Function to cancel the `rafTimeout` function | (raf: { id: number }) => void
275
- throttle | Throttle function | (fn: Function, delay: number = 300) => any
276
- debounce | Debounce function | (fn: Function, delay: number = 300) => any
277
- add | Addition function that eliminates precision issues in JavaScript arithmetic | (num1: number, num2: number) => number
278
- downloadFile | Function to download a file with a custom filename; if no filename is provided, it extracts the filename from the URL | (url: string, fileName?: string) => void
279
- toggleDark | Function to toggle dark mode | () => void
280
- useEventListener | Function to add and remove event listeners using Vue lifecycle hooks | (target: HTMLElement &#124; Window &#124; Document, event: string, callback: Function) => void
281
- useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref &#124; Ref[] &#124; HTMLElement &#124; HTMLElement[], callback: MutationCallback, options = {}) => object
282
- useScroll | Function to monitor the scroll position and state of a target element in real time | (target: Ref &#124; HTMLElement &#124; Window &#124; Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => object
283
- useFps | Function to monitor the browser's refresh rate (FPS) in real time | () => object
284
- useMediaQuery | Function to determine if the current environment matches a specified media query condition | (mediaQuery: string) => object
285
- useResizeObserver | Function to observe changes in the dimensions of DOM elements using `ResizeObserver` | (target: Ref &#124; Ref[] &#124; HTMLElement &#124; HTMLElement[], callback: ResizeObserverCallback, options = {}) => object
286
- useSlotsExist | Function to watch for the existence of slots with given names, supporting single slots or an array of slots | (slotsName: string &#124; string[] = 'default') => Reactive &#124; Ref\<boolean>
1
+ <p align="center">
2
+ <a href="https://themusecatcher.github.io/vue-amazing-ui/">
3
+ <img width="200" src="https://themusecatcher.github.io/vue-amazing-ui/amazing-logo.svg">
4
+ </a>
5
+ </p>
6
+
7
+ <h1 align="center">Vue Amazing UI</h1>
8
+ <p align="center">A Vue 3 Component Library</p>
9
+ <p align="center">Uses TypeScript, All components are single-file components (SFC), Supports tree shaking.</p>
10
+ <p align="center">Kinda Interesting</p>
11
+ <p align="center">English | <a href="README.zh-CN.md">中文</a></p>
12
+
13
+ ## Documentation
14
+
15
+ [Vue Amazing UI](https://themusecatcher.github.io/vue-amazing-ui/)
16
+
17
+ ## Features
18
+
19
+ - The component library is implemented with `Vue@3.5.13`+ `TypeScript@5.7.3` + `Vite@6.1.1` + `Less@4.2.2`.
20
+ - Currently, it includes `65` basic UI components and `16` utility functions, with continuous exploration and updates ongoing...
21
+ - What's more, they are all treeshakable.
22
+ - All the stuff in Vue Amazing UI is written in TypeScript. It can work with your typescript project seamlessly.
23
+ - All components are built in single file component `SFC` style and can be used independently.
24
+ - Ready to use out of the box, no fuss.
25
+
26
+ ## Installation
27
+
28
+ ```sh
29
+ pnpm add vue-amazing-ui
30
+ # or
31
+ npm install vue-amazing-ui
32
+ # or
33
+ yarn add vue-amazing-ui
34
+ # or
35
+ bun add vue-amazing-ui
36
+ ```
37
+
38
+ ## Use Components
39
+
40
+ **Global Registration All Components (Not Recommended)**
41
+
42
+ *No tree-shaking. Bundle will have redundant codes.*
43
+
44
+ ```ts
45
+ import { createApp } from 'vue'
46
+ import App from './App.vue'
47
+ import VueAmazingUI from 'vue-amazing-ui'
48
+ import 'vue-amazing-ui/css'
49
+
50
+ const app = createApp(App)
51
+ app.use(VueAmazingUI)
52
+ app.mount('#app')
53
+ ```
54
+
55
+ **Global Partial Registration**
56
+
57
+ *In this form, only the imported components will be bundled.*
58
+
59
+ ```ts
60
+ import { createApp } from 'vue'
61
+ import App from './App.vue'
62
+ import { Button, Tag } from 'vue-amazing-ui'
63
+ import 'vue-amazing-ui/es/button/Button.css'
64
+ import 'vue-amazing-ui/es/tag/Tag.css'
65
+
66
+ const app = createApp(App)
67
+ app.use(Button).use(Tag)
68
+ app.mount('#app')
69
+ ```
70
+
71
+ **Local Registration**
72
+
73
+ *In this form, only the imported components will be bundled as well.*
74
+
75
+ ```vue
76
+ <script setup lang="ts">
77
+ import { Button, Tag } from 'vue-amazing-ui'
78
+ import 'vue-amazing-ui/es/button/Button.css'
79
+ import 'vue-amazing-ui/es/tag/Tag.css'
80
+ </script>
81
+ <template>
82
+ <Button>button</Button>
83
+ <Tag>tag</Tag>
84
+ </template>
85
+ ```
86
+
87
+ **Both Global Partial Registration and Local Registration require manually importing the global default styles of the component library (Automatic On-Demand Import is recommended).**
88
+
89
+ ```ts
90
+ import { createApp } from 'vue'
91
+ import App from './App.vue'
92
+ import 'vue-amazing-ui/es/style/global.css' // 引入全局默认样式
93
+
94
+ const app = createApp(App)
95
+ app.mount('#app')
96
+ ```
97
+
98
+ **Automatic On-Demand Import (Strongly Recommended)**
99
+
100
+ 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.
101
+
102
+ ```sh
103
+ pnpm add unplugin-vue-components -D
104
+ # or
105
+ npm install unplugin-vue-components -D
106
+ # or
107
+ yarn add unplugin-vue-components -D
108
+ # or
109
+ bun add unplugin-vue-components -D
110
+ ```
111
+
112
+ ```ts
113
+ // vite.config.ts
114
+ import { defineConfig } from 'vite'
115
+ import vue from '@vitejs/plugin-vue'
116
+ import Components from 'unplugin-vue-components/vite'
117
+ // vue-amazing-ui on-demand import
118
+ import { VueAmazingUIResolver } from 'vue-amazing-ui'
119
+
120
+ // https://vitejs.dev/config/
121
+ export default defineConfig({
122
+ plugins: [
123
+ vue(),
124
+ Components({
125
+ resolvers: [
126
+ // auto import components from VueAmazingUI
127
+ VueAmazingUIResolver({
128
+ cjs: false // whether use commonjs build, default false
129
+ })
130
+ ]
131
+ })
132
+ ]
133
+ })
134
+ ```
135
+
136
+ Then, you can directly use all components from `vue-amazing-ui` in your code.
137
+
138
+ ```vue
139
+ <template>
140
+ <Button>button</Button>
141
+ <Tag>tag</Tag>
142
+ </template>
143
+ ```
144
+
145
+ ## Use Types
146
+
147
+ *All types can be directly imported and used from `vue-amazing-ui` without any additional installation.*
148
+
149
+ ```vue
150
+ <script setup lang="ts">
151
+ import { ref } from 'vue'
152
+ import type { ButtonProps } from 'vue-amazing-ui'
153
+ const shape = ref<ButtonProps['shape']>('default')
154
+ </script>
155
+ <template>
156
+ <Button :shape="shape">button</Button>
157
+ </template>
158
+ ```
159
+
160
+ ## Use Functions
161
+
162
+ ```vue
163
+ <script setup lang="ts">
164
+ import {
165
+ dateFormat,
166
+ formatNumber,
167
+ rafTimeout,
168
+ cancelRaf,
169
+ throttle,
170
+ debounce,
171
+ add,
172
+ downloadFile,
173
+ toggleDark,
174
+ useEventListener,
175
+ useMutationObserver,
176
+ useScroll,
177
+ useFps,
178
+ useMediaQuery,
179
+ useResizeObserver,
180
+ useSlotsExist
181
+ } from 'vue-amazing-ui'
182
+ </script>
183
+ ```
184
+
185
+ ## Project
186
+
187
+ - Get the project code
188
+
189
+ ```sh
190
+ git clone https://github.com/themusecatcher/vue-amazing-ui.git
191
+ ```
192
+
193
+ - Install dependencies
194
+
195
+ ```sh
196
+ cd vue-amazing-ui
197
+
198
+ pnpm i
199
+ ```
200
+
201
+ - Run project
202
+
203
+ ```sh
204
+ pnpm dev
205
+ ```
206
+
207
+ - Run docs
208
+
209
+ ```sh
210
+ docs:dev
211
+ ```
212
+
213
+ ## Blogs
214
+
215
+ [My CSDN Blogs](https://blog.csdn.net/Dandrose)
216
+
217
+ ## Sponsorship
218
+
219
+ `Vue Amazing UI` is an open-source project licensed under the `MIT` license, and it is completely free to use. All work on the component library and documentation is completed by the author alone, and the development and iteration process has been challenging. For the healthy and sustainable development of the component library, your support and sponsorship are greatly appreciated.
220
+
221
+ #### [Become a Sponsor](https://themusecatcher.github.io/vue-amazing-ui/sponsor/charge.html)
222
+
223
+ ## Sponsors 🫡
224
+
225
+ All sponsors will be listed here, thank you very much for your support and sponsorship ❤️❤️
226
+
227
+ <a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="https://github.com/themusecatcher.png" alt="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatar_1.jpeg" alt="WeChat@Ant" /> <a href="https://github.com/nizhensh-i" target="_blank"><img width="64" height="64" src="./docs/public/avatar_2.jpg" alt="GitHub@nizhensh-i"></a>
228
+
229
+ ## Components
230
+
231
+ Name | Description | Name | Description
232
+ :-- | :-- | :-- | :--
233
+ Alert | 警告提示 | Avatar | 头像
234
+ BackTop | 回到顶部 | Badge | 徽标
235
+ Breadcrumb | 面包屑 | Button | 按钮
236
+ Calendar | 日历 | Card | 卡片
237
+ Carousel | 轮播图 | Cascader | 级联选择
238
+ Checkbox | 复选框 | Collapse | 折叠面板
239
+ ColorPicker | 颜色选择器 | Countdown | 倒计时
240
+ DatePicker | 日期选择器 | Descriptions | 描述列表
241
+ Dialog | 对话框 | Divider | 分割线
242
+ Drawer | 抽屉 | Ellipsis | 文本省略
243
+ Empty | 空状态 | Flex | 弹性布局
244
+ FloatButton | 浮动按钮 | GradientText | 渐变文字
245
+ Grid | 栅格 | Image | 图片
246
+ Input | 输入框 | InputNumber | 数字输入框
247
+ InputSearch | 搜索框 | List | 列表
248
+ LoadingBar | 加载条 | Message | 全局提示
249
+ Modal | 模态框 | Notification | 通知提醒
250
+ NumberAnimation | 数值动画 | Pagination | 分页
251
+ Popconfirm | 弹出确认 | Popover | 气泡卡片
252
+ Progress | 进度条 | QRCode | 二维码
253
+ Radio | 单选框 | Rate | 评分
254
+ Result | 结果 | Scrollbar | 滚动条
255
+ Segmented | 分段控制器 | Select | 选择器
256
+ Skeleton | 骨架屏 | Slider | 滑动输入条
257
+ Space | 间距 | Spin | 加载中
258
+ Statistic | 统计数值 | Steps | 步骤条
259
+ Swiper | 触摸滑动插件 | Switch | 开关
260
+ Table | 表格 | Tabs | 标签页
261
+ Tag | 标签 | Textarea | 文本域
262
+ TextScroll | 文字滚动 | Timeline | 时间轴
263
+ Tooltip | 文字提示 | Upload | 上传
264
+ Video | 播放器 | Waterfall | 瀑布流
265
+ Watermark | 水印
266
+
267
+ ## Functions
268
+
269
+ Name | Description | Type
270
+ :-- | :-- | :--
271
+ dateFormat | Format date-time string function | (value: number &#124; string &#124; Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
272
+ formatNumber | Number formatting function | (value: number &#124; string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
273
+ rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) => object
274
+ cancelRaf | Function to cancel the `rafTimeout` function | (raf: { id: number }) => void
275
+ throttle | Throttle function | (fn: Function, delay: number = 300) => any
276
+ debounce | Debounce function | (fn: Function, delay: number = 300) => any
277
+ add | Addition function that eliminates precision issues in JavaScript arithmetic | (num1: number, num2: number) => number
278
+ downloadFile | Function to download a file with a custom filename; if no filename is provided, it extracts the filename from the URL | (url: string, fileName?: string) => void
279
+ toggleDark | Function to toggle dark mode | () => void
280
+ useEventListener | Function to add and remove event listeners using Vue lifecycle hooks | (target: HTMLElement &#124; Window &#124; Document, event: string, callback: Function) => void
281
+ useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref &#124; Ref[] &#124; HTMLElement &#124; HTMLElement[], callback: MutationCallback, options = {}) => object
282
+ useScroll | Function to monitor the scroll position and state of a target element in real time | (target: Ref &#124; HTMLElement &#124; Window &#124; Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => object
283
+ useFps | Function to monitor the browser's refresh rate (FPS) in real time | () => object
284
+ useMediaQuery | Function to determine if the current environment matches a specified media query condition | (mediaQuery: string) => object
285
+ useResizeObserver | Function to observe changes in the dimensions of DOM elements using `ResizeObserver` | (target: Ref &#124; Ref[] &#124; HTMLElement &#124; HTMLElement[], callback: ResizeObserverCallback, options = {}) => object
286
+ useSlotsExist | Function to watch for the existence of slots with given names, supporting single slots or an array of slots | (slotsName: string &#124; string[] = 'default') => Reactive &#124; Ref\<boolean>