vue-amazing-ui 2.4.13 → 2.4.15
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 +62 -62
- package/README.zh-CN.md +62 -62
- package/dist/index.iife.js +116 -116
- package/dist/index.js +5526 -5629
- package/dist/index.umd.cjs +112 -112
- package/dist/style.css +1 -1
- package/es/backtop/BackTop.css +1 -1
- package/es/backtop/BackTop.d.ts +5 -5
- package/es/backtop/BackTop.vue.js +3 -3
- package/es/backtop/BackTop.vue2.js +124 -131
- package/es/backtop/index.d.ts +5 -5
- package/es/badge/Badge.vue2.js +4 -7
- package/es/button/Button.css +1 -1
- package/es/button/Button.d.ts +1 -1
- package/es/button/index.d.ts +3 -3
- package/es/calendar/Calendar.css +1 -1
- package/es/carousel/Carousel.css +1 -1
- package/es/cascader/Cascader.d.ts +2 -2
- package/es/cascader/index.d.ts +6 -6
- package/es/checkbox/Checkbox.css +1 -1
- package/es/checkbox/Checkbox.d.ts +1 -1
- package/es/checkbox/index.d.ts +3 -3
- package/es/collapse/Collapse.vue2.js +1 -1
- package/es/colorpicker/ColorPicker.css +1 -1
- package/es/colorpicker/ColorPicker.d.ts +11 -5
- package/es/colorpicker/ColorPicker.vue2.js +68 -69
- package/es/colorpicker/index.d.ts +8 -5
- package/es/configprovider/ConfigProvider.vue.js +28 -29
- package/es/countdown/Countdown.vue2.js +3 -3
- package/es/dialog/Dialog.css +1 -1
- package/es/dialog/Dialog.vue2.js +34 -37
- package/es/drawer/Drawer.css +1 -1
- package/es/ellipsis/Ellipsis.css +1 -1
- package/es/ellipsis/Ellipsis.d.ts +10 -4
- package/es/ellipsis/Ellipsis.vue.js +2 -2
- package/es/ellipsis/Ellipsis.vue2.js +29 -29
- package/es/ellipsis/index.d.ts +5 -2
- package/es/floatbutton/FloatButton.css +1 -1
- package/es/floatbutton/FloatButton.vue.js +2 -2
- package/es/image/Image.css +1 -1
- package/es/image/Image.vue2.js +171 -178
- package/es/input/Input.css +1 -1
- package/es/input/Input.d.ts +2 -2
- package/es/input/Input.vue2.js +74 -77
- package/es/input/index.d.ts +6 -6
- package/es/inputnumber/InputNumber.css +1 -1
- package/es/inputnumber/InputNumber.d.ts +2 -2
- package/es/inputnumber/InputNumber.vue2.js +2 -4
- package/es/inputnumber/index.d.ts +6 -6
- package/es/inputsearch/InputSearch.d.ts +2 -2
- package/es/inputsearch/InputSearch.vue2.js +59 -62
- package/es/inputsearch/index.d.ts +6 -6
- package/es/modal/Modal.css +1 -1
- package/es/modal/Modal.vue2.js +60 -64
- package/es/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.18_typescript@5.9.2_/node_modules/@vuepic/vue-datepicker/dist/main.css +1 -0
- package/{lib/node_modules/.pnpm/swiper@11.2.8 → es/node_modules/.pnpm/swiper@11.2.10}/node_modules/swiper/modules/effect-cube.css +1 -1
- package/es/node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/pagination.css +1 -0
- package/es/pagination/Pagination.css +1 -1
- package/es/pagination/Pagination.d.ts +1 -1
- package/es/pagination/Pagination.vue2.js +22 -23
- package/es/pagination/index.d.ts +3 -3
- package/es/popconfirm/Popconfirm.css +1 -1
- package/es/popconfirm/Popconfirm.d.ts +10 -4
- package/es/popconfirm/Popconfirm.vue.js +1 -1
- package/es/popconfirm/Popconfirm.vue2.js +42 -40
- package/es/popconfirm/index.d.ts +5 -2
- package/es/popover/Popover.css +1 -1
- package/es/popover/Popover.vue.js +2 -2
- package/es/popover/Popover.vue2.js +15 -15
- package/es/progress/Progress.css +1 -1
- package/es/qrcode/QRCode.css +1 -1
- package/es/qrcode/QRCode.vue2.js +1 -2
- package/es/radio/Radio.css +1 -1
- package/es/radio/Radio.d.ts +1 -1
- package/es/radio/index.d.ts +3 -3
- package/es/rate/Rate.d.ts +1 -1
- package/es/rate/index.d.ts +3 -3
- package/es/scrollbar/Scrollbar.vue2.js +2 -4
- package/es/segmented/Segmented.d.ts +1 -1
- package/es/segmented/Segmented.vue2.js +38 -39
- package/es/segmented/index.d.ts +3 -3
- package/es/select/Select.css +1 -1
- package/es/select/Select.d.ts +2 -2
- package/es/select/Select.vue2.js +11 -13
- package/es/select/index.d.ts +6 -6
- package/es/skeleton/Skeleton.css +1 -1
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/Slider.vue2.js +39 -43
- package/es/slider/index.d.ts +3 -3
- package/es/swiper/Swiper.vue2.js +5 -5
- package/es/switch/Switch.css +1 -1
- package/es/table/Table.css +1 -1
- package/es/table/Table.d.ts +20 -8
- package/es/table/Table.vue.js +2 -2
- package/es/table/Table.vue2.js +826 -867
- package/es/table/index.d.ts +10 -4
- package/es/tabs/Tabs.vue2.js +114 -117
- package/es/textarea/Textarea.d.ts +2 -2
- package/es/textarea/Textarea.vue2.js +39 -41
- package/es/textarea/index.d.ts +6 -6
- package/es/textscroll/TextScroll.vue2.js +2 -4
- package/es/timeline/Timeline.css +1 -1
- package/es/timeline/Timeline.vue.js +2 -2
- package/es/tooltip/Tooltip.css +1 -1
- package/es/tooltip/Tooltip.d.ts +4 -2
- package/es/tooltip/Tooltip.vue.js +2 -2
- package/es/tooltip/Tooltip.vue2.js +200 -188
- package/es/tooltip/index.d.ts +4 -1
- package/es/upload/Upload.css +1 -1
- package/es/upload/Upload.d.ts +1 -1
- package/es/upload/Upload.vue2.js +84 -86
- package/es/upload/index.d.ts +3 -3
- package/es/utils/index.d.ts +1 -1
- package/es/utils/index.js +160 -163
- package/es/utils/resolver.js +14 -14
- package/es/video/Video.css +1 -1
- package/es/video/Video.vue2.js +19 -20
- package/es/waterfall/Waterfall.css +1 -1
- package/es/waterfall/Waterfall.vue.js +1 -1
- package/es/waterfall/Waterfall.vue2.js +1 -4
- package/es/watermark/Watermark.vue.js +41 -56
- package/lib/backtop/BackTop.css +1 -1
- package/lib/backtop/BackTop.d.ts +5 -5
- package/lib/backtop/BackTop.vue.cjs +1 -1
- package/lib/backtop/BackTop.vue2.cjs +22 -22
- package/lib/backtop/index.d.ts +5 -5
- package/lib/badge/Badge.vue2.cjs +1 -1
- package/lib/button/Button.css +1 -1
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/index.d.ts +3 -3
- package/lib/calendar/Calendar.css +1 -1
- package/lib/carousel/Carousel.css +1 -1
- package/lib/cascader/Cascader.d.ts +2 -2
- package/lib/cascader/index.d.ts +6 -6
- package/lib/checkbox/Checkbox.css +1 -1
- package/lib/checkbox/Checkbox.d.ts +1 -1
- package/lib/checkbox/index.d.ts +3 -3
- package/lib/collapse/Collapse.vue2.cjs +1 -1
- package/lib/colorpicker/ColorPicker.css +1 -1
- package/lib/colorpicker/ColorPicker.d.ts +11 -5
- package/lib/colorpicker/ColorPicker.vue2.cjs +2 -2
- package/lib/colorpicker/index.d.ts +8 -5
- package/lib/configprovider/ConfigProvider.vue.cjs +1 -1
- package/lib/countdown/Countdown.vue2.cjs +1 -1
- package/lib/dialog/Dialog.css +1 -1
- package/lib/dialog/Dialog.vue2.cjs +1 -1
- package/lib/drawer/Drawer.css +1 -1
- package/lib/ellipsis/Ellipsis.css +1 -1
- package/lib/ellipsis/Ellipsis.d.ts +10 -4
- package/lib/ellipsis/Ellipsis.vue.cjs +1 -1
- package/lib/ellipsis/Ellipsis.vue2.cjs +1 -1
- package/lib/ellipsis/index.d.ts +5 -2
- package/lib/floatbutton/FloatButton.css +1 -1
- package/lib/floatbutton/FloatButton.vue.cjs +1 -1
- package/lib/image/Image.css +1 -1
- package/lib/image/Image.vue2.cjs +1 -1
- package/lib/input/Input.css +1 -1
- package/lib/input/Input.d.ts +2 -2
- package/lib/input/Input.vue2.cjs +6 -6
- package/lib/input/index.d.ts +6 -6
- package/lib/inputnumber/InputNumber.css +1 -1
- package/lib/inputnumber/InputNumber.d.ts +2 -2
- package/lib/inputnumber/InputNumber.vue2.cjs +6 -6
- package/lib/inputnumber/index.d.ts +6 -6
- package/lib/inputsearch/InputSearch.d.ts +2 -2
- package/lib/inputsearch/InputSearch.vue2.cjs +6 -6
- package/lib/inputsearch/index.d.ts +6 -6
- package/lib/modal/Modal.css +1 -1
- package/lib/modal/Modal.vue2.cjs +2 -2
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.18_typescript@5.9.2_/node_modules/@vuepic/vue-datepicker/dist/main.css +1 -0
- package/{es/node_modules/.pnpm/swiper@11.2.8 → lib/node_modules/.pnpm/swiper@11.2.10}/node_modules/swiper/modules/effect-cube.css +1 -1
- package/lib/node_modules/.pnpm/swiper@11.2.10/node_modules/swiper/modules/pagination.css +1 -0
- package/lib/pagination/Pagination.css +1 -1
- package/lib/pagination/Pagination.d.ts +1 -1
- package/lib/pagination/Pagination.vue2.cjs +1 -1
- package/lib/pagination/index.d.ts +3 -3
- package/lib/popconfirm/Popconfirm.css +1 -1
- package/lib/popconfirm/Popconfirm.d.ts +10 -4
- package/lib/popconfirm/Popconfirm.vue.cjs +1 -1
- package/lib/popconfirm/Popconfirm.vue2.cjs +6 -6
- package/lib/popconfirm/index.d.ts +5 -2
- package/lib/popover/Popover.css +1 -1
- package/lib/popover/Popover.vue.cjs +1 -1
- package/lib/popover/Popover.vue2.cjs +1 -1
- package/lib/progress/Progress.css +1 -1
- package/lib/qrcode/QRCode.css +1 -1
- package/lib/qrcode/QRCode.vue2.cjs +1 -1
- package/lib/radio/Radio.css +1 -1
- package/lib/radio/Radio.d.ts +1 -1
- package/lib/radio/index.d.ts +3 -3
- package/lib/rate/Rate.d.ts +1 -1
- package/lib/rate/index.d.ts +3 -3
- package/lib/scrollbar/Scrollbar.vue2.cjs +1 -1
- package/lib/segmented/Segmented.d.ts +1 -1
- package/lib/segmented/Segmented.vue2.cjs +1 -1
- package/lib/segmented/index.d.ts +3 -3
- package/lib/select/Select.css +1 -1
- package/lib/select/Select.d.ts +2 -2
- package/lib/select/Select.vue2.cjs +2 -2
- package/lib/select/index.d.ts +6 -6
- package/lib/skeleton/Skeleton.css +1 -1
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/Slider.vue2.cjs +2 -2
- package/lib/slider/index.d.ts +3 -3
- package/lib/swiper/Swiper.vue2.cjs +1 -1
- package/lib/switch/Switch.css +1 -1
- package/lib/table/Table.css +1 -1
- package/lib/table/Table.d.ts +20 -8
- package/lib/table/Table.vue.cjs +1 -1
- package/lib/table/Table.vue2.cjs +1 -1
- package/lib/table/index.d.ts +10 -4
- package/lib/tabs/Tabs.vue2.cjs +1 -1
- package/lib/textarea/Textarea.d.ts +2 -2
- package/lib/textarea/Textarea.vue2.cjs +6 -6
- package/lib/textarea/index.d.ts +6 -6
- package/lib/textscroll/TextScroll.vue2.cjs +1 -1
- package/lib/timeline/Timeline.css +1 -1
- package/lib/timeline/Timeline.vue.cjs +1 -1
- package/lib/tooltip/Tooltip.css +1 -1
- package/lib/tooltip/Tooltip.d.ts +4 -2
- package/lib/tooltip/Tooltip.vue.cjs +1 -1
- package/lib/tooltip/Tooltip.vue2.cjs +1 -1
- package/lib/tooltip/index.d.ts +4 -1
- package/lib/upload/Upload.css +1 -1
- package/lib/upload/Upload.d.ts +1 -1
- package/lib/upload/Upload.vue2.cjs +1 -1
- package/lib/upload/index.d.ts +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/resolver.cjs +1 -1
- package/lib/video/Video.css +1 -1
- package/lib/video/Video.vue2.cjs +2 -2
- package/lib/waterfall/Waterfall.css +1 -1
- package/lib/waterfall/Waterfall.vue.cjs +1 -1
- package/lib/waterfall/Waterfall.vue2.cjs +1 -1
- package/lib/watermark/Watermark.vue.cjs +1 -1
- package/package.json +41 -20
- package/es/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.16_typescript@5.8.3_/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -1
- package/es/node_modules/.pnpm/swiper@11.2.8/node_modules/swiper/modules/pagination.css +0 -1
- package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.16_typescript@5.8.3_/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -1
- package/lib/node_modules/.pnpm/swiper@11.2.8/node_modules/swiper/modules/pagination.css +0 -1
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-cards.css +0 -0
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-creative.css +0 -0
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-fade.css +0 -0
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-flip.css +0 -0
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/navigation.css +0 -0
- /package/es/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/swiper.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-cards.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-creative.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-fade.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/effect-flip.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/modules/navigation.css +0 -0
- /package/lib/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.10}/node_modules/swiper/swiper.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.
|
|
19
|
+
- The component library is implemented with `Vue@3.5.18`+ `TypeScript@5.9.2` + `Vite@6.3.5` + `Less@4.4.0`.
|
|
20
20
|
- Currently, it includes `67` basic UI components and `18` utility functions, with continuous exploration and updates ongoing...
|
|
21
21
|
- Theme Customizable, all you need is to provide a theme color, then all the stuffs will be done by me.
|
|
22
22
|
- By the way, they are all treeshakable.
|
|
@@ -40,7 +40,7 @@ bun add vue-amazing-ui
|
|
|
40
40
|
|
|
41
41
|
**Global Registration All Components (Not Recommended)**
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
_No tree-shaking. Bundle will have redundant codes._
|
|
44
44
|
|
|
45
45
|
```ts
|
|
46
46
|
import { createApp } from 'vue'
|
|
@@ -55,7 +55,7 @@ app.mount('#app')
|
|
|
55
55
|
|
|
56
56
|
**Global Partial Registration**
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
_In this form, only the imported components will be bundled._
|
|
59
59
|
|
|
60
60
|
```ts
|
|
61
61
|
import { createApp } from 'vue'
|
|
@@ -71,7 +71,7 @@ app.mount('#app')
|
|
|
71
71
|
|
|
72
72
|
**Local Registration**
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
_In this form, only the imported components will be bundled as well._
|
|
75
75
|
|
|
76
76
|
```vue
|
|
77
77
|
<script setup lang="ts">
|
|
@@ -145,7 +145,7 @@ Then, you can directly use all components from `vue-amazing-ui` in your code.
|
|
|
145
145
|
|
|
146
146
|
## Use Types
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
_All types can be directly imported and used from `vue-amazing-ui` without any additional installation._
|
|
149
149
|
|
|
150
150
|
```vue
|
|
151
151
|
<script setup lang="ts">
|
|
@@ -210,7 +210,7 @@ pnpm dev
|
|
|
210
210
|
- Run docs
|
|
211
211
|
|
|
212
212
|
```sh
|
|
213
|
-
docs:dev
|
|
213
|
+
pnpm docs:dev
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
## Blogs
|
|
@@ -231,62 +231,62 @@ All sponsors will be listed here, thank you very much for your support and spons
|
|
|
231
231
|
|
|
232
232
|
## Components
|
|
233
233
|
|
|
234
|
-
Name
|
|
235
|
-
|
|
236
|
-
Alert
|
|
237
|
-
BackTop
|
|
238
|
-
Breadcrumb
|
|
239
|
-
Calendar
|
|
240
|
-
Carousel
|
|
241
|
-
Checkbox
|
|
242
|
-
ColorPicker
|
|
243
|
-
Countdown
|
|
244
|
-
Descriptions
|
|
245
|
-
Divider
|
|
246
|
-
Ellipsis
|
|
247
|
-
Flex
|
|
248
|
-
GradientText
|
|
249
|
-
Highlight
|
|
250
|
-
Input
|
|
251
|
-
InputSearch
|
|
252
|
-
LoadingBar
|
|
253
|
-
Modal
|
|
254
|
-
NumberAnimation | 数值动画
|
|
255
|
-
Popconfirm
|
|
256
|
-
Progress
|
|
257
|
-
Radio
|
|
258
|
-
Result
|
|
259
|
-
Segmented
|
|
260
|
-
Skeleton
|
|
261
|
-
Space
|
|
262
|
-
Statistic
|
|
263
|
-
Swiper
|
|
264
|
-
Table
|
|
265
|
-
Tag
|
|
266
|
-
TextScroll
|
|
267
|
-
Tooltip
|
|
268
|
-
Video
|
|
269
|
-
Watermark
|
|
234
|
+
| Name | Description | Name | Description |
|
|
235
|
+
| :-------------- | :---------- | :------------- | :---------- |
|
|
236
|
+
| Alert | 警告提示 | Avatar | 头像 |
|
|
237
|
+
| BackTop | 回到顶部 | Badge | 徽标 |
|
|
238
|
+
| Breadcrumb | 面包屑 | Button | 按钮 |
|
|
239
|
+
| Calendar | 日历 | Card | 卡片 |
|
|
240
|
+
| Carousel | 轮播图 | Cascader | 级联选择 |
|
|
241
|
+
| Checkbox | 复选框 | Collapse | 折叠面板 |
|
|
242
|
+
| ColorPicker | 颜色选择器 | ConfigProvider | 全局化配置 |
|
|
243
|
+
| Countdown | 倒计时 | DatePicker | 日期选择器 |
|
|
244
|
+
| Descriptions | 描述列表 | Dialog | 对话框 |
|
|
245
|
+
| Divider | 分割线 | Drawer | 抽屉 |
|
|
246
|
+
| Ellipsis | 文本省略 | Empty | 空状态 |
|
|
247
|
+
| Flex | 弹性布局 | FloatButton | 浮动按钮 |
|
|
248
|
+
| GradientText | 渐变文字 | Grid | 栅格 |
|
|
249
|
+
| Highlight | 高亮文本 | Image | 图片 |
|
|
250
|
+
| Input | 输入框 | InputNumber | 数字输入框 |
|
|
251
|
+
| InputSearch | 搜索框 | List | 列表 |
|
|
252
|
+
| LoadingBar | 加载条 | Message | 全局提示 |
|
|
253
|
+
| Modal | 模态框 | Notification | 通知提醒 |
|
|
254
|
+
| NumberAnimation | 数值动画 | Pagination | 分页 |
|
|
255
|
+
| Popconfirm | 弹出确认 | Popover | 气泡卡片 |
|
|
256
|
+
| Progress | 进度条 | QRCode | 二维码 |
|
|
257
|
+
| Radio | 单选框 | Rate | 评分 |
|
|
258
|
+
| Result | 结果 | Scrollbar | 滚动条 |
|
|
259
|
+
| Segmented | 分段控制器 | Select | 选择器 |
|
|
260
|
+
| Skeleton | 骨架屏 | Slider | 滑动输入条 |
|
|
261
|
+
| Space | 间距 | Spin | 加载中 |
|
|
262
|
+
| Statistic | 统计数值 | Steps | 步骤条 |
|
|
263
|
+
| Swiper | 触摸滑动 | Switch | 开关 |
|
|
264
|
+
| Table | 表格 | Tabs | 标签页 |
|
|
265
|
+
| Tag | 标签 | Textarea | 文本域 |
|
|
266
|
+
| TextScroll | 文字滚动 | Timeline | 时间轴 |
|
|
267
|
+
| Tooltip | 文字提示 | Upload | 上传 |
|
|
268
|
+
| Video | 播放器 | Waterfall | 瀑布流 |
|
|
269
|
+
| Watermark | 水印 |
|
|
270
270
|
|
|
271
271
|
## Functions
|
|
272
272
|
|
|
273
|
-
Name | Description | Type
|
|
274
|
-
:-- | :-- | :--
|
|
275
|
-
dateFormat | Format date-time string function | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
|
|
276
|
-
formatNumber | Number formatting function | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
|
|
277
|
-
rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number }
|
|
278
|
-
cancelRaf | Function to cancel the `rafTimeout` function | (raf: { id: number }) => void
|
|
279
|
-
throttle | Throttle function | (fn: Function, delay: number = 300) => Function
|
|
280
|
-
debounce | Debounce function | (fn: Function, delay: number = 300) => Function
|
|
281
|
-
add | Addition function that eliminates precision issues in JavaScript arithmetic | (num1: number, num2: number) => number
|
|
282
|
-
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
|
|
283
|
-
toggleDark | Function to toggle dark mode | () => void
|
|
284
|
-
useEventListener | Function to add and remove event listeners using Vue lifecycle hooks | (target: HTMLElement | Window | Document, event: string, callback: Function) => void
|
|
285
|
-
useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) => { start: \() => void
|
|
286
|
-
useScroll | Function to monitor the scroll position and state of a target element in real time | (target: Ref | HTMLElement | Window | Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => { x: Ref\<number
|
|
287
|
-
useFps | Function to monitor the browser's refresh rate (FPS) in real time | () => { fps: Ref\<number> }
|
|
288
|
-
useMediaQuery | Function to determine if the current environment matches a specified media query condition | (mediaQuery: string) => { match: Ref\<boolean> }
|
|
289
|
-
useResizeObserver | Function to observe changes in the dimensions of DOM elements using `ResizeObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options = {}) => { start: \() => void
|
|
290
|
-
useSlotsExist | Function to watch for the existence of slots with given names, supporting single slots or an array of slots | <T extends string | string[] = 'default'>(slotsName: T) => T extends string ? ComputedRef\<boolean> : Reactive\<Record\<string, ComputedRef\<boolean>>>
|
|
291
|
-
useInject | A function that uses injection to obtain color palettes and shadow color | (key: string) => { colorPalettes: Ref\<string[]
|
|
292
|
-
useOptionsSupported | Checks if the browser supports the given event listener options | (prop: 'capture' | 'once' | 'passive' | 'signal') => { isSupported: Ref\<boolean> }
|
|
273
|
+
| Name | Description | Type |
|
|
274
|
+
| :-- | :-- | :-- |
|
|
275
|
+
| dateFormat | Format date-time string function | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string |
|
|
276
|
+
| formatNumber | Number formatting function | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string |
|
|
277
|
+
| rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number } |
|
|
278
|
+
| cancelRaf | Function to cancel the `rafTimeout` function | (raf: { id: number }) => void |
|
|
279
|
+
| throttle | Throttle function | (fn: Function, delay: number = 300) => Function |
|
|
280
|
+
| debounce | Debounce function | (fn: Function, delay: number = 300) => Function |
|
|
281
|
+
| add | Addition function that eliminates precision issues in JavaScript arithmetic | (num1: number, num2: number) => number |
|
|
282
|
+
| 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 |
|
|
283
|
+
| toggleDark | Function to toggle dark mode | () => void |
|
|
284
|
+
| useEventListener | Function to add and remove event listeners using Vue lifecycle hooks | (target: HTMLElement | Window | Document, event: string, callback: Function) => void |
|
|
285
|
+
| useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options: object = {}) => { start: \() => void, stop: \() => void } |
|
|
286
|
+
| useScroll | Function to monitor the scroll position and state of a target element in real time | (target: Ref | HTMLElement | Window | Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => { x: Ref\<number>, xScrollMax: Ref\<number>, y: Ref\<number>, yScrollMax: Ref\<number>, isScrolling: Ref\<boolean>, left: Ref\<boolean>, right: Ref\<boolean>, top: Ref\<boolean>, bottom: Ref\<boolean> } |
|
|
287
|
+
| useFps | Function to monitor the browser's refresh rate (FPS) in real time | () => { fps: Ref\<number> } |
|
|
288
|
+
| useMediaQuery | Function to determine if the current environment matches a specified media query condition | (mediaQuery: string) => { match: Ref\<boolean> } |
|
|
289
|
+
| useResizeObserver | Function to observe changes in the dimensions of DOM elements using `ResizeObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options: object = {}) => { start: \() => void, stop: \() => void } |
|
|
290
|
+
| useSlotsExist | Function to watch for the existence of slots with given names, supporting single slots or an array of slots | <T extends string | string[] = 'default'>(slotsName: T) => T extends string ? ComputedRef\<boolean> : Reactive\<Record\<string, ComputedRef\<boolean>>> |
|
|
291
|
+
| useInject | A function that uses injection to obtain color palettes and shadow color | (key: string) => { colorPalettes: Ref\<string[]>, shadowColor: Ref\<string> } |
|
|
292
|
+
| useOptionsSupported | Checks if the browser supports the given event listener options | (prop: 'capture' | 'once' | 'passive' | 'signal') => { isSupported: Ref\<boolean> } |
|
package/README.zh-CN.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## 特性
|
|
18
18
|
|
|
19
|
-
- 组件库采用 `Vue@3.5.
|
|
19
|
+
- 组件库采用 `Vue@3.5.18`+ `TypeScript@5.9.2` + `Vite@6.3.5` + `Less@4.4.0` 实现
|
|
20
20
|
- 目前共包含 `67` 个基础 `UI` 组件以及 `18` 个工具函数,并且持续探索更新中...
|
|
21
21
|
- 主题可调,你只需提供一个主题色,剩下的都交给我
|
|
22
22
|
- 顺便一提,它们全都可以 `treeshaking`
|
|
@@ -40,7 +40,7 @@ bun add vue-amazing-ui
|
|
|
40
40
|
|
|
41
41
|
**全局完整注册(不推荐)**
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
_失去 `tree-shaking` 的能力,打包后有冗余代码_
|
|
44
44
|
|
|
45
45
|
```ts
|
|
46
46
|
import { createApp } from 'vue'
|
|
@@ -55,7 +55,7 @@ app.mount('#app')
|
|
|
55
55
|
|
|
56
56
|
**全局部分注册**
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
_这种情况下,只有导入的组件才会被打包_
|
|
59
59
|
|
|
60
60
|
```ts
|
|
61
61
|
import { createApp } from 'vue'
|
|
@@ -71,7 +71,7 @@ app.mount('#app')
|
|
|
71
71
|
|
|
72
72
|
**局部注册组件**
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
_这种情况下,也只有导入的组件才会被打包_
|
|
75
75
|
|
|
76
76
|
```vue
|
|
77
77
|
<script setup lang="ts">
|
|
@@ -145,7 +145,7 @@ export default defineConfig({
|
|
|
145
145
|
|
|
146
146
|
## 使用类型
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
_所有类型均可直接从 `vue-amazing-ui` 中引入使用,无需任何额外安装_
|
|
149
149
|
|
|
150
150
|
```vue
|
|
151
151
|
<script setup lang="ts">
|
|
@@ -210,7 +210,7 @@ pnpm dev
|
|
|
210
210
|
- 启动文档
|
|
211
211
|
|
|
212
212
|
```sh
|
|
213
|
-
docs:dev
|
|
213
|
+
pnpm docs:dev
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
## 博客
|
|
@@ -231,62 +231,62 @@ docs:dev
|
|
|
231
231
|
|
|
232
232
|
## 组件
|
|
233
233
|
|
|
234
|
-
名称
|
|
235
|
-
|
|
236
|
-
Alert
|
|
237
|
-
BackTop
|
|
238
|
-
Breadcrumb
|
|
239
|
-
Calendar
|
|
240
|
-
Carousel
|
|
241
|
-
Checkbox
|
|
242
|
-
ColorPicker
|
|
243
|
-
Countdown
|
|
244
|
-
Descriptions
|
|
245
|
-
Divider
|
|
246
|
-
Ellipsis
|
|
247
|
-
Flex
|
|
248
|
-
GradientText
|
|
249
|
-
Highlight
|
|
250
|
-
Input
|
|
251
|
-
InputSearch
|
|
252
|
-
LoadingBar
|
|
253
|
-
Modal
|
|
254
|
-
NumberAnimation | 数值动画
|
|
255
|
-
Popconfirm
|
|
256
|
-
Progress
|
|
257
|
-
Radio
|
|
258
|
-
Result
|
|
259
|
-
Segmented
|
|
260
|
-
Skeleton
|
|
261
|
-
Space
|
|
262
|
-
Statistic
|
|
263
|
-
Swiper
|
|
264
|
-
Table
|
|
265
|
-
Tag
|
|
266
|
-
TextScroll
|
|
267
|
-
Tooltip
|
|
268
|
-
Video
|
|
269
|
-
Watermark
|
|
234
|
+
| 名称 | 说明 | 名称 | 说明 |
|
|
235
|
+
| :-------------- | :--------- | :------------- | :--------- |
|
|
236
|
+
| Alert | 警告提示 | Avatar | 头像 |
|
|
237
|
+
| BackTop | 回到顶部 | Badge | 徽标 |
|
|
238
|
+
| Breadcrumb | 面包屑 | Button | 按钮 |
|
|
239
|
+
| Calendar | 日历 | Card | 卡片 |
|
|
240
|
+
| Carousel | 轮播图 | Cascader | 级联选择 |
|
|
241
|
+
| Checkbox | 复选框 | Collapse | 折叠面板 |
|
|
242
|
+
| ColorPicker | 颜色选择器 | ConfigProvider | 全局化配置 |
|
|
243
|
+
| Countdown | 倒计时 | DatePicker | 日期选择器 |
|
|
244
|
+
| Descriptions | 描述列表 | Dialog | 对话框 |
|
|
245
|
+
| Divider | 分割线 | Drawer | 抽屉 |
|
|
246
|
+
| Ellipsis | 文本省略 | Empty | 空状态 |
|
|
247
|
+
| Flex | 弹性布局 | FloatButton | 浮动按钮 |
|
|
248
|
+
| GradientText | 渐变文字 | Grid | 栅格 |
|
|
249
|
+
| Highlight | 高亮文本 | Image | 图片 |
|
|
250
|
+
| Input | 输入框 | InputNumber | 数字输入框 |
|
|
251
|
+
| InputSearch | 搜索框 | List | 列表 |
|
|
252
|
+
| LoadingBar | 加载条 | Message | 全局提示 |
|
|
253
|
+
| Modal | 模态框 | Notification | 通知提醒 |
|
|
254
|
+
| NumberAnimation | 数值动画 | Pagination | 分页 |
|
|
255
|
+
| Popconfirm | 弹出确认 | Popover | 气泡卡片 |
|
|
256
|
+
| Progress | 进度条 | QRCode | 二维码 |
|
|
257
|
+
| Radio | 单选框 | Rate | 评分 |
|
|
258
|
+
| Result | 结果 | Scrollbar | 滚动条 |
|
|
259
|
+
| Segmented | 分段控制器 | Select | 选择器 |
|
|
260
|
+
| Skeleton | 骨架屏 | Slider | 滑动输入条 |
|
|
261
|
+
| Space | 间距 | Spin | 加载中 |
|
|
262
|
+
| Statistic | 统计数值 | Steps | 步骤条 |
|
|
263
|
+
| Swiper | 触摸滑动 | Switch | 开关 |
|
|
264
|
+
| Table | 表格 | Tabs | 标签页 |
|
|
265
|
+
| Tag | 标签 | Textarea | 文本域 |
|
|
266
|
+
| TextScroll | 文字滚动 | Timeline | 时间轴 |
|
|
267
|
+
| Tooltip | 文字提示 | Upload | 上传 |
|
|
268
|
+
| Video | 播放器 | Waterfall | 瀑布流 |
|
|
269
|
+
| Watermark | 水印 |
|
|
270
270
|
|
|
271
271
|
## 工具函数
|
|
272
272
|
|
|
273
|
-
名称 | 说明 | 类型
|
|
274
|
-
:-- | :-- | :--
|
|
275
|
-
dateFormat | 格式化日期时间字符串函数 | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
|
|
276
|
-
formatNumber | 数字格式化函数 | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
|
|
277
|
-
rafTimeout | 使用 `requestAnimationFrame` 实现的延迟 `setTimeout` 或间隔 `setInterval` 调用函数 | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number }
|
|
278
|
-
cancelRaf | 用于取消 `rafTimeout` 函数 | (raf: { id: number }) => void
|
|
279
|
-
throttle | 节流函数 | (fn: Function, delay: number = 300) => Function
|
|
280
|
-
debounce | 防抖函数 | (fn: Function, delay: number = 300) => Function
|
|
281
|
-
add | 消除 `js` 加减精度问题的加法函数 | (num1: number, num2: number) => number
|
|
282
|
-
downloadFile | 下载文件并自定义文件名,未传 `fileName` 时,从文件地址中自动提取文件名称 | (url: string, fileName?: string) => void
|
|
283
|
-
toggleDark | 一键切换暗黑模式函数 | () => void
|
|
284
|
-
useEventListener | 使用 `Vue` 的生命周期钩子添加和移除事件监听器 | (target: HTMLElement | Window | Document, event: string, callback: Function) => void
|
|
285
|
-
useMutationObserver | 使用 `MutationObserver` 观察 `DOM` 元素的变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) => { start: \() => void
|
|
286
|
-
useScroll | 实时监测目标元素滚动位置及状态 | (target: Ref | HTMLElement | Window | Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => { x: Ref\<number
|
|
287
|
-
useFps | 实时监测浏览器刷新率FPS | () => { fps: Ref\<number> }
|
|
288
|
-
useMediaQuery | 使用媒体查询来判断当前环境是否符合指定的媒体查询条件 | (mediaQuery: string) => { match: Ref\<boolean> }
|
|
289
|
-
useResizeObserver | 使用 `ResizeObserver` 观察 `DOM` 元素尺寸变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options = {}) => { start: \() => void
|
|
290
|
-
useSlotsExist | 监听给定名称或名称数组的插槽是否存在,支持监听单个插槽或一组插槽的存在 | <T extends string | string[] = 'default'>(slotsName: T) => T extends string ? ComputedRef\<boolean> : Reactive\<Record\<string, ComputedRef\<boolean>>>
|
|
291
|
-
useInject | 使用依赖注入的函数,用于获取颜色调色板和阴影颜色 | (key: string) => { colorPalettes: Ref\<string[]
|
|
292
|
-
useOptionsSupported | 检查浏览器是否支持给定的事件监听器选项 | (prop: 'capture' | 'once' | 'passive' | 'signal') => { isSupported: Ref\<boolean> }
|
|
273
|
+
| 名称 | 说明 | 类型 |
|
|
274
|
+
| :-- | :-- | :-- |
|
|
275
|
+
| dateFormat | 格式化日期时间字符串函数 | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string |
|
|
276
|
+
| formatNumber | 数字格式化函数 | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string |
|
|
277
|
+
| rafTimeout | 使用 `requestAnimationFrame` 实现的延迟 `setTimeout` 或间隔 `setInterval` 调用函数 | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number } |
|
|
278
|
+
| cancelRaf | 用于取消 `rafTimeout` 函数 | (raf: { id: number }) => void |
|
|
279
|
+
| throttle | 节流函数 | (fn: Function, delay: number = 300) => Function |
|
|
280
|
+
| debounce | 防抖函数 | (fn: Function, delay: number = 300) => Function |
|
|
281
|
+
| add | 消除 `js` 加减精度问题的加法函数 | (num1: number, num2: number) => number |
|
|
282
|
+
| downloadFile | 下载文件并自定义文件名,未传 `fileName` 时,从文件地址中自动提取文件名称 | (url: string, fileName?: string) => void |
|
|
283
|
+
| toggleDark | 一键切换暗黑模式函数 | () => void |
|
|
284
|
+
| useEventListener | 使用 `Vue` 的生命周期钩子添加和移除事件监听器 | (target: HTMLElement | Window | Document, event: string, callback: Function) => void |
|
|
285
|
+
| useMutationObserver | 使用 `MutationObserver` 观察 `DOM` 元素的变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options: object = {}) => { start: \() => void, stop: \() => void } |
|
|
286
|
+
| useScroll | 实时监测目标元素滚动位置及状态 | (target: Ref | HTMLElement | Window | Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) => { x: Ref\<number>, xScrollMax: Ref\<number>, y: Ref\<number>, yScrollMax: Ref\<number>, isScrolling: Ref\<boolean>, left: Ref\<boolean>, right: Ref\<boolean>, top: Ref\<boolean>, bottom: Ref\<boolean> } |
|
|
287
|
+
| useFps | 实时监测浏览器刷新率FPS | () => { fps: Ref\<number> } |
|
|
288
|
+
| useMediaQuery | 使用媒体查询来判断当前环境是否符合指定的媒体查询条件 | (mediaQuery: string) => { match: Ref\<boolean> } |
|
|
289
|
+
| useResizeObserver | 使用 `ResizeObserver` 观察 `DOM` 元素尺寸变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options: object = {}) => { start: \() => void, stop: \() => void } |
|
|
290
|
+
| useSlotsExist | 监听给定名称或名称数组的插槽是否存在,支持监听单个插槽或一组插槽的存在 | <T extends string | string[] = 'default'>(slotsName: T) => T extends string ? ComputedRef\<boolean> : Reactive\<Record\<string, ComputedRef\<boolean>>> |
|
|
291
|
+
| useInject | 使用依赖注入的函数,用于获取颜色调色板和阴影颜色 | (key: string) => { colorPalettes: Ref\<string[]>, shadowColor: Ref\<string> } |
|
|
292
|
+
| useOptionsSupported | 检查浏览器是否支持给定的事件监听器选项 | (prop: 'capture' | 'once' | 'passive' | 'signal') => { isSupported: Ref\<boolean> } |
|