@sybz-components/utils 0.0.8 → 0.0.10
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/dist/base.cjs +5 -5
- package/dist/base.d.cts +17 -18
- package/dist/base.d.mts +17 -18
- package/dist/base.d.ts +17 -18
- package/dist/base.mjs +2 -2
- package/dist/format.cjs +2 -2
- package/dist/format.mjs +2 -2
- package/dist/index.cjs +5 -7
- package/dist/index.d.cts +1 -3
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.mjs +2 -3
- package/dist/shared/{utils.CDpXB2JP.cjs → utils.BaNHAtTs.cjs} +70 -65
- package/dist/shared/{utils.cf1aBGgC.mjs → utils.CzQQZf9j.mjs} +60 -55
- package/dist/ws.cjs +1 -1
- package/dist/ws.mjs +1 -1
- package/package.json +1 -1
- package/dist/test.cjs +0 -7
- package/dist/test.d.cts +0 -14
- package/dist/test.d.mts +0 -14
- package/dist/test.d.ts +0 -14
- package/dist/test.mjs +0 -5
package/dist/base.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('
|
|
3
|
+
require('vue');
|
|
4
4
|
require('consola');
|
|
5
5
|
require('es-toolkit');
|
|
6
|
-
const format = require('./shared/utils.
|
|
6
|
+
const format = require('./shared/utils.BaNHAtTs.cjs');
|
|
7
7
|
require('element-plus');
|
|
8
8
|
require('./is.cjs');
|
|
9
9
|
|
|
@@ -15,6 +15,7 @@ exports.clone = format.clone;
|
|
|
15
15
|
exports.confirm = format.confirm;
|
|
16
16
|
exports.copy = format.copy;
|
|
17
17
|
exports.debounce = format.debounce;
|
|
18
|
+
exports.delay = format.delay;
|
|
18
19
|
exports.getStorage = format.getStorage;
|
|
19
20
|
exports.getType = format.getType;
|
|
20
21
|
exports.getUtilsBuildTime = format.getUtilsBuildTime;
|
|
@@ -22,15 +23,14 @@ exports.getVariable = format.getVariable;
|
|
|
22
23
|
exports.isEmpty = format.isEmpty;
|
|
23
24
|
exports.log = format.log;
|
|
24
25
|
exports.merge = format.merge;
|
|
26
|
+
exports.mockValue = format.mockValue;
|
|
25
27
|
exports.processWidth = format.processWidth;
|
|
26
28
|
exports.random = format.random;
|
|
27
29
|
exports.setStorage = format.setStorage;
|
|
28
|
-
exports.sleep = format.sleep;
|
|
29
30
|
exports.test = format.test;
|
|
30
31
|
exports.throttle = format.throttle;
|
|
31
32
|
exports.toLine = format.toLine;
|
|
32
33
|
exports.tryCatch = format.tryCatch;
|
|
33
|
-
exports.uuid = format.uuid;
|
|
34
|
-
exports.validForm = format.validForm;
|
|
35
34
|
exports.validate = format.validate;
|
|
35
|
+
exports.validateForm = format.validateForm;
|
|
36
36
|
exports.validateTrigger = format.validateTrigger;
|
package/dist/base.d.cts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as element_plus from 'element-plus';
|
|
2
2
|
import { MessageOptions, ElMessageBoxOptions } from 'element-plus';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { VNode, AppContext } from 'vue';
|
|
5
|
-
import { Ref } from '@vue/reactivity';
|
|
4
|
+
import { VNode, Ref, AppContext } from 'vue';
|
|
6
5
|
|
|
7
6
|
type Func<Args extends any[] = any[], Return = any> = (...args: Args) => Return;
|
|
8
7
|
type StorageValue = unknown;
|
|
@@ -22,7 +21,7 @@ type ValidateRuleResult = {
|
|
|
22
21
|
max?: number;
|
|
23
22
|
};
|
|
24
23
|
type ValidatePrimitiveValue = string | number | boolean | null | undefined;
|
|
25
|
-
type
|
|
24
|
+
type MockValueOptionItem<T = any> = {
|
|
26
25
|
label: string;
|
|
27
26
|
value: T;
|
|
28
27
|
};
|
|
@@ -39,7 +38,7 @@ interface ClearStorageExcludeOptions {
|
|
|
39
38
|
exclude: string[];
|
|
40
39
|
}
|
|
41
40
|
type ClearStorageInput = string | string[] | ClearStorageExcludeOptions;
|
|
42
|
-
interface
|
|
41
|
+
interface ValidateFormOptions {
|
|
43
42
|
/**
|
|
44
43
|
* 校验失败时的提示文案。
|
|
45
44
|
*/
|
|
@@ -56,7 +55,7 @@ interface ValidFormOptions {
|
|
|
56
55
|
interface FormValidateTarget {
|
|
57
56
|
validate: (callback: (valid: boolean, status: StorageMap) => void) => void;
|
|
58
57
|
}
|
|
59
|
-
interface
|
|
58
|
+
interface MockValueOptions {
|
|
60
59
|
/**
|
|
61
60
|
* `email` 模式下的邮箱后缀,默认 `@qq.com`。
|
|
62
61
|
*/
|
|
@@ -239,12 +238,12 @@ declare function clearStorage(str?: ClearStorageInput): void;
|
|
|
239
238
|
* @returns 校验通过时返回表单状态对象,失败时 reject 对应状态对象。
|
|
240
239
|
*
|
|
241
240
|
* @example
|
|
242
|
-
* await
|
|
241
|
+
* await validateForm(formRef)
|
|
243
242
|
*
|
|
244
243
|
* @example
|
|
245
|
-
* await
|
|
244
|
+
* await validateForm(formRef, { message: '请检查表单信息', detail: true })
|
|
246
245
|
*/
|
|
247
|
-
declare function
|
|
246
|
+
declare function validateForm(ref: MaybeRef<FormValidateTarget>, { message, detail, showMessage }?: ValidateFormOptions): Promise<StorageMap>;
|
|
248
247
|
/**
|
|
249
248
|
* 判断值是否为空。
|
|
250
249
|
*
|
|
@@ -309,17 +308,17 @@ declare function clone<T>(data: T, times?: number): T;
|
|
|
309
308
|
* @returns 生成结果。
|
|
310
309
|
*
|
|
311
310
|
* @example
|
|
312
|
-
*
|
|
311
|
+
* mockValue()
|
|
313
312
|
* // => 'aB3d'
|
|
314
313
|
*
|
|
315
314
|
* @example
|
|
316
|
-
*
|
|
315
|
+
* mockValue('phone')
|
|
317
316
|
* // => '13603312460'
|
|
318
317
|
*
|
|
319
318
|
* @example
|
|
320
|
-
*
|
|
319
|
+
* mockValue('time', 0, { startStr: 'andy', timeStr: '{h}:{i}:{s}' })
|
|
321
320
|
*/
|
|
322
|
-
declare function
|
|
321
|
+
declare function mockValue(type?: string | Array<MockValueOptionItem>, length?: number, options?: MockValueOptions): string | number | any;
|
|
323
322
|
/**
|
|
324
323
|
* 获取值的原始类型名称,返回值统一为小写字符串。
|
|
325
324
|
*
|
|
@@ -337,7 +336,7 @@ declare function uuid(type?: string | Array<UuidOptionItem>, length?: number, op
|
|
|
337
336
|
declare function getType(type: unknown): string;
|
|
338
337
|
/**
|
|
339
338
|
* 一个辅助函数,用于在代码中创建一个暂停(延迟)。
|
|
340
|
-
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "
|
|
339
|
+
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "delay" 的效果。
|
|
341
340
|
*
|
|
342
341
|
* @param delay - 等待的毫秒数。默认值为 0,表示不延迟。
|
|
343
342
|
* @param fn - (可选) 一个在延迟结束后立即执行的函数。
|
|
@@ -347,12 +346,12 @@ declare function getType(type: unknown): string;
|
|
|
347
346
|
* @example
|
|
348
347
|
* // 基本用法:延迟 2 秒后打印消息
|
|
349
348
|
* console.log('开始');
|
|
350
|
-
* await
|
|
349
|
+
* await delay(2000);
|
|
351
350
|
* console.log('2秒后执行');
|
|
352
351
|
*
|
|
353
352
|
* @example
|
|
354
353
|
* // 带回调函数的用法:延迟 1 秒后执行清理工作
|
|
355
|
-
*
|
|
354
|
+
* delay(1000, () => {
|
|
356
355
|
* console.log('执行清理操作...');
|
|
357
356
|
* // 清理代码...
|
|
358
357
|
* });
|
|
@@ -361,10 +360,10 @@ declare function getType(type: unknown): string;
|
|
|
361
360
|
* // 在循环中使用:每次迭代后延迟 500 毫秒
|
|
362
361
|
* for (let i = 0; i < 5; i++) {
|
|
363
362
|
* console.log(`当前值: ${i}`);
|
|
364
|
-
* await
|
|
363
|
+
* await delay(500);
|
|
365
364
|
* }
|
|
366
365
|
*/
|
|
367
|
-
declare function
|
|
366
|
+
declare function delay(delay?: number, fn?: () => void): Promise<void>;
|
|
368
367
|
/**
|
|
369
368
|
* 为 `validate` 预置默认触发时机 `['blur', 'change']`。
|
|
370
369
|
*
|
|
@@ -560,4 +559,4 @@ declare function getUtilsBuildTime(fallback?: string): string;
|
|
|
560
559
|
*/
|
|
561
560
|
declare function test(): string;
|
|
562
561
|
|
|
563
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
562
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger };
|
package/dist/base.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as element_plus from 'element-plus';
|
|
2
2
|
import { MessageOptions, ElMessageBoxOptions } from 'element-plus';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { VNode, AppContext } from 'vue';
|
|
5
|
-
import { Ref } from '@vue/reactivity';
|
|
4
|
+
import { VNode, Ref, AppContext } from 'vue';
|
|
6
5
|
|
|
7
6
|
type Func<Args extends any[] = any[], Return = any> = (...args: Args) => Return;
|
|
8
7
|
type StorageValue = unknown;
|
|
@@ -22,7 +21,7 @@ type ValidateRuleResult = {
|
|
|
22
21
|
max?: number;
|
|
23
22
|
};
|
|
24
23
|
type ValidatePrimitiveValue = string | number | boolean | null | undefined;
|
|
25
|
-
type
|
|
24
|
+
type MockValueOptionItem<T = any> = {
|
|
26
25
|
label: string;
|
|
27
26
|
value: T;
|
|
28
27
|
};
|
|
@@ -39,7 +38,7 @@ interface ClearStorageExcludeOptions {
|
|
|
39
38
|
exclude: string[];
|
|
40
39
|
}
|
|
41
40
|
type ClearStorageInput = string | string[] | ClearStorageExcludeOptions;
|
|
42
|
-
interface
|
|
41
|
+
interface ValidateFormOptions {
|
|
43
42
|
/**
|
|
44
43
|
* 校验失败时的提示文案。
|
|
45
44
|
*/
|
|
@@ -56,7 +55,7 @@ interface ValidFormOptions {
|
|
|
56
55
|
interface FormValidateTarget {
|
|
57
56
|
validate: (callback: (valid: boolean, status: StorageMap) => void) => void;
|
|
58
57
|
}
|
|
59
|
-
interface
|
|
58
|
+
interface MockValueOptions {
|
|
60
59
|
/**
|
|
61
60
|
* `email` 模式下的邮箱后缀,默认 `@qq.com`。
|
|
62
61
|
*/
|
|
@@ -239,12 +238,12 @@ declare function clearStorage(str?: ClearStorageInput): void;
|
|
|
239
238
|
* @returns 校验通过时返回表单状态对象,失败时 reject 对应状态对象。
|
|
240
239
|
*
|
|
241
240
|
* @example
|
|
242
|
-
* await
|
|
241
|
+
* await validateForm(formRef)
|
|
243
242
|
*
|
|
244
243
|
* @example
|
|
245
|
-
* await
|
|
244
|
+
* await validateForm(formRef, { message: '请检查表单信息', detail: true })
|
|
246
245
|
*/
|
|
247
|
-
declare function
|
|
246
|
+
declare function validateForm(ref: MaybeRef<FormValidateTarget>, { message, detail, showMessage }?: ValidateFormOptions): Promise<StorageMap>;
|
|
248
247
|
/**
|
|
249
248
|
* 判断值是否为空。
|
|
250
249
|
*
|
|
@@ -309,17 +308,17 @@ declare function clone<T>(data: T, times?: number): T;
|
|
|
309
308
|
* @returns 生成结果。
|
|
310
309
|
*
|
|
311
310
|
* @example
|
|
312
|
-
*
|
|
311
|
+
* mockValue()
|
|
313
312
|
* // => 'aB3d'
|
|
314
313
|
*
|
|
315
314
|
* @example
|
|
316
|
-
*
|
|
315
|
+
* mockValue('phone')
|
|
317
316
|
* // => '13603312460'
|
|
318
317
|
*
|
|
319
318
|
* @example
|
|
320
|
-
*
|
|
319
|
+
* mockValue('time', 0, { startStr: 'andy', timeStr: '{h}:{i}:{s}' })
|
|
321
320
|
*/
|
|
322
|
-
declare function
|
|
321
|
+
declare function mockValue(type?: string | Array<MockValueOptionItem>, length?: number, options?: MockValueOptions): string | number | any;
|
|
323
322
|
/**
|
|
324
323
|
* 获取值的原始类型名称,返回值统一为小写字符串。
|
|
325
324
|
*
|
|
@@ -337,7 +336,7 @@ declare function uuid(type?: string | Array<UuidOptionItem>, length?: number, op
|
|
|
337
336
|
declare function getType(type: unknown): string;
|
|
338
337
|
/**
|
|
339
338
|
* 一个辅助函数,用于在代码中创建一个暂停(延迟)。
|
|
340
|
-
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "
|
|
339
|
+
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "delay" 的效果。
|
|
341
340
|
*
|
|
342
341
|
* @param delay - 等待的毫秒数。默认值为 0,表示不延迟。
|
|
343
342
|
* @param fn - (可选) 一个在延迟结束后立即执行的函数。
|
|
@@ -347,12 +346,12 @@ declare function getType(type: unknown): string;
|
|
|
347
346
|
* @example
|
|
348
347
|
* // 基本用法:延迟 2 秒后打印消息
|
|
349
348
|
* console.log('开始');
|
|
350
|
-
* await
|
|
349
|
+
* await delay(2000);
|
|
351
350
|
* console.log('2秒后执行');
|
|
352
351
|
*
|
|
353
352
|
* @example
|
|
354
353
|
* // 带回调函数的用法:延迟 1 秒后执行清理工作
|
|
355
|
-
*
|
|
354
|
+
* delay(1000, () => {
|
|
356
355
|
* console.log('执行清理操作...');
|
|
357
356
|
* // 清理代码...
|
|
358
357
|
* });
|
|
@@ -361,10 +360,10 @@ declare function getType(type: unknown): string;
|
|
|
361
360
|
* // 在循环中使用:每次迭代后延迟 500 毫秒
|
|
362
361
|
* for (let i = 0; i < 5; i++) {
|
|
363
362
|
* console.log(`当前值: ${i}`);
|
|
364
|
-
* await
|
|
363
|
+
* await delay(500);
|
|
365
364
|
* }
|
|
366
365
|
*/
|
|
367
|
-
declare function
|
|
366
|
+
declare function delay(delay?: number, fn?: () => void): Promise<void>;
|
|
368
367
|
/**
|
|
369
368
|
* 为 `validate` 预置默认触发时机 `['blur', 'change']`。
|
|
370
369
|
*
|
|
@@ -560,4 +559,4 @@ declare function getUtilsBuildTime(fallback?: string): string;
|
|
|
560
559
|
*/
|
|
561
560
|
declare function test(): string;
|
|
562
561
|
|
|
563
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
562
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger };
|
package/dist/base.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as element_plus from 'element-plus';
|
|
2
2
|
import { MessageOptions, ElMessageBoxOptions } from 'element-plus';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { VNode, AppContext } from 'vue';
|
|
5
|
-
import { Ref } from '@vue/reactivity';
|
|
4
|
+
import { VNode, Ref, AppContext } from 'vue';
|
|
6
5
|
|
|
7
6
|
type Func<Args extends any[] = any[], Return = any> = (...args: Args) => Return;
|
|
8
7
|
type StorageValue = unknown;
|
|
@@ -22,7 +21,7 @@ type ValidateRuleResult = {
|
|
|
22
21
|
max?: number;
|
|
23
22
|
};
|
|
24
23
|
type ValidatePrimitiveValue = string | number | boolean | null | undefined;
|
|
25
|
-
type
|
|
24
|
+
type MockValueOptionItem<T = any> = {
|
|
26
25
|
label: string;
|
|
27
26
|
value: T;
|
|
28
27
|
};
|
|
@@ -39,7 +38,7 @@ interface ClearStorageExcludeOptions {
|
|
|
39
38
|
exclude: string[];
|
|
40
39
|
}
|
|
41
40
|
type ClearStorageInput = string | string[] | ClearStorageExcludeOptions;
|
|
42
|
-
interface
|
|
41
|
+
interface ValidateFormOptions {
|
|
43
42
|
/**
|
|
44
43
|
* 校验失败时的提示文案。
|
|
45
44
|
*/
|
|
@@ -56,7 +55,7 @@ interface ValidFormOptions {
|
|
|
56
55
|
interface FormValidateTarget {
|
|
57
56
|
validate: (callback: (valid: boolean, status: StorageMap) => void) => void;
|
|
58
57
|
}
|
|
59
|
-
interface
|
|
58
|
+
interface MockValueOptions {
|
|
60
59
|
/**
|
|
61
60
|
* `email` 模式下的邮箱后缀,默认 `@qq.com`。
|
|
62
61
|
*/
|
|
@@ -239,12 +238,12 @@ declare function clearStorage(str?: ClearStorageInput): void;
|
|
|
239
238
|
* @returns 校验通过时返回表单状态对象,失败时 reject 对应状态对象。
|
|
240
239
|
*
|
|
241
240
|
* @example
|
|
242
|
-
* await
|
|
241
|
+
* await validateForm(formRef)
|
|
243
242
|
*
|
|
244
243
|
* @example
|
|
245
|
-
* await
|
|
244
|
+
* await validateForm(formRef, { message: '请检查表单信息', detail: true })
|
|
246
245
|
*/
|
|
247
|
-
declare function
|
|
246
|
+
declare function validateForm(ref: MaybeRef<FormValidateTarget>, { message, detail, showMessage }?: ValidateFormOptions): Promise<StorageMap>;
|
|
248
247
|
/**
|
|
249
248
|
* 判断值是否为空。
|
|
250
249
|
*
|
|
@@ -309,17 +308,17 @@ declare function clone<T>(data: T, times?: number): T;
|
|
|
309
308
|
* @returns 生成结果。
|
|
310
309
|
*
|
|
311
310
|
* @example
|
|
312
|
-
*
|
|
311
|
+
* mockValue()
|
|
313
312
|
* // => 'aB3d'
|
|
314
313
|
*
|
|
315
314
|
* @example
|
|
316
|
-
*
|
|
315
|
+
* mockValue('phone')
|
|
317
316
|
* // => '13603312460'
|
|
318
317
|
*
|
|
319
318
|
* @example
|
|
320
|
-
*
|
|
319
|
+
* mockValue('time', 0, { startStr: 'andy', timeStr: '{h}:{i}:{s}' })
|
|
321
320
|
*/
|
|
322
|
-
declare function
|
|
321
|
+
declare function mockValue(type?: string | Array<MockValueOptionItem>, length?: number, options?: MockValueOptions): string | number | any;
|
|
323
322
|
/**
|
|
324
323
|
* 获取值的原始类型名称,返回值统一为小写字符串。
|
|
325
324
|
*
|
|
@@ -337,7 +336,7 @@ declare function uuid(type?: string | Array<UuidOptionItem>, length?: number, op
|
|
|
337
336
|
declare function getType(type: unknown): string;
|
|
338
337
|
/**
|
|
339
338
|
* 一个辅助函数,用于在代码中创建一个暂停(延迟)。
|
|
340
|
-
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "
|
|
339
|
+
* 它返回一个 Promise,你可以在 `await` 后使用它来实现类似 "delay" 的效果。
|
|
341
340
|
*
|
|
342
341
|
* @param delay - 等待的毫秒数。默认值为 0,表示不延迟。
|
|
343
342
|
* @param fn - (可选) 一个在延迟结束后立即执行的函数。
|
|
@@ -347,12 +346,12 @@ declare function getType(type: unknown): string;
|
|
|
347
346
|
* @example
|
|
348
347
|
* // 基本用法:延迟 2 秒后打印消息
|
|
349
348
|
* console.log('开始');
|
|
350
|
-
* await
|
|
349
|
+
* await delay(2000);
|
|
351
350
|
* console.log('2秒后执行');
|
|
352
351
|
*
|
|
353
352
|
* @example
|
|
354
353
|
* // 带回调函数的用法:延迟 1 秒后执行清理工作
|
|
355
|
-
*
|
|
354
|
+
* delay(1000, () => {
|
|
356
355
|
* console.log('执行清理操作...');
|
|
357
356
|
* // 清理代码...
|
|
358
357
|
* });
|
|
@@ -361,10 +360,10 @@ declare function getType(type: unknown): string;
|
|
|
361
360
|
* // 在循环中使用:每次迭代后延迟 500 毫秒
|
|
362
361
|
* for (let i = 0; i < 5; i++) {
|
|
363
362
|
* console.log(`当前值: ${i}`);
|
|
364
|
-
* await
|
|
363
|
+
* await delay(500);
|
|
365
364
|
* }
|
|
366
365
|
*/
|
|
367
|
-
declare function
|
|
366
|
+
declare function delay(delay?: number, fn?: () => void): Promise<void>;
|
|
368
367
|
/**
|
|
369
368
|
* 为 `validate` 预置默认触发时机 `['blur', 'change']`。
|
|
370
369
|
*
|
|
@@ -560,4 +559,4 @@ declare function getUtilsBuildTime(fallback?: string): string;
|
|
|
560
559
|
*/
|
|
561
560
|
declare function test(): string;
|
|
562
561
|
|
|
563
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
562
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger };
|
package/dist/base.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import 'vue';
|
|
2
2
|
import 'consola';
|
|
3
3
|
import 'es-toolkit';
|
|
4
|
-
export { $ as $toast, c as clearStorage, a as clone, b as confirm, d as copy, e as debounce, g as getStorage,
|
|
4
|
+
export { $ as $toast, c as clearStorage, a as clone, b as confirm, d as copy, e as debounce, f as delay, g as getStorage, h as getType, i as getUtilsBuildTime, j as getVariable, k as isEmpty, l as log, m as merge, n as mockValue, p as processWidth, r as random, s as setStorage, t as test, o as throttle, q as toLine, u as tryCatch, v as validate, w as validateForm, x as validateTrigger } from './shared/utils.CzQQZf9j.mjs';
|
|
5
5
|
import 'element-plus';
|
|
6
6
|
import './is.mjs';
|
package/dist/format.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const format = require('./shared/utils.
|
|
3
|
+
const format = require('./shared/utils.BaNHAtTs.cjs');
|
|
4
4
|
require('./is.cjs');
|
|
5
|
-
require('@vue/reactivity');
|
|
6
5
|
require('consola');
|
|
6
|
+
require('vue');
|
|
7
7
|
require('es-toolkit');
|
|
8
8
|
require('element-plus');
|
|
9
9
|
|
package/dist/format.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { y as formatBytes, z as formatBytesConvert, A as formatDurationTime, B as formatImg, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.
|
|
1
|
+
export { y as formatBytes, z as formatBytesConvert, A as formatDurationTime, B as formatImg, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed } from './shared/utils.CzQQZf9j.mjs';
|
|
2
2
|
import './is.mjs';
|
|
3
|
-
import '@vue/reactivity';
|
|
4
3
|
import 'consola';
|
|
4
|
+
import 'vue';
|
|
5
5
|
import 'es-toolkit';
|
|
6
6
|
import 'element-plus';
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const format = require('./shared/utils.
|
|
3
|
+
const format = require('./shared/utils.BaNHAtTs.cjs');
|
|
4
4
|
const day = require('./day.cjs');
|
|
5
5
|
const is = require('./is.cjs');
|
|
6
6
|
const ws = require('./ws.cjs');
|
|
7
|
-
|
|
8
|
-
require('@vue/reactivity');
|
|
7
|
+
require('vue');
|
|
9
8
|
require('consola');
|
|
10
9
|
require('es-toolkit');
|
|
11
10
|
require('element-plus');
|
|
@@ -20,6 +19,7 @@ exports.clone = format.clone;
|
|
|
20
19
|
exports.confirm = format.confirm;
|
|
21
20
|
exports.copy = format.copy;
|
|
22
21
|
exports.debounce = format.debounce;
|
|
22
|
+
exports.delay = format.delay;
|
|
23
23
|
exports.formatBytes = format.formatBytes;
|
|
24
24
|
exports.formatBytesConvert = format.formatBytesConvert;
|
|
25
25
|
exports.formatDurationTime = format.formatDurationTime;
|
|
@@ -35,17 +35,16 @@ exports.getVariable = format.getVariable;
|
|
|
35
35
|
exports.isEmpty = format.isEmpty;
|
|
36
36
|
exports.log = format.log;
|
|
37
37
|
exports.merge = format.merge;
|
|
38
|
+
exports.mockValue = format.mockValue;
|
|
38
39
|
exports.processWidth = format.processWidth;
|
|
39
40
|
exports.random = format.random;
|
|
40
41
|
exports.setStorage = format.setStorage;
|
|
41
|
-
exports.sleep = format.sleep;
|
|
42
42
|
exports.test = format.test;
|
|
43
43
|
exports.throttle = format.throttle;
|
|
44
44
|
exports.toLine = format.toLine;
|
|
45
45
|
exports.tryCatch = format.tryCatch;
|
|
46
|
-
exports.uuid = format.uuid;
|
|
47
|
-
exports.validForm = format.validForm;
|
|
48
46
|
exports.validate = format.validate;
|
|
47
|
+
exports.validateForm = format.validateForm;
|
|
49
48
|
exports.validateTrigger = format.validateTrigger;
|
|
50
49
|
exports.diffDate = day.diffDate;
|
|
51
50
|
exports.diffDateFromCurrent = day.diffDateFromCurrent;
|
|
@@ -75,4 +74,3 @@ exports.objectToString = is.objectToString;
|
|
|
75
74
|
exports.toRawType = is.toRawType;
|
|
76
75
|
exports.toTypeString = is.toTypeString;
|
|
77
76
|
exports.WS = ws.WS;
|
|
78
|
-
exports.onlyTest = test.onlyTest;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
1
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger } from './base.cjs';
|
|
2
2
|
export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.cjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.cjs';
|
|
4
4
|
export { WS, WSAutoReconnectOptions, WSHeartbeatOptions, WSOptions } from './ws.cjs';
|
|
5
5
|
export { FormatBytesConvertOptions, FormatBytesOptions, FormatImgOptions, FormatTimeFallback, FormatTimeInput, FormatToFixedOptions, formatBytes, formatBytesConvert, formatDurationTime, formatImg, formatTextToHtml, formatThousands, formatTime, formatToFixed } from './format.cjs';
|
|
6
|
-
export { onlyTest } from './test.cjs';
|
|
7
6
|
import 'element-plus';
|
|
8
7
|
import 'vue';
|
|
9
|
-
import '@vue/reactivity';
|
|
10
8
|
import 'dayjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
1
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger } from './base.mjs';
|
|
2
2
|
export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.mjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
|
|
4
4
|
export { WS, WSAutoReconnectOptions, WSHeartbeatOptions, WSOptions } from './ws.mjs';
|
|
5
5
|
export { FormatBytesConvertOptions, FormatBytesOptions, FormatImgOptions, FormatTimeFallback, FormatTimeInput, FormatToFixedOptions, formatBytes, formatBytesConvert, formatDurationTime, formatImg, formatTextToHtml, formatThousands, formatTime, formatToFixed } from './format.mjs';
|
|
6
|
-
export { onlyTest } from './test.mjs';
|
|
7
6
|
import 'element-plus';
|
|
8
7
|
import 'vue';
|
|
9
|
-
import '@vue/reactivity';
|
|
10
8
|
import 'dayjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { $toast, clearStorage, clone, confirm, copy, debounce, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, processWidth, random, setStorage,
|
|
1
|
+
export { $toast, clearStorage, clone, confirm, copy, debounce, delay, getStorage, getType, getUtilsBuildTime, getVariable, isEmpty, log, merge, mockValue, processWidth, random, setStorage, test, throttle, toLine, tryCatch, validate, validateForm, validateTrigger } from './base.js';
|
|
2
2
|
export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.js';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.js';
|
|
4
4
|
export { WS, WSAutoReconnectOptions, WSHeartbeatOptions, WSOptions } from './ws.js';
|
|
5
5
|
export { FormatBytesConvertOptions, FormatBytesOptions, FormatImgOptions, FormatTimeFallback, FormatTimeInput, FormatToFixedOptions, formatBytes, formatBytesConvert, formatDurationTime, formatImg, formatTextToHtml, formatThousands, formatTime, formatToFixed } from './format.js';
|
|
6
|
-
export { onlyTest } from './test.js';
|
|
7
6
|
import 'element-plus';
|
|
8
7
|
import 'vue';
|
|
9
|
-
import '@vue/reactivity';
|
|
10
8
|
import 'dayjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
export { $ as $toast, c as clearStorage, a as clone, b as confirm, d as copy, e as debounce, y as formatBytes, z as formatBytesConvert, A as formatDurationTime, B as formatImg, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, g as getStorage,
|
|
1
|
+
export { $ as $toast, c as clearStorage, a as clone, b as confirm, d as copy, e as debounce, f as delay, y as formatBytes, z as formatBytesConvert, A as formatDurationTime, B as formatImg, C as formatTextToHtml, D as formatThousands, E as formatTime, F as formatToFixed, g as getStorage, h as getType, i as getUtilsBuildTime, j as getVariable, k as isEmpty, l as log, m as merge, n as mockValue, p as processWidth, r as random, s as setStorage, t as test, o as throttle, q as toLine, u as tryCatch, v as validate, w as validateForm, x as validateTrigger } from './shared/utils.CzQQZf9j.mjs';
|
|
2
2
|
export { diffDate, diffDateFromCurrent, formatDate, formatDateToDay, formatDateToMinute } from './day.mjs';
|
|
3
3
|
export { isArray, isBoolean, isComponent, isDate, isEmptyObject, isFunction, isIOS, isMap, isNumber, isObject, isPlainObject, isPromise, isRegExp, isSVGElement, isSet, isString, isStringNumber, isSymbol, isUrl, objectToString, toRawType, toTypeString } from './is.mjs';
|
|
4
4
|
export { WS } from './ws.mjs';
|
|
5
|
-
|
|
6
|
-
import '@vue/reactivity';
|
|
5
|
+
import 'vue';
|
|
7
6
|
import 'consola';
|
|
8
7
|
import 'es-toolkit';
|
|
9
8
|
import 'element-plus';
|