vue-amazing-ui 2.4.8 → 2.4.9
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 +15 -13
- package/README.zh-CN.md +15 -13
- package/dist/index.iife.js +52 -52
- package/dist/index.js +4557 -4534
- package/dist/index.umd.cjs +66 -66
- package/dist/style.css +1 -1
- package/es/backtop/BackTop.css +1 -1
- package/es/backtop/BackTop.vue.js +2 -2
- package/es/backtop/BackTop.vue2.js +40 -36
- package/es/dialog/Dialog.css +1 -1
- package/es/dialog/Dialog.vue.js +2 -2
- package/es/dialog/Dialog.vue2.js +86 -85
- package/es/index.d.ts +1 -1
- package/es/index.js +143 -142
- package/es/modal/Modal.css +1 -1
- package/es/modal/Modal.vue.js +3 -3
- package/es/modal/Modal.vue2.js +132 -132
- package/es/tooltip/Tooltip.css +1 -1
- package/es/tooltip/Tooltip.vue.js +2 -2
- package/es/tooltip/Tooltip.vue2.js +81 -77
- package/es/utils/index.d.ts +27 -20
- package/es/utils/index.js +150 -135
- package/lib/backtop/BackTop.css +1 -1
- package/lib/backtop/BackTop.vue.cjs +1 -1
- package/lib/backtop/BackTop.vue2.cjs +2 -2
- package/lib/dialog/Dialog.css +1 -1
- package/lib/dialog/Dialog.vue.cjs +1 -1
- package/lib/dialog/Dialog.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/modal/Modal.css +1 -1
- package/lib/modal/Modal.vue.cjs +1 -1
- package/lib/modal/Modal.vue2.cjs +3 -3
- package/lib/tooltip/Tooltip.css +1 -1
- package/lib/tooltip/Tooltip.vue.cjs +1 -1
- package/lib/tooltip/Tooltip.vue2.cjs +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +27 -20
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
- The component library is implemented with `Vue@3.5.14`+ `TypeScript@5.8.3` + `Vite@6.3.5` + `Less@4.3.0`.
|
|
20
|
-
- Currently, it includes `67` basic UI components and `
|
|
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.
|
|
23
23
|
- All the stuff in Vue Amazing UI is written in TypeScript. It can work with your typescript project seamlessly.
|
|
@@ -179,7 +179,8 @@ import {
|
|
|
179
179
|
useMediaQuery,
|
|
180
180
|
useResizeObserver,
|
|
181
181
|
useSlotsExist,
|
|
182
|
-
useInject
|
|
182
|
+
useInject,
|
|
183
|
+
useOptionsSupported
|
|
183
184
|
} from 'vue-amazing-ui'
|
|
184
185
|
</script>
|
|
185
186
|
```
|
|
@@ -226,7 +227,7 @@ docs:dev
|
|
|
226
227
|
|
|
227
228
|
All sponsors will be listed here, thank you very much for your support and sponsorship ❤️
|
|
228
229
|
|
|
229
|
-
<a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="./docs/public/avatar.png" alt="GitHub@themusecatcher" title="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatar_1.jpeg" alt="WeChat@Ant" title="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" title="GitHub@nizhensh-i"></a> <a href="https://github.com/beijin1949" target="_blank"><img width="64" height="64" src="./docs/public/avatar_3.png" alt="GitHub@beijin1949" title="GitHub@beijin1949"></a> <a href="https://github.com/JinZemin" target="_blank"><img width="64" height="64" src="./docs/public/avatar_4.png" alt="GitHub@JinZemin" title="GitHub@JinZemin"></a>
|
|
230
|
+
<a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="./docs/public/avatar.png" alt="GitHub@themusecatcher" title="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatar_1.jpeg" alt="WeChat@Ant" title="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" title="GitHub@nizhensh-i"></a> <a href="https://github.com/beijin1949" target="_blank"><img width="64" height="64" src="./docs/public/avatar_3.png" alt="GitHub@beijin1949" title="GitHub@beijin1949"></a> <a href="https://github.com/JinZemin" target="_blank"><img width="64" height="64" src="./docs/public/avatar_4.png" alt="GitHub@JinZemin" title="GitHub@JinZemin"></a> <a href="hhttps://github.com/ye5840" target="_blank"><img width="64" height="64" src="./docs/public/avatar_5.png" alt="GitHub@ye5840" title="GitHub@ye5840"></a>
|
|
230
231
|
|
|
231
232
|
## Components
|
|
232
233
|
|
|
@@ -273,18 +274,19 @@ Name | Description | Type
|
|
|
273
274
|
:-- | :-- | :--
|
|
274
275
|
dateFormat | Format date-time string function | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
|
|
275
276
|
formatNumber | Number formatting function | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
|
|
276
|
-
rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) =>
|
|
277
|
+
rafTimeout | Function to implement `setTimeout` or `setInterval` using `requestAnimationFrame` | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number }
|
|
277
278
|
cancelRaf | Function to cancel the `rafTimeout` function | (raf: { id: number }) => void
|
|
278
|
-
throttle | Throttle function | (fn: Function, delay: number = 300) =>
|
|
279
|
-
debounce | Debounce function | (fn: Function, delay: number = 300) =>
|
|
279
|
+
throttle | Throttle function | (fn: Function, delay: number = 300) => Function
|
|
280
|
+
debounce | Debounce function | (fn: Function, delay: number = 300) => Function
|
|
280
281
|
add | Addition function that eliminates precision issues in JavaScript arithmetic | (num1: number, num2: number) => number
|
|
281
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
|
|
282
283
|
toggleDark | Function to toggle dark mode | () => void
|
|
283
284
|
useEventListener | Function to add and remove event listeners using Vue lifecycle hooks | (target: HTMLElement | Window | Document, event: string, callback: Function) => void
|
|
284
|
-
useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) =>
|
|
285
|
-
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) =>
|
|
286
|
-
useFps | Function to monitor the browser's refresh rate (FPS) in real time | () =>
|
|
287
|
-
useMediaQuery | Function to determine if the current environment matches a specified media query condition | (mediaQuery: string) =>
|
|
288
|
-
useResizeObserver | Function to observe changes in the dimensions of DOM elements using `ResizeObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options = {}) =>
|
|
289
|
-
useSlotsExist | Function to watch for the existence of slots with given names, supporting single slots or an array of slots |
|
|
290
|
-
useInject | A function that uses injection to obtain color palettes and shadow color | (key: string) => { colorPalettes: Ref
|
|
285
|
+
useMutationObserver | Function to observe changes in DOM elements using `MutationObserver` | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) => { 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 = {}) => { 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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
## 特性
|
|
18
18
|
|
|
19
19
|
- 组件库采用 `Vue@3.5.14`+ `TypeScript@5.8.3` + `Vite@6.3.5` + `Less@4.3.0` 实现
|
|
20
|
-
- 目前共包含 `67` 个基础 `UI` 组件以及 `
|
|
20
|
+
- 目前共包含 `67` 个基础 `UI` 组件以及 `18` 个工具函数,并且持续探索更新中...
|
|
21
21
|
- 主题可调,你只需提供一个主题色,剩下的都交给我
|
|
22
22
|
- 顺便一提,它们全都可以 `treeshaking`
|
|
23
23
|
- `Vue Amazing UI` 全量使用 `TypeScript` 编写,和你的 `TypeScript` 项目无缝衔接
|
|
@@ -179,7 +179,8 @@ import {
|
|
|
179
179
|
useMediaQuery,
|
|
180
180
|
useResizeObserver,
|
|
181
181
|
useSlotsExist,
|
|
182
|
-
useInject
|
|
182
|
+
useInject,
|
|
183
|
+
useOptionsSupported
|
|
183
184
|
} from 'vue-amazing-ui'
|
|
184
185
|
</script>
|
|
185
186
|
```
|
|
@@ -226,7 +227,7 @@ docs:dev
|
|
|
226
227
|
|
|
227
228
|
所有的赞助者都将出现在此处,非常感谢你们的支持与赞助 ❤️
|
|
228
229
|
|
|
229
|
-
<a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="./docs/public/avatar.png" alt="GitHub@themusecatcher" title="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatar_1.jpeg" alt="WeChat@Ant" title="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" title="GitHub@nizhensh-i"></a> <a href="https://github.com/beijin1949" target="_blank"><img width="64" height="64" src="./docs/public/avatar_3.png" alt="GitHub@beijin1949" title="GitHub@beijin1949"></a> <a href="https://github.com/JinZemin" target="_blank"><img width="64" height="64" src="./docs/public/avatar_4.png" alt="GitHub@JinZemin" title="GitHub@JinZemin"></a>
|
|
230
|
+
<a href="https://github.com/themusecatcher" target="_blank"><img width="64" height="64" src="./docs/public/avatar.png" alt="GitHub@themusecatcher" title="GitHub@themusecatcher"></a> <img width="64" height="64" src="./docs/public/avatar_1.jpeg" alt="WeChat@Ant" title="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" title="GitHub@nizhensh-i"></a> <a href="https://github.com/beijin1949" target="_blank"><img width="64" height="64" src="./docs/public/avatar_3.png" alt="GitHub@beijin1949" title="GitHub@beijin1949"></a> <a href="https://github.com/JinZemin" target="_blank"><img width="64" height="64" src="./docs/public/avatar_4.png" alt="GitHub@JinZemin" title="GitHub@JinZemin"></a> <a href="hhttps://github.com/ye5840" target="_blank"><img width="64" height="64" src="./docs/public/avatar_5.png" alt="GitHub@ye5840" title="GitHub@ye5840"></a>
|
|
230
231
|
|
|
231
232
|
## 组件
|
|
232
233
|
|
|
@@ -273,18 +274,19 @@ Watermark | 水印
|
|
|
273
274
|
:-- | :-- | :--
|
|
274
275
|
dateFormat | 格式化日期时间字符串函数 | (value: number | string | Date = Date.now(), format: string = 'YYYY-MM-DD HH:mm:ss') => string
|
|
275
276
|
formatNumber | 数字格式化函数 | (value: number | string, precision: number = 2, separator: string = ',', decimal: string = '.', prefix?: string, suffix?: string) => string
|
|
276
|
-
rafTimeout | 使用 `requestAnimationFrame`
|
|
277
|
+
rafTimeout | 使用 `requestAnimationFrame` 实现的延迟 `setTimeout` 或间隔 `setInterval` 调用函数 | (fn: Function, delay: number = 0, interval: boolean = false) => \{ id: number }
|
|
277
278
|
cancelRaf | 用于取消 `rafTimeout` 函数 | (raf: { id: number }) => void
|
|
278
|
-
throttle | 节流函数 | (fn: Function, delay: number = 300) =>
|
|
279
|
-
debounce | 防抖函数 | (fn: Function, delay: number = 300) =>
|
|
279
|
+
throttle | 节流函数 | (fn: Function, delay: number = 300) => Function
|
|
280
|
+
debounce | 防抖函数 | (fn: Function, delay: number = 300) => Function
|
|
280
281
|
add | 消除 `js` 加减精度问题的加法函数 | (num1: number, num2: number) => number
|
|
281
282
|
downloadFile | 下载文件并自定义文件名,未传 `fileName` 时,从文件地址中自动提取文件名称 | (url: string, fileName?: string) => void
|
|
282
283
|
toggleDark | 一键切换暗黑模式函数 | () => void
|
|
283
284
|
useEventListener | 使用 `Vue` 的生命周期钩子添加和移除事件监听器 | (target: HTMLElement | Window | Document, event: string, callback: Function) => void
|
|
284
|
-
useMutationObserver | 使用 `MutationObserver` 观察 `DOM` 元素的变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) =>
|
|
285
|
-
useScroll | 实时监测目标元素滚动位置及状态 | (target: Ref | HTMLElement | Window | Document = window, throttleDelay: number = 0, onScroll?: (e: Event) => void, onStop?: (e: Event) => void) =>
|
|
286
|
-
useFps | 实时监测浏览器刷新率FPS | () =>
|
|
287
|
-
useMediaQuery | 使用媒体查询来判断当前环境是否符合指定的媒体查询条件 | (mediaQuery: string) =>
|
|
288
|
-
useResizeObserver | 使用 `ResizeObserver` 观察 `DOM` 元素尺寸变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: ResizeObserverCallback, options = {}) =>
|
|
289
|
-
useSlotsExist | 监听给定名称或名称数组的插槽是否存在,支持监听单个插槽或一组插槽的存在 |
|
|
290
|
-
useInject | 使用依赖注入的函数,用于获取颜色调色板和阴影颜色 | (key: string) => { colorPalettes: Ref
|
|
285
|
+
useMutationObserver | 使用 `MutationObserver` 观察 `DOM` 元素的变化 | (target: Ref | Ref[] | HTMLElement | HTMLElement[], callback: MutationCallback, options = {}) => { 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 = {}) => { 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> }
|