gxxc-util 1.0.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.
- package/README.md +47 -0
- package/dist/cjs/constant/city.js +5711 -0
- package/dist/cjs/index.js +55 -0
- package/dist/cjs/modules/author.js +167 -0
- package/dist/cjs/modules/cityOptions.js +76 -0
- package/dist/cjs/modules/color.js +88 -0
- package/dist/cjs/modules/demo.js +10 -0
- package/dist/cjs/modules/file.js +73 -0
- package/dist/cjs/modules/number.js +137 -0
- package/dist/cjs/modules/other.js +260 -0
- package/dist/cjs/modules/validation.js +189 -0
- package/dist/esm/constant/city.js +5708 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/modules/author.js +160 -0
- package/dist/esm/modules/cityOptions.js +72 -0
- package/dist/esm/modules/color.js +82 -0
- package/dist/esm/modules/demo.js +8 -0
- package/dist/esm/modules/file.js +69 -0
- package/dist/esm/modules/number.js +131 -0
- package/dist/esm/modules/other.js +231 -0
- package/dist/esm/modules/validation.js +178 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/modules/author.d.ts +95 -0
- package/dist/types/modules/cityOptions.d.ts +26 -0
- package/dist/types/modules/color.d.ts +34 -0
- package/dist/types/modules/demo.d.ts +6 -0
- package/dist/types/modules/file.d.ts +25 -0
- package/dist/types/modules/number.d.ts +30 -0
- package/dist/types/modules/other.d.ts +58 -0
- package/dist/types/modules/validation.d.ts +12 -0
- package/dist/types/tsdoc-metadata.json +11 -0
- package/dist/types/types/index.d.ts +23 -0
- package/dist/umd/index.js +85 -0
- package/package.json +79 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { KeyVal, TableHeaderItem } from '../types/index.js';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 函数"sys_print"接受具有“url”属性的对象,并使用它通过“printJS”函数打印文档。
|
|
6
|
+
* @param props - `props` 参数是一个具有单个属性 `url` 的对象,该属性是一个字符串。
|
|
7
|
+
*/
|
|
8
|
+
declare const sys_print: (props: {
|
|
9
|
+
url: string;
|
|
10
|
+
}) => void;
|
|
11
|
+
/**
|
|
12
|
+
* 函数"sys_detectBrowser"检查浏览器版本,版本在当前系统兼容之外,将弹出提示
|
|
13
|
+
*/
|
|
14
|
+
declare const sys_detectBrowser: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* 函数“win_dynamic_fontSize”根据当前屏幕宽度计算并设置文档的字体大小。
|
|
17
|
+
*/
|
|
18
|
+
declare const win_dynamic_fontSize: () => void;
|
|
19
|
+
declare const tem_compare_version: (version1: string, version2: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 新的表头数据转译
|
|
22
|
+
* @param {KeyVal} keyVal 接口返回的存在的表头
|
|
23
|
+
* @param {TableHeaderItem} cache 存储
|
|
24
|
+
* @param {TableHeaderItem} initial 默认
|
|
25
|
+
*/
|
|
26
|
+
declare const tem_get_tableHeader: (keyVal: KeyVal, cache: TableHeaderItem[], initial: TableHeaderItem[]) => TableHeaderItem[];
|
|
27
|
+
/**
|
|
28
|
+
* 获取枚举配置
|
|
29
|
+
* @param {*} value 当前value值
|
|
30
|
+
* @param {*} array 当前枚举配置
|
|
31
|
+
*/
|
|
32
|
+
declare const getOptionConfig: (value: any, array: any[]) => any;
|
|
33
|
+
/**
|
|
34
|
+
* 获取url 文件名 除后缀名以外的地址名 后缀名
|
|
35
|
+
* @param {*} url 地址
|
|
36
|
+
*/
|
|
37
|
+
declare const getUrlConfig: (url: string | null) => {
|
|
38
|
+
fileName: string;
|
|
39
|
+
prefix: string;
|
|
40
|
+
suffix: string;
|
|
41
|
+
} | null;
|
|
42
|
+
/**
|
|
43
|
+
* timejs 依赖于 dayjs 构建,形成管理时间的工具函数
|
|
44
|
+
* TypeScript 中的 `timejs` 函数接受一个参数 `props`,并返回使用 `props` 调用 `dayjs` 的结果。
|
|
45
|
+
* @param {any} props - `timejs` 函数中的 `props` 参数预计为 `any` 类型,这意味着它可以接受任何数据类型作为其值。
|
|
46
|
+
*
|
|
47
|
+
* @returns `timejs` 函数正在返回使用 `props` 参数调用 `dayjs` 函数的结果。
|
|
48
|
+
*/
|
|
49
|
+
declare const timejs: (props?: any, props1?: any, props2?: any) => dayjs.Dayjs;
|
|
50
|
+
/**
|
|
51
|
+
* 从视频地址中提取第一帧作为预览图(base64 格式)
|
|
52
|
+
* @param videoUrl 视频地址(支持跨域或 Blob URL)
|
|
53
|
+
* @param frameTime 预览帧时间点(number)
|
|
54
|
+
* @returns 返回一个Promise,成功时返回 base64 图片,失败返回空字符串
|
|
55
|
+
*/
|
|
56
|
+
declare const video_preview: (videoUrl: string, frameTime?: number) => Promise<string>;
|
|
57
|
+
|
|
58
|
+
export { getOptionConfig, getUrlConfig, sys_detectBrowser, sys_print, tem_compare_version, tem_get_tableHeader, timejs, video_preview, win_dynamic_fontSize };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const val_number: (_: any, value: any) => Promise<void>;
|
|
2
|
+
declare const val_two_percent: (_: any, value: any) => Promise<void>;
|
|
3
|
+
declare const val_three_percent: (_: any, value: any) => Promise<void>;
|
|
4
|
+
declare const val_amount: (_: any, value: any) => Promise<void>;
|
|
5
|
+
declare const val_idcard: (_rule: any, value: any) => Promise<void>;
|
|
6
|
+
declare const val_phone: (_: any, value: any) => Promise<void>;
|
|
7
|
+
declare const val_landline: (_: any, value: any) => Promise<void>;
|
|
8
|
+
declare const val_email: (_: any, value: any) => Promise<void>;
|
|
9
|
+
declare const val_space: (_: any, value: any) => Promise<void>;
|
|
10
|
+
declare const val_beforeAfter_space: (_: any, value: any) => Promise<void>;
|
|
11
|
+
|
|
12
|
+
export { val_amount, val_beforeAfter_space, val_email, val_idcard, val_landline, val_number, val_phone, val_space, val_three_percent, val_two_percent };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type RgbColor = [number, number, number, number?];
|
|
2
|
+
type ResourceItem = {
|
|
3
|
+
resourceId: number;
|
|
4
|
+
resourceName?: string;
|
|
5
|
+
};
|
|
6
|
+
type TableHeaderItem = {
|
|
7
|
+
sort?: number;
|
|
8
|
+
id?: number;
|
|
9
|
+
key?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
disable?: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
dataIndex?: string;
|
|
15
|
+
width?: number;
|
|
16
|
+
fixed?: string;
|
|
17
|
+
render?: unknown;
|
|
18
|
+
};
|
|
19
|
+
type KeyVal = {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { KeyVal, ResourceItem, RgbColor, TableHeaderItem };
|