@a2simcode/ui 0.0.8 → 0.0.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.
@@ -0,0 +1,65 @@
1
+ export interface InputButtonProps {
2
+ /** 输入值 */
3
+ modelValue?: string | Record<string, any>;
4
+ /** 按钮的类型,分为五种:主要按钮、幽灵按钮、虚框按钮、链接按钮、文字按钮、次要按钮 */
5
+ type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
6
+ /** 弹窗类型,弹窗、全屏弹窗、抽屉 */
7
+ layerType?: 'model' | 'full' | 'drawer';
8
+ /** 设置按钮文字 */
9
+ btnText?: string;
10
+ /** 弹窗标题 */
11
+ title?: string;
12
+ /** 设置按钮大小 */
13
+ size?: 'large' | 'default' | 'small';
14
+ /** 宽度 */
15
+ width?: string | number;
16
+ /** 高度 */
17
+ height?: number;
18
+ /** 关闭时销毁抽屉内的元素 */
19
+ destroyOnClose?: boolean;
20
+ /** 弹窗打开回调 */
21
+ open?: (value?: string | Record<string, any>) => void;
22
+ /** 弹窗保存回调 */
23
+ ok?: () => Promise<string | Record<string, any>>;
24
+ /** 弹窗关闭前回调 */
25
+ beforeClose?: (value?: string | Record<string, any>) => boolean | Promise<boolean>;
26
+ /** 弹窗关闭后回调 */
27
+ closed?: () => void;
28
+ }
29
+ declare function __VLS_template(): {
30
+ attrs: Partial<{}>;
31
+ slots: {
32
+ default?(_: {}): any;
33
+ };
34
+ refs: {
35
+ layerRef: unknown;
36
+ };
37
+ rootEl: any;
38
+ };
39
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
40
+ declare const __VLS_component: import('vue').DefineComponent<InputButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
+ "update:modelValue": (value: string | Record<string, any> | undefined) => any;
42
+ change: (data: {
43
+ value: string | Record<string, any> | undefined;
44
+ }) => any;
45
+ }, string, import('vue').PublicProps, Readonly<InputButtonProps> & Readonly<{
46
+ "onUpdate:modelValue"?: ((value: string | Record<string, any> | undefined) => any) | undefined;
47
+ onChange?: ((data: {
48
+ value: string | Record<string, any> | undefined;
49
+ }) => any) | undefined;
50
+ }>, {
51
+ size: "large" | "default" | "small";
52
+ height: number;
53
+ width: string | number;
54
+ destroyOnClose: boolean;
55
+ btnText: string;
56
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
57
+ layerRef: unknown;
58
+ }, any>;
59
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
60
+ export default _default;
61
+ type __VLS_WithTemplateSlots<T, S> = T & {
62
+ new (): {
63
+ $slots: S;
64
+ };
65
+ };
@@ -0,0 +1,52 @@
1
+ declare const JInputCode: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').InputCodeProps> & Readonly<{
3
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
4
+ onChange?: ((data: any) => any) | undefined;
5
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
+ "update:modelValue": (value: string | undefined) => any;
7
+ change: (data: any) => any;
8
+ }, import('vue').PublicProps, {
9
+ height: number;
10
+ mode: string;
11
+ width: string | number;
12
+ btnText: string;
13
+ example: string;
14
+ isHint: boolean;
15
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
16
+ P: {};
17
+ B: {};
18
+ D: {};
19
+ C: {};
20
+ M: {};
21
+ Defaults: {};
22
+ }, Readonly<import('..').InputCodeProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
24
+ onChange?: ((data: any) => any) | undefined;
25
+ }>, {}, {}, {}, {}, {
26
+ height: number;
27
+ mode: string;
28
+ width: string | number;
29
+ btnText: string;
30
+ example: string;
31
+ isHint: boolean;
32
+ }>;
33
+ __isFragment?: never;
34
+ __isTeleport?: never;
35
+ __isSuspense?: never;
36
+ } & import('vue').ComponentOptionsBase<Readonly<import('..').InputCodeProps> & Readonly<{
37
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
38
+ onChange?: ((data: any) => any) | undefined;
39
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
40
+ "update:modelValue": (value: string | undefined) => any;
41
+ change: (data: any) => any;
42
+ }, string, {
43
+ height: number;
44
+ mode: string;
45
+ width: string | number;
46
+ btnText: string;
47
+ example: string;
48
+ isHint: boolean;
49
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
50
+ install: (app: import('vue').App) => void;
51
+ };
52
+ export default JInputCode;
@@ -0,0 +1,41 @@
1
+ export interface InputCodeProps {
2
+ /** 输入值 */
3
+ modelValue?: string;
4
+ /** 按钮的类型,分为五种:主要按钮、幽灵按钮、虚框按钮、链接按钮、文字按钮、次要按钮 */
5
+ type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
6
+ /** 脚本类型 */
7
+ mode?: string;
8
+ /** 按钮文字 */
9
+ btnText?: string;
10
+ /** 弹窗标题 */
11
+ title?: string;
12
+ /** 设置按钮大小 */
13
+ size?: 'large' | 'default' | 'small';
14
+ /** 宽度 */
15
+ width?: string | number;
16
+ /** 高度 */
17
+ height?: number;
18
+ /** 示例代码 */
19
+ example?: string;
20
+ /** 弹窗关闭前回调 */
21
+ beforeClose?: (code: string) => boolean | Promise<boolean>;
22
+ /** 是否开启自动补全 */
23
+ isHint?: boolean;
24
+ /** 自动补全方法 */
25
+ handleHint?: (...args: any[]) => any;
26
+ }
27
+ declare const _default: import('vue').DefineComponent<InputCodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ "update:modelValue": (value: string | undefined) => any;
29
+ change: (data: any) => any;
30
+ }, string, import('vue').PublicProps, Readonly<InputCodeProps> & Readonly<{
31
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
32
+ onChange?: ((data: any) => any) | undefined;
33
+ }>, {
34
+ height: number;
35
+ mode: string;
36
+ width: string | number;
37
+ btnText: string;
38
+ example: string;
39
+ isHint: boolean;
40
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
41
+ export default _default;
@@ -0,0 +1,37 @@
1
+ declare const JTitle: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ size: number | string;
4
+ color: string;
5
+ style: Record<string, any>;
6
+ title: string;
7
+ class: string;
8
+ weight: string | number;
9
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, {
17
+ size: number | string;
18
+ color: string;
19
+ style: Record<string, any>;
20
+ title: string;
21
+ class: string;
22
+ weight: string | number;
23
+ }>;
24
+ __isFragment?: never;
25
+ __isTeleport?: never;
26
+ __isSuspense?: never;
27
+ } & import('vue').ComponentOptionsBase<Readonly<import('..').TitleProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
28
+ size: number | string;
29
+ color: string;
30
+ style: Record<string, any>;
31
+ title: string;
32
+ class: string;
33
+ weight: string | number;
34
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
35
+ install: (app: import('vue').App) => void;
36
+ };
37
+ export default JTitle;
@@ -0,0 +1,35 @@
1
+ export interface TitleProps {
2
+ /**
3
+ * 标题文本内容
4
+ */
5
+ title?: string;
6
+ /**
7
+ * 自定义样式对象
8
+ */
9
+ style?: Record<string, any>;
10
+ /**
11
+ * 自定义类名
12
+ */
13
+ class?: string;
14
+ /**
15
+ * 文本颜色
16
+ */
17
+ color?: string;
18
+ /**
19
+ * 字体大小,支持数字(px)或字符串
20
+ */
21
+ size?: number | string;
22
+ /**
23
+ * 字体粗细 (normal | bold | bolder | lighter | 100-900)
24
+ */
25
+ weight?: string | number;
26
+ }
27
+ declare const _default: import('vue').DefineComponent<TitleProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TitleProps> & Readonly<{}>, {
28
+ size: number | string;
29
+ color: string;
30
+ style: Record<string, any>;
31
+ title: string;
32
+ class: string;
33
+ weight: string | number;
34
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
35
+ export default _default;
@@ -15,6 +15,7 @@ export declare function deepClone(data: any): any;
15
15
  * 对象拷贝
16
16
  */
17
17
  export declare function clone(res: Record<string, any>, data: Record<string, any>, notKeys?: string[]): void;
18
+ export declare const buildUUID: () => string;
18
19
  export declare function buildShortUUID(prefix?: string): string;
19
20
  /**
20
21
  * 将字符串转换为函数
@@ -39,3 +40,28 @@ export declare const getFunction: (fun: string) => {
39
40
  */
40
41
  export declare function set(obj: any, path: string | string[], value: any): any;
41
42
  export declare const toDecimal: (x: any) => number;
43
+ /**
44
+ * 分页方法
45
+ * @param pageNo
46
+ * @param pageSize
47
+ * @param array
48
+ * @returns
49
+ */
50
+ export declare const pagination: (pageNo: number, pageSize: number, array: any[]) => any[];
51
+ export declare const paginationEx: (params: Record<string, any>, array: any[]) => {
52
+ rows: any[];
53
+ total: number;
54
+ page: any;
55
+ records: number;
56
+ };
57
+ export declare const uniqueArray: (arr: any[]) => any[];
58
+ export declare const numberToChinese: (num: string) => string;
59
+ export declare const numberToThousandSeparator: (num: string) => string;
60
+ /**
61
+ * 用来获取文字宽度
62
+ * @param text
63
+ * @returns
64
+ */
65
+ export declare const getTextWidth: (text: string) => number | undefined;
66
+ export declare function upFirst(str: string): string;
67
+ export declare function lowerFirst(str: string, isFlag?: boolean): string;
@@ -1,2 +1,4 @@
1
1
  export declare function isArray(val: any): val is Array<any>;
2
+ export declare function is(val: unknown, type: string): boolean;
3
+ export declare function isObject(val: any): val is Record<any, any>;
2
4
  export declare const isNullOrEmpty: (val: unknown) => boolean;