@shaonq/vue 1.1.10 → 1.1.12
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/lib/index.d.ts +370 -104
- package/lib/index.js +1714 -1328
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
+
import { Button } from '@arco-design/web-vue';
|
|
3
|
+
import { Component } from 'vue';
|
|
2
4
|
import { ComponentOptionsMixin } from 'vue';
|
|
3
5
|
import { DefineComponent } from 'vue';
|
|
4
6
|
import { ExtractPropTypes } from 'vue';
|
|
7
|
+
import { Modal } from '@arco-design/web-vue';
|
|
5
8
|
import { PropType } from 'vue';
|
|
6
9
|
import { PublicProps } from 'vue';
|
|
7
10
|
import { Ref } from 'vue';
|
|
@@ -18,10 +21,22 @@ import { VxeToolbarInstance } from 'vxe-table';
|
|
|
18
21
|
|
|
19
22
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
23
|
|
|
24
|
+
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
25
|
+
|
|
26
|
+
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
|
|
27
|
+
|
|
21
28
|
declare type __VLS_Prettify<T> = {
|
|
22
29
|
[K in keyof T]: T[K];
|
|
23
30
|
} & {};
|
|
24
31
|
|
|
32
|
+
declare type __VLS_Prettify_2<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|
|
35
|
+
|
|
36
|
+
declare type __VLS_Prettify_3<T> = {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} & {};
|
|
39
|
+
|
|
25
40
|
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
41
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
42
|
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
@@ -31,12 +46,42 @@ declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
|
31
46
|
};
|
|
32
47
|
};
|
|
33
48
|
|
|
49
|
+
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
50
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
51
|
+
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
52
|
+
} : {
|
|
53
|
+
type: PropType<T[K]>;
|
|
54
|
+
required: true;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
declare type __VLS_TypePropsToRuntimeProps_3<T> = {
|
|
59
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
60
|
+
type: PropType<__VLS_NonUndefinedable_3<T[K]>>;
|
|
61
|
+
} : {
|
|
62
|
+
type: PropType<T[K]>;
|
|
63
|
+
required: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
|
|
34
67
|
declare type __VLS_WithDefaults<P, D> = {
|
|
35
68
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
36
69
|
default: D[K];
|
|
37
70
|
}> : P[K];
|
|
38
71
|
};
|
|
39
72
|
|
|
73
|
+
declare type __VLS_WithDefaults_2<P, D> = {
|
|
74
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_2<P[K] & {
|
|
75
|
+
default: D[K];
|
|
76
|
+
}> : P[K];
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare type __VLS_WithDefaults_3<P, D> = {
|
|
80
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_3<P[K] & {
|
|
81
|
+
default: D[K];
|
|
82
|
+
}> : P[K];
|
|
83
|
+
};
|
|
84
|
+
|
|
40
85
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
86
|
new (): {
|
|
42
87
|
$slots: S;
|
|
@@ -55,18 +100,34 @@ declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
|
55
100
|
};
|
|
56
101
|
};
|
|
57
102
|
|
|
103
|
+
declare type __VLS_WithTemplateSlots_4<T, S> = T & {
|
|
104
|
+
new (): {
|
|
105
|
+
$slots: S;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
declare type __VLS_WithTemplateSlots_5<T, S> = T & {
|
|
110
|
+
new (): {
|
|
111
|
+
$slots: S;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
declare type __VLS_WithTemplateSlots_6<T, S> = T & {
|
|
116
|
+
new (): {
|
|
117
|
+
$slots: S;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
declare type ButtonInstance = InstanceType<typeof Button>;
|
|
122
|
+
|
|
58
123
|
declare interface CssType extends Partial<CSSStyleDeclaration>, RecordAny_2 {
|
|
59
124
|
}
|
|
60
125
|
|
|
61
|
-
export declare const deepClone: <T = RecordAny | RecordAny[]>(origin: T) => T;
|
|
62
|
-
|
|
63
126
|
declare const _default: {
|
|
64
127
|
install(Vue: App): void;
|
|
65
128
|
};
|
|
66
129
|
export default _default;
|
|
67
130
|
|
|
68
|
-
export declare const download: (url: string, fileName?: string) => boolean;
|
|
69
|
-
|
|
70
131
|
/**
|
|
71
132
|
* @param name 下载名称
|
|
72
133
|
* @param element HTMLElement
|
|
@@ -75,7 +136,7 @@ export declare const download: (url: string, fileName?: string) => boolean;
|
|
|
75
136
|
* @param {string} option.className 例 class = 'one-page-pdf' ,大量打印必填
|
|
76
137
|
* @param {string} option.success successCallback worker:any => void
|
|
77
138
|
*/
|
|
78
|
-
|
|
139
|
+
declare function downLoadPdf(name: string, element: HTMLElement, option?: {
|
|
79
140
|
/** `pdf page margin`: `[top, left, bottom, right]` */
|
|
80
141
|
margin?: number[];
|
|
81
142
|
/** 启用 `worker` */
|
|
@@ -94,49 +155,19 @@ export declare function downLoadPdf(name: string, element: HTMLElement, option?:
|
|
|
94
155
|
jsPDF?: any;
|
|
95
156
|
} & RecordAny): Promise<void>;
|
|
96
157
|
|
|
97
|
-
|
|
158
|
+
declare function findObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
|
|
98
159
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
time: (val: any, f?: string) => string;
|
|
107
|
-
/** percent 格式化百分比 */
|
|
108
|
-
p: (val: any, digits?: any, percent?: string) => string;
|
|
160
|
+
declare type FormUtilType = {
|
|
161
|
+
getModelOption: (model: string) => any;
|
|
162
|
+
getModel: (model: string) => any;
|
|
163
|
+
getShow: (model: string) => boolean;
|
|
164
|
+
setModelOption: (model: string, val: any) => void;
|
|
165
|
+
setModel: (c: string | Record<string, any>, v?: any) => void;
|
|
166
|
+
setShow: (model: string, val: boolean) => void;
|
|
109
167
|
};
|
|
110
168
|
|
|
111
169
|
/** 生成二维码 base64 */
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* get path object
|
|
116
|
-
* @example
|
|
117
|
-
* ```
|
|
118
|
-
* getData({a:{b:1}},'a.b')
|
|
119
|
-
* // 1
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
export declare function getData(object: RecordAny, path: string, defaultValue?: any): any;
|
|
123
|
-
|
|
124
|
-
export declare const getUniqueId: () => string;
|
|
125
|
-
|
|
126
|
-
/** isArray */
|
|
127
|
-
export declare function isArray(obj: any): obj is any[];
|
|
128
|
-
|
|
129
|
-
/** 是否是空数组 */
|
|
130
|
-
export declare function isEmptyArray(obj: any): boolean;
|
|
131
|
-
|
|
132
|
-
/** 是否是空对象 */
|
|
133
|
-
export declare function isEmptyObject(obj: any): boolean;
|
|
134
|
-
|
|
135
|
-
/** isNumber */
|
|
136
|
-
export declare function isNumber(obj: any): obj is number;
|
|
137
|
-
|
|
138
|
-
/** isObject */
|
|
139
|
-
export declare function isObject(value: unknown): value is Record<string, any>;
|
|
170
|
+
declare function generateQRcodeBase64(options: RecordAny): string;
|
|
140
171
|
|
|
141
172
|
export declare const locale: {
|
|
142
173
|
enUS: {
|
|
@@ -524,12 +555,20 @@ export declare const locale: {
|
|
|
524
555
|
};
|
|
525
556
|
|
|
526
557
|
/** 日志 */
|
|
527
|
-
|
|
558
|
+
declare function log(...args: any[]): void;
|
|
559
|
+
|
|
560
|
+
declare function mergeConfig(defaults: RecordAny, overrides: RecordAny, isRoot?: boolean): RecordAny;
|
|
528
561
|
|
|
529
|
-
|
|
562
|
+
declare type ModalInstance = InstanceType<typeof Modal>;
|
|
530
563
|
|
|
531
564
|
/** omit object */
|
|
532
|
-
|
|
565
|
+
declare function omitObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
|
|
566
|
+
|
|
567
|
+
declare function onShow(): void;
|
|
568
|
+
|
|
569
|
+
declare function onSubmit(): Promise<[boolean, any]>;
|
|
570
|
+
|
|
571
|
+
declare function onSubmit_2(): Promise<void>;
|
|
533
572
|
|
|
534
573
|
export declare const OrcDesign: DefineComponent<{
|
|
535
574
|
readonly: BooleanConstructor;
|
|
@@ -576,7 +615,217 @@ export declare const OrcDesignPrint: DefineComponent<{}, {
|
|
|
576
615
|
getHtml(): any;
|
|
577
616
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
578
617
|
|
|
579
|
-
export declare const
|
|
618
|
+
export declare const OrcForm: __VLS_WithTemplateSlots_5< DefineComponent<{
|
|
619
|
+
/** @example ``` [{ type: 'a-input', model: 'billNumber', name: '类型编码', options: { disabled: true, placeholder: '' }] ``` */
|
|
620
|
+
config: {
|
|
621
|
+
type: PropType<OrcFormItem[]>;
|
|
622
|
+
default(): never[];
|
|
623
|
+
};
|
|
624
|
+
labelWidth: {
|
|
625
|
+
type: StringConstructor;
|
|
626
|
+
default: string;
|
|
627
|
+
};
|
|
628
|
+
labelAlign: {
|
|
629
|
+
type: PropType<"left" | "right">;
|
|
630
|
+
default: string;
|
|
631
|
+
};
|
|
632
|
+
loading: BooleanConstructor;
|
|
633
|
+
disabled: BooleanConstructor;
|
|
634
|
+
hideSubmit: BooleanConstructor;
|
|
635
|
+
modelValue: {
|
|
636
|
+
type: ObjectConstructor;
|
|
637
|
+
default(): {};
|
|
638
|
+
};
|
|
639
|
+
/** 栅格间距 */
|
|
640
|
+
gutter: {
|
|
641
|
+
type: NumberConstructor;
|
|
642
|
+
default: number;
|
|
643
|
+
};
|
|
644
|
+
/** 栅格 24 */
|
|
645
|
+
span: {
|
|
646
|
+
type: NumberConstructor;
|
|
647
|
+
default: number;
|
|
648
|
+
};
|
|
649
|
+
formProps: {
|
|
650
|
+
type: ObjectConstructor;
|
|
651
|
+
default(): {};
|
|
652
|
+
};
|
|
653
|
+
/** 栅格grid 优先级低于行 span */
|
|
654
|
+
grid: {
|
|
655
|
+
type: ObjectConstructor;
|
|
656
|
+
default(): {};
|
|
657
|
+
};
|
|
658
|
+
}, {
|
|
659
|
+
onSubmit: typeof onSubmit;
|
|
660
|
+
onReset: (defValue?: Partial<{
|
|
661
|
+
[x: string]: any;
|
|
662
|
+
}> | undefined) => void;
|
|
663
|
+
resetFields(): void;
|
|
664
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
665
|
+
error: (...args: any[]) => void;
|
|
666
|
+
"update:modelValue": (...args: any[]) => void;
|
|
667
|
+
submit: (...args: any[]) => void;
|
|
668
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
669
|
+
/** @example ``` [{ type: 'a-input', model: 'billNumber', name: '类型编码', options: { disabled: true, placeholder: '' }] ``` */
|
|
670
|
+
config: {
|
|
671
|
+
type: PropType<OrcFormItem[]>;
|
|
672
|
+
default(): never[];
|
|
673
|
+
};
|
|
674
|
+
labelWidth: {
|
|
675
|
+
type: StringConstructor;
|
|
676
|
+
default: string;
|
|
677
|
+
};
|
|
678
|
+
labelAlign: {
|
|
679
|
+
type: PropType<"left" | "right">;
|
|
680
|
+
default: string;
|
|
681
|
+
};
|
|
682
|
+
loading: BooleanConstructor;
|
|
683
|
+
disabled: BooleanConstructor;
|
|
684
|
+
hideSubmit: BooleanConstructor;
|
|
685
|
+
modelValue: {
|
|
686
|
+
type: ObjectConstructor;
|
|
687
|
+
default(): {};
|
|
688
|
+
};
|
|
689
|
+
/** 栅格间距 */
|
|
690
|
+
gutter: {
|
|
691
|
+
type: NumberConstructor;
|
|
692
|
+
default: number;
|
|
693
|
+
};
|
|
694
|
+
/** 栅格 24 */
|
|
695
|
+
span: {
|
|
696
|
+
type: NumberConstructor;
|
|
697
|
+
default: number;
|
|
698
|
+
};
|
|
699
|
+
formProps: {
|
|
700
|
+
type: ObjectConstructor;
|
|
701
|
+
default(): {};
|
|
702
|
+
};
|
|
703
|
+
/** 栅格grid 优先级低于行 span */
|
|
704
|
+
grid: {
|
|
705
|
+
type: ObjectConstructor;
|
|
706
|
+
default(): {};
|
|
707
|
+
};
|
|
708
|
+
}>> & {
|
|
709
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
710
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
711
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
712
|
+
}, {
|
|
713
|
+
grid: Record<string, any>;
|
|
714
|
+
loading: boolean;
|
|
715
|
+
disabled: boolean;
|
|
716
|
+
modelValue: Record<string, any>;
|
|
717
|
+
span: number;
|
|
718
|
+
formProps: Record<string, any>;
|
|
719
|
+
config: OrcFormItem[];
|
|
720
|
+
labelWidth: string;
|
|
721
|
+
labelAlign: "left" | "right";
|
|
722
|
+
hideSubmit: boolean;
|
|
723
|
+
gutter: number;
|
|
724
|
+
}, {}>, {
|
|
725
|
+
row?(_: {}): any;
|
|
726
|
+
default?(_: {
|
|
727
|
+
onSubmit: typeof onSubmit;
|
|
728
|
+
}): any;
|
|
729
|
+
}>;
|
|
730
|
+
|
|
731
|
+
export declare const OrcFormButton: __VLS_WithTemplateSlots_6< DefineComponent<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_2>, {
|
|
732
|
+
title: string;
|
|
733
|
+
modelValue: undefined;
|
|
734
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
735
|
+
"update:modelValue": (data: RecordAny) => void;
|
|
736
|
+
submit: (data: OrcFormSubmit) => void;
|
|
737
|
+
error: (data: any) => void;
|
|
738
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3<Props_2>, {
|
|
739
|
+
title: string;
|
|
740
|
+
modelValue: undefined;
|
|
741
|
+
}>>> & {
|
|
742
|
+
onSubmit?: ((data: OrcFormSubmit) => any) | undefined;
|
|
743
|
+
onError?: ((data: any) => any) | undefined;
|
|
744
|
+
"onUpdate:modelValue"?: ((data: RecordAny) => any) | undefined;
|
|
745
|
+
}, {
|
|
746
|
+
title: string;
|
|
747
|
+
modelValue: RecordAny;
|
|
748
|
+
}, {}>, {
|
|
749
|
+
icon?(_: {}): any;
|
|
750
|
+
default?(_: {
|
|
751
|
+
onSubmit: typeof onSubmit_2;
|
|
752
|
+
onShow: typeof onShow;
|
|
753
|
+
}): any;
|
|
754
|
+
}>;
|
|
755
|
+
|
|
756
|
+
/** 描述表单项的属性。 */
|
|
757
|
+
export declare type OrcFormItem = {
|
|
758
|
+
/**
|
|
759
|
+
* 可以使使用的 Arco 组件类型 也可以使用自定义组件
|
|
760
|
+
* @example 'a-input', 'a-select' 等。
|
|
761
|
+
*/
|
|
762
|
+
type?: string | Component;
|
|
763
|
+
/** 表单项的文本名称或标题 */
|
|
764
|
+
name: string;
|
|
765
|
+
/** 用于双向数据绑定的模型属性 */
|
|
766
|
+
model: string;
|
|
767
|
+
/** 控制表单项是否显示。 */
|
|
768
|
+
show?: boolean;
|
|
769
|
+
/** 表单项的默认值 */
|
|
770
|
+
defaultValue?: any;
|
|
771
|
+
/** 触发验证的时机 */
|
|
772
|
+
validateTrigger?: 'change' | 'input' | 'focus' | 'blur';
|
|
773
|
+
/** 组件属性对象 */
|
|
774
|
+
componentAttr?: Record<string, any>;
|
|
775
|
+
/** 自定义类名,可以是字符串或函数 */
|
|
776
|
+
customClass?: string | ((itemConfig: OrcFormItem, models: Record<string, any>) => string);
|
|
777
|
+
/** 开启多选 转义[a,b]=>'a,b' ,默认组件支持请开启 componentAttr:{multiple:true} */
|
|
778
|
+
dotNotation?: boolean;
|
|
779
|
+
/** 数据字典键名 */
|
|
780
|
+
datadict?: string;
|
|
781
|
+
/** 配置项 */
|
|
782
|
+
options?: {
|
|
783
|
+
/** 必填 */
|
|
784
|
+
required?: boolean;
|
|
785
|
+
/** 栅格 24 */
|
|
786
|
+
span?: number;
|
|
787
|
+
/** 禁用 */
|
|
788
|
+
disabled?: boolean;
|
|
789
|
+
/** 占位符 */
|
|
790
|
+
placeholder?: string;
|
|
791
|
+
/** 帮助文案 */
|
|
792
|
+
help?: string;
|
|
793
|
+
/** 提示信息 */
|
|
794
|
+
tooltip?: string;
|
|
795
|
+
};
|
|
796
|
+
/** 验证规则 */
|
|
797
|
+
rules?: Record<string, any>[];
|
|
798
|
+
/** 事件处理器 */
|
|
799
|
+
events?: {
|
|
800
|
+
/** 组件挂载后执行 */
|
|
801
|
+
onMounted?: (util: FormUtilType & OrcFormItem['events']) => any | Promise<any>;
|
|
802
|
+
/** 值改变时触发 */
|
|
803
|
+
onChange?: (val: any, util: FormUtilType & OrcFormItem['events']) => void | Promise<void>;
|
|
804
|
+
/** watch 更新时触发 */
|
|
805
|
+
onUpdate?: (val: any, oldVal: any, util: FormUtilType & OrcFormItem['events']) => void | Promise<void>;
|
|
806
|
+
};
|
|
807
|
+
/** 扩展字符 */
|
|
808
|
+
note?: string;
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
export declare type OrcFormSubmit = [Record<string, any>, {
|
|
812
|
+
setVisible: (a: boolean) => void;
|
|
813
|
+
setLoading: (a: boolean) => void;
|
|
814
|
+
}];
|
|
815
|
+
|
|
816
|
+
export declare const OrcHiddenView: __VLS_WithTemplateSlots_2< DefineComponent<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<{
|
|
817
|
+
isShow?: boolean | undefined;
|
|
818
|
+
isDirection?: boolean | undefined;
|
|
819
|
+
formProps?: Record<string, any> | undefined;
|
|
820
|
+
}>, {}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<{
|
|
821
|
+
isShow?: boolean | undefined;
|
|
822
|
+
isDirection?: boolean | undefined;
|
|
823
|
+
formProps?: Record<string, any> | undefined;
|
|
824
|
+
}>, {}>>>, {}, {}>, {
|
|
825
|
+
default?(_: {}): any;
|
|
826
|
+
}>;
|
|
827
|
+
|
|
828
|
+
export declare const OrcProvider: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}, {}>, {
|
|
580
829
|
default?(_: {}): any;
|
|
581
830
|
}>;
|
|
582
831
|
|
|
@@ -607,11 +856,11 @@ export declare const OrcQuill: DefineComponent<{
|
|
|
607
856
|
toolbar: string | unknown[];
|
|
608
857
|
}, {}>;
|
|
609
858
|
|
|
610
|
-
export declare const OrcSearch:
|
|
859
|
+
export declare const OrcSearch: __VLS_WithTemplateSlots_4< DefineComponent<{
|
|
611
860
|
loading: BooleanConstructor;
|
|
612
861
|
readonly: BooleanConstructor;
|
|
613
862
|
options: {
|
|
614
|
-
type: PropType<
|
|
863
|
+
type: PropType<OrcSearchItem[]>;
|
|
615
864
|
default(): never[];
|
|
616
865
|
};
|
|
617
866
|
modelValue: {
|
|
@@ -637,7 +886,7 @@ export declare const OrcSearch: __VLS_WithTemplateSlots_2< DefineComponent<{
|
|
|
637
886
|
loading: BooleanConstructor;
|
|
638
887
|
readonly: BooleanConstructor;
|
|
639
888
|
options: {
|
|
640
|
-
type: PropType<
|
|
889
|
+
type: PropType<OrcSearchItem[]>;
|
|
641
890
|
default(): never[];
|
|
642
891
|
};
|
|
643
892
|
modelValue: {
|
|
@@ -663,7 +912,7 @@ export declare const OrcSearch: __VLS_WithTemplateSlots_2< DefineComponent<{
|
|
|
663
912
|
loading: boolean;
|
|
664
913
|
size: string;
|
|
665
914
|
modelValue: Record<string, any>;
|
|
666
|
-
options:
|
|
915
|
+
options: OrcSearchItem[];
|
|
667
916
|
readonly: boolean;
|
|
668
917
|
labelWidth: string;
|
|
669
918
|
inputWidth: string;
|
|
@@ -672,7 +921,40 @@ export declare const OrcSearch: __VLS_WithTemplateSlots_2< DefineComponent<{
|
|
|
672
921
|
default?(_: {}): any;
|
|
673
922
|
}>;
|
|
674
923
|
|
|
675
|
-
export declare
|
|
924
|
+
export declare interface OrcSearchItem extends RecordAny {
|
|
925
|
+
/** input 类型 */
|
|
926
|
+
type?: string;
|
|
927
|
+
/** 同form [name] */
|
|
928
|
+
name: string;
|
|
929
|
+
/** 标签名称 */
|
|
930
|
+
label: string;
|
|
931
|
+
/** 初始值 */
|
|
932
|
+
defaultValue?: string | boolean | number | string[];
|
|
933
|
+
/** 默认是显示 */
|
|
934
|
+
show?: boolean;
|
|
935
|
+
/** type =number 最小值 */
|
|
936
|
+
min?: number;
|
|
937
|
+
/** type =number 最大值 */
|
|
938
|
+
max?: number;
|
|
939
|
+
/** type=select | type=date */
|
|
940
|
+
multiple?: boolean;
|
|
941
|
+
/** type=select */
|
|
942
|
+
options?: {
|
|
943
|
+
label: string;
|
|
944
|
+
value: string;
|
|
945
|
+
disabled?: boolean;
|
|
946
|
+
}[];
|
|
947
|
+
/** type=date */
|
|
948
|
+
format?: string;
|
|
949
|
+
/** type=date */
|
|
950
|
+
showTime?: boolean;
|
|
951
|
+
/** 必填 */
|
|
952
|
+
required?: boolean;
|
|
953
|
+
/** 表单验证 */
|
|
954
|
+
rules?: RecordAny | RecordAny[];
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export declare const OrcTable: __VLS_WithTemplateSlots_3< DefineComponent<{
|
|
676
958
|
title: StringConstructor;
|
|
677
959
|
/** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
|
|
678
960
|
height: (StringConstructor | NumberConstructor)[];
|
|
@@ -888,21 +1170,23 @@ declare interface Props {
|
|
|
888
1170
|
useErrData?: <T = Record<string, any>>(config: Record<string, any>) => Promise<[boolean, T]>;
|
|
889
1171
|
}
|
|
890
1172
|
|
|
1173
|
+
declare interface Props_2 {
|
|
1174
|
+
isView?: boolean;
|
|
1175
|
+
disabled?: boolean;
|
|
1176
|
+
title?: string;
|
|
1177
|
+
span?: number;
|
|
1178
|
+
gutter?: number;
|
|
1179
|
+
config: OrcFormItem[];
|
|
1180
|
+
modelValue?: RecordAny;
|
|
1181
|
+
labelWidth?: string;
|
|
1182
|
+
buttonAttrs?: ButtonInstance['$props'];
|
|
1183
|
+
modalAttrs?: ModalInstance['$props'];
|
|
1184
|
+
}
|
|
1185
|
+
|
|
891
1186
|
export declare type RecordAny = Record<string, any>;
|
|
892
1187
|
|
|
893
1188
|
declare type RecordAny_2 = Record<string, any>;
|
|
894
1189
|
|
|
895
|
-
/**
|
|
896
|
-
* set path object
|
|
897
|
-
* @example
|
|
898
|
-
* ```
|
|
899
|
-
* var b = {a:{b:1}}
|
|
900
|
-
* setData(b,'a.b',2)
|
|
901
|
-
* // {a:{b:2}}
|
|
902
|
-
* ```
|
|
903
|
-
*/
|
|
904
|
-
export declare function setData(object: RecordAny, path: string, defaultValue?: any): RecordAny;
|
|
905
|
-
|
|
906
1190
|
declare function setLoading(val?: boolean): void;
|
|
907
1191
|
|
|
908
1192
|
/** column type */
|
|
@@ -982,45 +1266,6 @@ declare interface TableGridTwoType extends RecordAny_2 {
|
|
|
982
1266
|
|
|
983
1267
|
declare type TableInstance = InstanceType<typeof VxeTable>;
|
|
984
1268
|
|
|
985
|
-
/** array */
|
|
986
|
-
export declare function toArray<T>(target: T | T[]): T[];
|
|
987
|
-
|
|
988
|
-
/** 读取数据类型 */
|
|
989
|
-
export declare function typeName(o: unknown): string;
|
|
990
|
-
|
|
991
|
-
declare interface TypeSearchItem extends RecordAny {
|
|
992
|
-
/** input 类型 */
|
|
993
|
-
type?: string;
|
|
994
|
-
/** 同form [name] */
|
|
995
|
-
name: string;
|
|
996
|
-
/** 标签名称 */
|
|
997
|
-
label: string;
|
|
998
|
-
/** 初始值 */
|
|
999
|
-
defaultValue?: string | boolean | number | string[];
|
|
1000
|
-
/** 默认是显示 */
|
|
1001
|
-
show?: boolean;
|
|
1002
|
-
/** type =number 最小值 */
|
|
1003
|
-
min?: number;
|
|
1004
|
-
/** type =number 最大值 */
|
|
1005
|
-
max?: number;
|
|
1006
|
-
/** type=select | type=date */
|
|
1007
|
-
multiple?: boolean;
|
|
1008
|
-
/** type=select */
|
|
1009
|
-
options?: {
|
|
1010
|
-
label: string;
|
|
1011
|
-
value: string;
|
|
1012
|
-
disabled?: boolean;
|
|
1013
|
-
}[];
|
|
1014
|
-
/** type=date */
|
|
1015
|
-
format?: string;
|
|
1016
|
-
/** type=date */
|
|
1017
|
-
showTime?: boolean;
|
|
1018
|
-
/** 必填 */
|
|
1019
|
-
required?: boolean;
|
|
1020
|
-
/** 表单验证 */
|
|
1021
|
-
rules?: RecordAny | RecordAny[];
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
1269
|
/**
|
|
1025
1270
|
* @example
|
|
1026
1271
|
* ```
|
|
@@ -1040,7 +1285,7 @@ declare interface TypeSearchItem extends RecordAny {
|
|
|
1040
1285
|
* { type: 'date', name: 'd2', label: '日期范围', multiple: true, defaultValue: '2024-07-01,2024-08-07' },
|
|
1041
1286
|
* ```
|
|
1042
1287
|
*/
|
|
1043
|
-
export declare function useOrcSearch(list:
|
|
1288
|
+
export declare function useOrcSearch(list: OrcSearchItem[]): readonly [ Ref<{
|
|
1044
1289
|
[x: string]: any;
|
|
1045
1290
|
type?: string | undefined;
|
|
1046
1291
|
name: string;
|
|
@@ -1544,4 +1789,25 @@ export declare const useOrcTable: (option: OrcTableOption) => {
|
|
|
1544
1789
|
selectedKeys: Ref<string[], string[]>;
|
|
1545
1790
|
};
|
|
1546
1791
|
|
|
1792
|
+
export declare function useState<T extends RecordAny>(initValue: T, formsRef?: Ref<{
|
|
1793
|
+
resetFields?: () => void;
|
|
1794
|
+
}>): readonly [Ref<T, T>, (defValue?: Partial<T>) => void];
|
|
1795
|
+
|
|
1796
|
+
export declare const utils: {
|
|
1797
|
+
formatTable: {
|
|
1798
|
+
tf: (val: any, digits?: any) => any;
|
|
1799
|
+
t: (val: any) => string;
|
|
1800
|
+
time: (val: any, f?: string) => string;
|
|
1801
|
+
p: (val: any, digits?: any, percent?: string) => string;
|
|
1802
|
+
};
|
|
1803
|
+
mergeConfig: typeof mergeConfig;
|
|
1804
|
+
generateQRcodeBase64: typeof generateQRcodeBase64;
|
|
1805
|
+
downLoadPdf: typeof downLoadPdf;
|
|
1806
|
+
findObject: typeof findObject;
|
|
1807
|
+
omitObject: typeof omitObject;
|
|
1808
|
+
deepClone: <T = RecordAny | RecordAny[]>(origin: T) => T;
|
|
1809
|
+
download: (url: string, fileName?: string) => boolean;
|
|
1810
|
+
log: typeof log;
|
|
1811
|
+
};
|
|
1812
|
+
|
|
1547
1813
|
export { }
|