sard-uniapp 1.19.5 → 1.20.0

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 (177) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -1
  3. package/components/calendar/README.md +20 -20
  4. package/components/calendar/calendar.vue +1 -1
  5. package/components/calendar-input/README.md +10 -10
  6. package/components/calendar-input/calendar-input.vue +2 -2
  7. package/components/calendar-month/calendar-month.vue +17 -21
  8. package/components/calendar-popout/calendar-popout.vue +1 -1
  9. package/components/card/README.md +16 -8
  10. package/components/card/card.vue +7 -1
  11. package/components/card/common.d.ts +2 -0
  12. package/components/card/index.scss +30 -2
  13. package/components/card/variables.scss +16 -1
  14. package/components/checkbox/common.d.ts +1 -0
  15. package/components/checkbox/common.js +1 -0
  16. package/components/checkbox-input/checkbox-input.vue +9 -0
  17. package/components/checkbox-popout/README.md +27 -6
  18. package/components/checkbox-popout/checkbox-popout.vue +113 -47
  19. package/components/checkbox-popout/common.d.ts +3 -0
  20. package/components/checkbox-popout/index.scss +16 -0
  21. package/components/config/index.d.ts +6 -0
  22. package/components/config/index.js +6 -0
  23. package/components/datetime-picker/README.md +1 -71
  24. package/components/datetime-picker/common.d.ts +1 -0
  25. package/components/datetime-picker/common.js +21 -8
  26. package/components/datetime-picker/datetime-picker.vue +3 -3
  27. package/components/datetime-picker-input/README.md +10 -10
  28. package/components/datetime-picker-input/datetime-picker-input.vue +2 -2
  29. package/components/datetime-picker-popout/datetime-picker-popout.vue +1 -1
  30. package/components/datetime-range-picker/datetime-range-picker.vue +12 -10
  31. package/components/datetime-range-picker-input/README.md +10 -10
  32. package/components/datetime-range-picker-input/datetime-range-picker-input.vue +2 -2
  33. package/components/datetime-range-picker-popout/README.md +0 -6
  34. package/components/datetime-range-picker-popout/datetime-range-picker-popout.vue +11 -8
  35. package/components/floating-bubble/floating-bubble.vue +3 -3
  36. package/components/form/README.md +19 -19
  37. package/components/form/form.vue +1 -1
  38. package/components/icon/icon.d.ts +1 -1
  39. package/components/indexes/README.md +4 -0
  40. package/components/indexes-nav/indexes-nav.vue +2 -2
  41. package/components/keyboard/common.d.ts +1 -2
  42. package/components/keyboard/common.js +2 -11
  43. package/components/keyboard/keyboard.d.ts +2 -2
  44. package/components/list-item/index.scss +4 -0
  45. package/components/locale/lang/en-US.d.ts +4 -0
  46. package/components/locale/lang/en-US.js +4 -0
  47. package/components/locale/lang/zh-CN.d.ts +4 -0
  48. package/components/locale/lang/zh-CN.js +4 -0
  49. package/components/marquee/README.md +8 -2
  50. package/components/marquee/marquee.vue +9 -1
  51. package/components/notice-bar/README.md +8 -2
  52. package/components/notice-bar/notice-bar.vue +14 -8
  53. package/components/notify/notify.d.ts +1 -1
  54. package/components/notify-agent/notify-agent.d.ts +1 -1
  55. package/components/pagination/pagination.vue +2 -2
  56. package/components/popover/utils.js +4 -4
  57. package/components/pull-down-refresh/common.d.ts +1 -1
  58. package/components/radio/common.d.ts +1 -0
  59. package/components/radio/common.js +1 -0
  60. package/components/radio-input/radio-input.vue +6 -0
  61. package/components/radio-popout/README.md +20 -6
  62. package/components/radio-popout/common.d.ts +2 -0
  63. package/components/radio-popout/index.scss +4 -0
  64. package/components/radio-popout/radio-popout.vue +91 -45
  65. package/components/read-more/README.md +82 -0
  66. package/components/read-more/common.d.ts +24 -0
  67. package/components/read-more/common.js +2 -0
  68. package/components/read-more/index.d.ts +1 -0
  69. package/components/read-more/index.js +1 -0
  70. package/components/read-more/index.scss +41 -0
  71. package/components/read-more/read-more.d.ts +20 -0
  72. package/components/read-more/read-more.vue +168 -0
  73. package/components/read-more/variables.scss +12 -0
  74. package/components/resize-sensor/README.md +55 -0
  75. package/components/resize-sensor/common.d.ts +19 -0
  76. package/components/resize-sensor/common.js +2 -0
  77. package/components/resize-sensor/index.d.ts +1 -0
  78. package/components/resize-sensor/index.js +1 -0
  79. package/components/resize-sensor/index.scss +33 -0
  80. package/components/resize-sensor/resize-sensor.d.ts +16 -0
  81. package/components/resize-sensor/resize-sensor.vue +152 -0
  82. package/components/scroll-list/README.md +79 -0
  83. package/components/scroll-list/common.d.ts +23 -0
  84. package/components/scroll-list/common.js +1 -0
  85. package/components/scroll-list/index.d.ts +1 -0
  86. package/components/scroll-list/index.js +1 -0
  87. package/components/scroll-list/index.scss +35 -0
  88. package/components/scroll-list/scroll-list.d.ts +20 -0
  89. package/components/scroll-list/scroll-list.vue +158 -0
  90. package/components/scroll-list/variables.scss +11 -0
  91. package/components/sidebar/README.md +8 -8
  92. package/components/sidebar/sidebar.vue +1 -1
  93. package/components/slider/slider.vue +4 -4
  94. package/components/stepper/stepper.vue +2 -2
  95. package/components/sticky/README.md +92 -0
  96. package/components/sticky/common.d.ts +15 -0
  97. package/components/sticky/common.js +1 -0
  98. package/components/sticky/index.d.ts +1 -0
  99. package/components/sticky/index.js +1 -0
  100. package/components/sticky/index.scss +18 -0
  101. package/components/sticky/sticky.d.ts +10 -0
  102. package/components/sticky/sticky.vue +190 -0
  103. package/components/sticky-box/common.d.ts +19 -0
  104. package/components/sticky-box/common.js +1 -0
  105. package/components/sticky-box/index.d.ts +1 -0
  106. package/components/sticky-box/index.js +1 -0
  107. package/components/sticky-box/index.scss +19 -0
  108. package/components/sticky-box/sticky-box.d.ts +10 -0
  109. package/components/sticky-box/sticky-box.vue +82 -0
  110. package/components/style/mixins/border.scss +101 -38
  111. package/components/style/variables-dark.scss +4 -0
  112. package/components/style/variables.scss +8 -0
  113. package/components/table/table.vue +2 -1
  114. package/components/table-fixation/table-fixation.vue +2 -1
  115. package/components/toast/toast.d.ts +1 -1
  116. package/components/toast-agent/toast-agent.d.ts +1 -1
  117. package/components/tree/tree.d.ts +1 -1
  118. package/components/tree-node/tree-node.vue +2 -2
  119. package/components/upload/README.md +23 -15
  120. package/components/upload/common.d.ts +6 -4
  121. package/components/upload/upload.d.ts +2 -0
  122. package/components/upload/upload.vue +51 -13
  123. package/components/upload/utils.d.ts +1 -0
  124. package/components/upload/utils.js +2 -0
  125. package/components/upload-preview/index.scss +1 -0
  126. package/components/upload-preview/upload-preview.d.ts +6 -4
  127. package/components/upload-preview/upload-preview.vue +17 -24
  128. package/global.d.ts +5 -0
  129. package/index.d.ts +5 -0
  130. package/index.js +5 -0
  131. package/index.scss +2 -0
  132. package/package.json +4 -2
  133. package/use/index.d.ts +4 -0
  134. package/use/index.js +4 -0
  135. package/use/useIndeterminate.d.ts +10 -0
  136. package/use/useIndeterminate.js +27 -0
  137. package/use/useIntersectionObserver.d.ts +16 -0
  138. package/use/useIntersectionObserver.js +52 -0
  139. package/use/useSimulatedClick.js +2 -2
  140. package/use/useSimulatedPress.js +2 -2
  141. package/use/useSingleTask.d.ts +6 -0
  142. package/use/useSingleTask.js +40 -0
  143. package/use/useWindowResize.d.ts +4 -0
  144. package/use/useWindowResize.js +15 -0
  145. package/utils/array.d.ts +28 -0
  146. package/utils/array.js +90 -0
  147. package/utils/common.d.ts +3 -0
  148. package/utils/common.js +1 -0
  149. package/utils/date.d.ts +84 -11
  150. package/utils/date.js +120 -63
  151. package/utils/dom.js +2 -0
  152. package/utils/geometry.d.ts +56 -38
  153. package/utils/geometry.js +56 -30
  154. package/utils/index.d.ts +8 -1
  155. package/utils/index.js +8 -1
  156. package/utils/is.d.ts +12 -0
  157. package/utils/is.js +16 -0
  158. package/utils/number.d.ts +24 -0
  159. package/utils/number.js +37 -0
  160. package/utils/object.d.ts +29 -0
  161. package/utils/object.js +139 -0
  162. package/utils/persist.d.ts +15 -0
  163. package/utils/persist.js +89 -0
  164. package/utils/physics.d.ts +34 -0
  165. package/utils/physics.js +66 -0
  166. package/utils/request.d.ts +227 -0
  167. package/utils/request.js +249 -0
  168. package/utils/router.d.ts +47 -0
  169. package/utils/router.js +115 -0
  170. package/utils/string.d.ts +46 -0
  171. package/utils/string.js +134 -0
  172. package/utils/url-query.d.ts +19 -0
  173. package/utils/url-query.js +95 -0
  174. package/utils/utils.d.ts +0 -166
  175. package/utils/utils.js +0 -441
  176. package/utils/case.d.ts +0 -4
  177. package/utils/case.js +0 -26
@@ -0,0 +1,134 @@
1
+ function splitWord(string) {
2
+ return string
3
+ .split(/[^a-zA-Z0-9$]+/)
4
+ .map((item) => item.split(/([A-Z][^A-Z]*)/))
5
+ .flat()
6
+ .filter(Boolean);
7
+ }
8
+ /**
9
+ * 将字符串首字母转换为小写格式。
10
+ */
11
+ export function lowerFirst(string) {
12
+ return string.replace(/^[A-Z]/, (m) => m.toLowerCase());
13
+ }
14
+ /**
15
+ * 将字符串首字母转换为大写格式。
16
+ */
17
+ export function upperFirst(string) {
18
+ return string.replace(/^[a-z]/, (m) => m.toUpperCase());
19
+ }
20
+ /**
21
+ * 将字符串转换为 PascalCase 格式(大驼峰)。
22
+ */
23
+ export function pascalCase(string) {
24
+ return splitWord(string)
25
+ .map((word) => upperFirst(word.toLowerCase()))
26
+ .join('');
27
+ }
28
+ /**
29
+ * 将字符串转换为 camelCase 格式(小驼峰)。
30
+ */
31
+ export function camelCase(string) {
32
+ return lowerFirst(pascalCase(string));
33
+ }
34
+ /**
35
+ * 将字符串转换为 Capitalize 格式(首字母大写,其余小写)。
36
+ */
37
+ export function capitalize(string) {
38
+ return upperFirst(string.toLowerCase());
39
+ }
40
+ /**
41
+ * 将字符串转换为 kebab-case 格式(使用连字符拼接单词)。
42
+ */
43
+ export function kebabCase(string) {
44
+ return splitWord(string)
45
+ .map((item) => item.toLowerCase())
46
+ .join('-');
47
+ }
48
+ /**
49
+ * 将字符串转换为 snake_case 格式(使用下划线拼接单词)。
50
+ */
51
+ export function snakeCase(string) {
52
+ return splitWord(string)
53
+ .map((item) => item.toLowerCase())
54
+ .join('_');
55
+ }
56
+ /**
57
+ * 每n位数字添加一个分隔符
58
+ */
59
+ export function addSeparator(num, separator = ',', digit = 3) {
60
+ return String(num).replace(new RegExp(`\\B(?=(\\d{${digit}})+(?!\\d))`, 'g'), separator);
61
+ }
62
+ /**
63
+ * 生成唯一ID,用于设置元素的ID,以便获取
64
+ */
65
+ export function uniqid(prefix = '__sar_') {
66
+ return prefix + (~~(Math.random() * 10e8)).toString(36);
67
+ }
68
+ /**
69
+ * 把各种类型的参数拼接成字符串类名,以便解决小程序不支持 classObject 的问题
70
+ */
71
+ export function classNames(...args) {
72
+ let result = '';
73
+ for (let i = 0; i < args.length; i++) {
74
+ const arg = args[i];
75
+ if (!arg)
76
+ continue;
77
+ if (typeof arg === 'string' || typeof arg === 'number') {
78
+ result += arg + ' ';
79
+ }
80
+ else if (Array.isArray(arg)) {
81
+ if (arg.length) {
82
+ const className = classNames(...arg);
83
+ if (className) {
84
+ result += className + ' ';
85
+ }
86
+ }
87
+ }
88
+ else if (typeof arg === 'object') {
89
+ for (const key in arg) {
90
+ const value = arg[key];
91
+ if (value) {
92
+ result += key + ' ';
93
+ }
94
+ }
95
+ }
96
+ }
97
+ return result;
98
+ }
99
+ function toKebabCase(str) {
100
+ return str
101
+ .replace(/^[A-Z]/, (m) => m.toLowerCase())
102
+ .replace(/[A-Z]/g, (m) => '-' + m.toLowerCase());
103
+ }
104
+ /**
105
+ * 把样式对象拼接成字符串,解决小程序不支持 styleObject 的问题。
106
+ */
107
+ export function stringifyStyle(...args) {
108
+ let result = '';
109
+ for (let i = 0; i < args.length; i++) {
110
+ const arg = args[i];
111
+ if (!arg)
112
+ continue;
113
+ if (typeof arg === 'string') {
114
+ result += arg + ';';
115
+ }
116
+ else if (Array.isArray(arg)) {
117
+ if (arg.length) {
118
+ const string = stringifyStyle(...arg);
119
+ if (string) {
120
+ result += string + ';';
121
+ }
122
+ }
123
+ }
124
+ else if (typeof arg === 'object') {
125
+ for (const key in arg) {
126
+ const value = arg[key];
127
+ if (value || value === 0) {
128
+ result += `${toKebabCase(key)}:${value};`;
129
+ }
130
+ }
131
+ }
132
+ }
133
+ return result;
134
+ }
@@ -0,0 +1,19 @@
1
+ export declare class URLQuery {
2
+ _params: string[][];
3
+ constructor(init?: string[][] | Record<string, string> | string | URLQuery);
4
+ _fromString(queryString: string): void;
5
+ get size(): number;
6
+ append(name: string, value: string): void;
7
+ delete(name: string, value?: string): void;
8
+ get(name: string): string | null;
9
+ getAll(name: string): string[];
10
+ has(name: string, value?: string): boolean;
11
+ set(name: string, value: string): void;
12
+ sort(): void;
13
+ toString(): string;
14
+ forEach(callbackfn: (value: string, key: string, parent: URLQuery) => void, thisArg?: any): void;
15
+ entries(): ArrayIterator<string[]>;
16
+ keys(): Generator<string, void, unknown>;
17
+ values(): Generator<string, void, unknown>;
18
+ [Symbol.iterator](): ArrayIterator<string[]>;
19
+ }
@@ -0,0 +1,95 @@
1
+ export class URLQuery {
2
+ _params = [];
3
+ constructor(init) {
4
+ this._params = [];
5
+ if (init) {
6
+ if (typeof init === 'string') {
7
+ this._fromString(init);
8
+ }
9
+ else if (Array.isArray(init)) {
10
+ init.forEach(([name, value]) => {
11
+ this.append(name, value);
12
+ });
13
+ }
14
+ else if (typeof init === 'object') {
15
+ Object.entries(init).forEach(([name, value]) => {
16
+ this.append(name, value);
17
+ });
18
+ }
19
+ }
20
+ }
21
+ // 解析查询字符串
22
+ _fromString(queryString) {
23
+ if (queryString.startsWith('?')) {
24
+ queryString = queryString.slice(1);
25
+ }
26
+ queryString.split('&').forEach((pair) => {
27
+ const [name, value = ''] = pair.split('=').map(decodeURIComponent);
28
+ if (name) {
29
+ this.append(name, value);
30
+ }
31
+ });
32
+ }
33
+ get size() {
34
+ return this._params.length;
35
+ }
36
+ // 添加键值对
37
+ append(name, value) {
38
+ this._params.push([String(name), String(value)]);
39
+ }
40
+ // 删除指定 name 的所有值
41
+ delete(name, value) {
42
+ this._params = this._params.filter(([k, v]) => name !== k || (value && value !== v));
43
+ }
44
+ // 获取第一个匹配的 value
45
+ get(name) {
46
+ const found = this._params.find(([k]) => k === name);
47
+ return found ? found[1] : null;
48
+ }
49
+ // 获取所有匹配的 values
50
+ getAll(name) {
51
+ return this._params.filter(([k]) => k === name).map(([, v]) => v);
52
+ }
53
+ // 检查是否存在 name
54
+ has(name, value) {
55
+ return this._params.some(([k, v]) => k === name && (!value || value === v));
56
+ }
57
+ // 设置 name 的值(覆盖所有旧值)
58
+ set(name, value) {
59
+ this.delete(name);
60
+ this.append(name, value);
61
+ }
62
+ // 按键名排序
63
+ sort() {
64
+ this._params.sort(([a], [b]) => a.localeCompare(b));
65
+ }
66
+ // 转换为查询字符串
67
+ toString() {
68
+ return this._params
69
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
70
+ .join('&');
71
+ }
72
+ forEach(callbackfn, thisArg) {
73
+ this._params.forEach(([name, value]) => {
74
+ callbackfn.call(thisArg, value, name, this);
75
+ });
76
+ }
77
+ // 迭代方法
78
+ entries() {
79
+ return this._params[Symbol.iterator]();
80
+ }
81
+ *keys() {
82
+ for (const [name] of this._params) {
83
+ yield name;
84
+ }
85
+ }
86
+ *values() {
87
+ for (const [, value] of this._params) {
88
+ yield value;
89
+ }
90
+ }
91
+ // 支持 for...of 迭代
92
+ [Symbol.iterator]() {
93
+ return this.entries();
94
+ }
95
+ }
package/utils/utils.d.ts CHANGED
@@ -1,106 +1,3 @@
1
- /**
2
- * @description: 确保目标是一个数组
3
- * @param {any} target
4
- * @return {array}
5
- */
6
- export declare function toArray(target: any): any[];
7
- /**
8
- * @description: 限定数值范围
9
- * @param {number} n 被限定的值
10
- * @param {number} min 最小值
11
- * @param {number} max 最大值
12
- * @return {number} 限定后的值
13
- */
14
- export declare function minmax(n: number, min: number, max: number): number;
15
- /**
16
- * @description: 获取小数位数
17
- * @param {number | string} n 要操作的数值
18
- * @return {number}
19
- */
20
- export declare function getDecimalsLength(n: number | string): number;
21
- /**
22
- * @description: 把一个数四舍五入到指定位数小数
23
- * @param {number} n 要操作的数值
24
- * @param {number} precision 精准度,即小数个数
25
- * @return {number}
26
- */
27
- export declare function round(n: number, precision?: number): number;
28
- /**
29
- * @description: 把一个数舍入到指定数的倍数
30
- * @param {number} n 要舍入的数值
31
- * @param {number} m 结果值的因数
32
- * @return {number}
33
- */
34
- export declare function mround(n: number, m: number): number;
35
- /**
36
- * @description: 生成唯一ID,用于设置元素的ID,以便获取
37
- * @param {string} prefix
38
- * @return {string}
39
- */
40
- export declare function uniqid(prefix?: string): string;
41
- /**
42
- * @description: 获取阻尼值
43
- * @param {number} value
44
- * @param {number} min
45
- * @param {number} max
46
- * @param {number} damping
47
- * @return {number}
48
- */
49
- export declare function getDampingValue(value: number, min: number, max: number, damping: number): number;
50
- /**
51
- * @description: 获取矩形阻尼值
52
- * @param {number} offset 当前的偏移量
53
- * @param {number} areaSize 范围值
54
- * @param {number} viewSize 范围内某个视图尺寸值
55
- * @param {number} damping 阻尼系数
56
- * @return {number}
57
- */
58
- export declare function getRectDampingValue(offset: number, areaSize: number, viewSize: number, damping: number): number;
59
- /**
60
- * @description: 获取范围值
61
- * @param {number} offset 当前的偏移量
62
- * @param {number} areaSize 范围值
63
- * @param {number} viewSize 范围内某个视图尺寸值
64
- * @return {number}
65
- */
66
- export declare function getInBoundValue(offset: number, areaSize: number, viewSize: number): number;
67
- /**
68
- * @description: 获取溢出值范围
69
- * @param {number} overflow 最大溢出值
70
- * @param {number} areaSize 范围值
71
- * @param {number} viewSize 范围内某个视图尺寸值
72
- * @return {*}
73
- */
74
- export declare function getOverflowRangeInArea(overflow: number, areaSize: number, viewSize: number): [number, number];
75
- /**
76
- * @description: 扩散性遍历
77
- * @param {any[]} array 要遍历的数组
78
- * @param {(el: any, spreadIndex: number, index: number) => any} callback 回调函数,接收当前元素、扩散性下标、迭代下标作为参数,
79
- * 如果返回true,则中止遍历
80
- * @param {number} currIndex 遍历开始的下标
81
- * @param {number} direction 开始遍历的方向
82
- * @return {number} 扩散性下标、或开始下标
83
- */
84
- export declare function spreadEach(array: any[], callback: (el: any, spreadIndex: number, index: number) => any, startIndex?: number, direction?: number): number;
85
- /**
86
- * @description: 深度克隆对象,仅克隆数组和无格式对象,其他类型会被直接返回
87
- * @param {any} target
88
- * @return {any}
89
- */
90
- export declare function deepClone(target: any): any;
91
- /**
92
- * @description: 深拷贝其他对象到第一个对象
93
- * @param args 任意长度参数对象
94
- * @return 返回第一个参数对象
95
- */
96
- export declare function extend(...args: any[]): any;
97
- /**
98
- * @description: 判断两数组是否相等,浅比较
99
- * @param {any[]} arr1
100
- * @param {any[]} arr2
101
- * @return {boolean}
102
- */
103
- export declare function arrayEqual(arr1: any[], arr2: any[]): boolean;
104
1
  /**
105
2
  * @description: 判断一个对象是否为看得到的空
106
3
  * @param {any} target
@@ -150,77 +47,14 @@ export declare function throttle(func: (...args: any[]) => any, wait: any, optio
150
47
  * @return {[number, number]}
151
48
  */
152
49
  export declare function getPageRange(current: number, pageCount: number, pageItemCount: number): number[];
153
- interface AnyObject {
154
- [p: string]: any;
155
- }
156
- export declare function treeToMap(tree: AnyObject[], keyName: string, childrenName: string, parentName: string): {
157
- [p: string]: AnyObject;
158
- };
159
- /**
160
- * @description: 打乱数组
161
- * @param {any[]} arr 要打乱的数组
162
- * @param {boolean} inPlace 是否改变原数组
163
- * @return {any[]}
164
- */
165
- export declare function shuffle(arr: any[], inPlace?: boolean): any[];
166
- interface Rect {
167
- x: number;
168
- y: number;
169
- width: number;
170
- height: number;
171
- }
172
- /**
173
- * @description: 根据原始坐标尺寸和缩放后的坐标尺寸算出转换的原点
174
- * @param {Rect} rect
175
- * @param {Rect} scaleRect
176
- * @return {[number, number]}
177
- */
178
- export declare function getTransformOrigin(rect: Rect, scaleRect: Rect): number[];
179
50
  /**
180
51
  * @description: 将一个可选单位的字符串或数值拆分为数值和单位组成的数组
181
52
  * @param {number | string} target
182
53
  * @return {[number, string]}
183
54
  */
184
55
  export declare function splitUnit(target: number | string): [number, string];
185
- /**
186
- * @description: 链式获取对象值
187
- * @param object
188
- * @param chain 通过点分割的字符串或者字符串数组
189
- */
190
- export declare function chainGet(object: any, chain?: string | string[]): any;
191
- /**
192
- * @description: 链式设置对象值
193
- * @param object
194
- * @param chain 通过点分割的字符串或者字符串数组
195
- * @param value 要设置的值
196
- */
197
- export declare function chainSet(object: any, chain: string | string[], value: any): void;
198
- /**
199
- * @description: 移动数组中的元素
200
- * @param array
201
- * @param fromIndex
202
- * @param toIndex
203
- * @return 移动后的新数组
204
- */
205
- export declare function arrayMove(array: any[], fromIndex: number, toIndex: number): any[];
206
- export type StyleProp = string | Record<any, any> | null | undefined | false | StyleProp[];
207
- export declare function stringifyStyle(...args: StyleProp[]): string;
208
- export type ClassProp = string | number | null | undefined | Record<string, any> | ClassProp[];
209
- export declare function classNames(...args: ClassProp[]): string;
210
56
  export declare const noop: () => void;
211
- export declare function nestedToMulti(nested: any[], values: (number | string)[], fieldKeys: {
212
- value: string;
213
- children: string;
214
- }): any[];
215
- export declare function random(min: number, max: number): number;
216
- export declare function addSeparator(num: number | string, separator?: string, digit?: number): string;
217
- export interface Coord {
218
- x: number;
219
- y: number;
220
- }
221
- export declare function getDistanceBetweenTwoPoints(c1: Coord, c2: Coord): number;
222
57
  export declare function getMayPrimitiveOption(option: string | number | boolean | {
223
58
  [key: PropertyKey]: any;
224
59
  }, key: string): any;
225
60
  export declare function sleep(time: number): Promise<unknown>;
226
- export {};