@xto/form 1.6.8 → 1.6.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.
Files changed (73) hide show
  1. package/es/AutoComplete/index.d.ts +29 -0
  2. package/es/AutoComplete/index.vue.d.ts +70 -0
  3. package/es/Cascader/index.d.ts +40 -0
  4. package/es/Cascader/index.vue.d.ts +58 -0
  5. package/es/Checkbox/group.vue.d.ts +34 -0
  6. package/es/Checkbox/index.d.ts +49 -0
  7. package/es/Checkbox/index.vue.d.ts +31 -0
  8. package/es/Checkbox/types.d.ts +106 -0
  9. package/es/ColorPicker/index.d.ts +15 -0
  10. package/es/ColorPicker/index.vue.d.ts +29 -0
  11. package/es/DatePicker/components/DateTable.vue.d.ts +36 -0
  12. package/es/DatePicker/components/MonthTable.vue.d.ts +14 -0
  13. package/es/DatePicker/components/YearTable.vue.d.ts +14 -0
  14. package/es/DatePicker/index.d.ts +35 -0
  15. package/es/DatePicker/index.vue.d.ts +57 -0
  16. package/es/DatePicker/types.d.ts +112 -0
  17. package/es/DatePicker/utils.d.ts +21 -0
  18. package/es/DynamicFields/index.d.ts +2 -0
  19. package/es/DynamicFields/index.vue.d.ts +52 -0
  20. package/es/DynamicFields/types.d.ts +36 -0
  21. package/es/Form/index.d.ts +77 -0
  22. package/es/Form/index.vue.d.ts +64 -0
  23. package/es/Form/item.vue.d.ts +31 -0
  24. package/es/Form/types.d.ts +239 -0
  25. package/es/Form/validators.d.ts +60 -0
  26. package/es/Input/index.d.ts +29 -0
  27. package/es/Input/index.vue.d.ts +70 -0
  28. package/es/Input/types.d.ts +97 -0
  29. package/es/InputNumber/index.vue.d.ts +57 -0
  30. package/es/InputNumber/types.d.ts +83 -0
  31. package/es/Mention/index.d.ts +27 -0
  32. package/es/Mention/index.vue.d.ts +45 -0
  33. package/es/Radio/button.vue.d.ts +29 -0
  34. package/es/Radio/group.vue.d.ts +35 -0
  35. package/es/Radio/index.d.ts +61 -0
  36. package/es/Radio/index.vue.d.ts +30 -0
  37. package/es/Radio/types.d.ts +83 -0
  38. package/es/Rate/index.d.ts +41 -0
  39. package/es/Rate/index.vue.d.ts +49 -0
  40. package/es/Rate/types.d.ts +71 -0
  41. package/es/RichEditor/index.d.ts +19 -0
  42. package/es/RichEditor/index.vue.d.ts +41 -0
  43. package/es/Segmented/index.d.ts +20 -0
  44. package/es/Segmented/index.vue.d.ts +52 -0
  45. package/es/Select/Option.vue.d.ts +9 -0
  46. package/es/Select/index.d.ts +48 -0
  47. package/es/Select/index.vue.d.ts +93 -0
  48. package/es/Select/types.d.ts +137 -0
  49. package/es/Select/utils.d.ts +8 -0
  50. package/es/Slider/index.d.ts +52 -0
  51. package/es/Slider/index.vue.d.ts +39 -0
  52. package/es/Slider/types.d.ts +77 -0
  53. package/es/Switch/index.d.ts +16 -0
  54. package/es/Switch/index.vue.d.ts +44 -0
  55. package/es/Switch/types.d.ts +69 -0
  56. package/es/Textarea/index.d.ts +48 -0
  57. package/es/Textarea/index.vue.d.ts +51 -0
  58. package/es/Textarea/types.d.ts +91 -0
  59. package/es/TimePicker/components/TimePanel.vue.d.ts +28 -0
  60. package/es/TimePicker/index.d.ts +39 -0
  61. package/es/TimePicker/index.vue.d.ts +57 -0
  62. package/es/TimePicker/types.d.ts +117 -0
  63. package/es/TimePicker/utils.d.ts +10 -0
  64. package/es/Transfer/index.d.ts +58 -0
  65. package/es/Transfer/index.vue.d.ts +62 -0
  66. package/es/Transfer/types.d.ts +117 -0
  67. package/es/Upload/index.d.ts +110 -0
  68. package/es/Upload/index.vue.d.ts +140 -0
  69. package/es/Upload/types.d.ts +238 -0
  70. package/es/index.d.ts +41 -0
  71. package/es/index.mjs +503 -496
  72. package/lib/index.cjs +1 -1
  73. package/package.json +3 -3
@@ -0,0 +1,58 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ export interface TransferOption {
3
+ key: string | number;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export declare const transferProps: {
8
+ readonly modelValue: {
9
+ readonly type: PropType<(string | number)[]>;
10
+ readonly default: () => never[];
11
+ };
12
+ readonly data: {
13
+ readonly type: PropType<TransferOption[]>;
14
+ readonly default: () => never[];
15
+ };
16
+ readonly titles: {
17
+ readonly type: PropType<[string, string]>;
18
+ readonly default: () => string[];
19
+ };
20
+ readonly buttonTexts: {
21
+ readonly type: PropType<[string, string]>;
22
+ readonly default: () => string[];
23
+ };
24
+ readonly filterable: {
25
+ readonly type: BooleanConstructor;
26
+ readonly default: false;
27
+ };
28
+ readonly filterPlaceholder: {
29
+ readonly type: StringConstructor;
30
+ readonly default: "请输入搜索内容";
31
+ };
32
+ readonly filterMethod: {
33
+ readonly type: PropType<(query: string, option: TransferOption) => boolean>;
34
+ readonly default: undefined;
35
+ };
36
+ readonly targetOrder: {
37
+ readonly type: PropType<"original" | "push" | "unshift">;
38
+ readonly default: "original";
39
+ };
40
+ readonly props: {
41
+ readonly type: PropType<{
42
+ key?: string;
43
+ label?: string;
44
+ disabled?: string;
45
+ }>;
46
+ readonly default: undefined;
47
+ };
48
+ readonly leftDefaultChecked: {
49
+ readonly type: PropType<(string | number)[]>;
50
+ readonly default: () => never[];
51
+ };
52
+ readonly rightDefaultChecked: {
53
+ readonly type: PropType<(string | number)[]>;
54
+ readonly default: () => never[];
55
+ };
56
+ };
57
+ export type TransferProps = ExtractPropTypes<typeof transferProps>;
58
+ export { default as Transfer } from './index.vue';
@@ -0,0 +1,62 @@
1
+ export interface TransferOption {
2
+ key: string | number;
3
+ label: string;
4
+ disabled?: boolean;
5
+ }
6
+ type __VLS_Props = {
7
+ modelValue?: (string | number)[];
8
+ data?: TransferOption[];
9
+ titles?: [string, string];
10
+ buttonTexts?: [string, string];
11
+ filterable?: boolean;
12
+ filterPlaceholder?: string;
13
+ filterMethod?: (query: string, option: TransferOption) => boolean;
14
+ targetOrder?: 'original' | 'push' | 'unshift';
15
+ props?: {
16
+ key?: string;
17
+ label?: string;
18
+ disabled?: string;
19
+ };
20
+ leftDefaultChecked?: (string | number)[];
21
+ rightDefaultChecked?: (string | number)[];
22
+ };
23
+ declare function __VLS_template(): {
24
+ attrs: Partial<{}>;
25
+ slots: {
26
+ 'left-empty'?(_: {}): any;
27
+ 'right-empty'?(_: {}): any;
28
+ };
29
+ refs: {};
30
+ rootEl: HTMLDivElement;
31
+ };
32
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
34
+ clearQuery: (direction: "left" | "right") => void;
35
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
+ "update:modelValue": (value: (string | number)[]) => any;
37
+ change: (value: (string | number)[], direction: "right" | "left", movedKeys: (string | number)[]) => any;
38
+ "left-check-change": (checkedKeys: (string | number)[]) => any;
39
+ "right-check-change": (checkedKeys: (string | number)[]) => any;
40
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
41
+ "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
42
+ onChange?: ((value: (string | number)[], direction: "right" | "left", movedKeys: (string | number)[]) => any) | undefined;
43
+ "onLeft-check-change"?: ((checkedKeys: (string | number)[]) => any) | undefined;
44
+ "onRight-check-change"?: ((checkedKeys: (string | number)[]) => any) | undefined;
45
+ }>, {
46
+ modelValue: (string | number)[];
47
+ data: TransferOption[];
48
+ filterable: boolean;
49
+ titles: [string, string];
50
+ buttonTexts: [string, string];
51
+ filterPlaceholder: string;
52
+ targetOrder: "original" | "push" | "unshift";
53
+ leftDefaultChecked: (string | number)[];
54
+ rightDefaultChecked: (string | number)[];
55
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
56
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
57
+ export default _default;
58
+ type __VLS_WithTemplateSlots<T, S> = T & {
59
+ new (): {
60
+ $slots: S;
61
+ };
62
+ };
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Transfer 组件类型定义
3
+ */
4
+ /**
5
+ * Transfer 选项
6
+ */
7
+ export interface TransferOption {
8
+ /**
9
+ * 选项键值
10
+ */
11
+ key: string | number;
12
+ /**
13
+ * 选项标签
14
+ */
15
+ label: string;
16
+ /**
17
+ * 是否禁用
18
+ */
19
+ disabled?: boolean;
20
+ }
21
+ /**
22
+ * Transfer 目标排序方式
23
+ */
24
+ export type TransferTargetOrder = 'original' | 'push' | 'unshift';
25
+ /**
26
+ * Transfer Props 映射
27
+ */
28
+ export interface TransferPropsAlias {
29
+ /**
30
+ * 键字段名
31
+ */
32
+ key?: string;
33
+ /**
34
+ * 标签字段名
35
+ */
36
+ label?: string;
37
+ /**
38
+ * 禁用字段名
39
+ */
40
+ disabled?: string;
41
+ }
42
+ /**
43
+ * Transfer Props
44
+ */
45
+ export interface TransferProps {
46
+ /**
47
+ * 绑定值(目标列表的键数组)
48
+ */
49
+ modelValue?: (string | number)[];
50
+ /**
51
+ * 数据源
52
+ */
53
+ data?: TransferOption[];
54
+ /**
55
+ * 面板标题
56
+ * @default ['列表1', '列表2']
57
+ */
58
+ titles?: [string, string];
59
+ /**
60
+ * 按钮文字
61
+ * @default ['', '']
62
+ */
63
+ buttonTexts?: [string, string];
64
+ /**
65
+ * 是否可搜索
66
+ * @default false
67
+ */
68
+ filterable?: boolean;
69
+ /**
70
+ * 搜索框占位符
71
+ * @default '请输入搜索内容'
72
+ */
73
+ filterPlaceholder?: string;
74
+ /**
75
+ * 自定义搜索方法
76
+ */
77
+ filterMethod?: (query: string, option: TransferOption) => boolean;
78
+ /**
79
+ * 目标列表排序方式
80
+ * @default 'original'
81
+ */
82
+ targetOrder?: TransferTargetOrder;
83
+ /**
84
+ * 字段别名
85
+ */
86
+ props?: TransferPropsAlias;
87
+ /**
88
+ * 左侧默认选中项
89
+ */
90
+ leftDefaultChecked?: (string | number)[];
91
+ /**
92
+ * 右侧默认选中项
93
+ */
94
+ rightDefaultChecked?: (string | number)[];
95
+ }
96
+ /**
97
+ * Transfer Emits
98
+ */
99
+ export interface TransferEmits {
100
+ (e: 'update:modelValue', value: (string | number)[]): void;
101
+ (e: 'change', value: (string | number)[], direction: 'left' | 'right', movedKeys: (string | number)[]): void;
102
+ (e: 'left-check-change', checkedKeys: (string | number)[]): void;
103
+ (e: 'right-check-change', checkedKeys: (string | number)[]): void;
104
+ }
105
+ /**
106
+ * Transfer Expose
107
+ */
108
+ export interface TransferExpose {
109
+ /**
110
+ * 清除搜索关键词
111
+ */
112
+ clearQuery: (direction: 'left' | 'right') => void;
113
+ }
114
+ /**
115
+ * Transfer 组件实例类型
116
+ */
117
+ export type TransferInstance = InstanceType<typeof import('./index.vue').default>;
@@ -0,0 +1,110 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ export interface UploadFile {
3
+ name: string;
4
+ size?: number;
5
+ url?: string;
6
+ status?: 'ready' | 'uploading' | 'success' | 'error';
7
+ percentage?: number;
8
+ uid?: number | string;
9
+ raw?: File;
10
+ response?: any;
11
+ thumbUrl?: string;
12
+ }
13
+ export declare const uploadProps: {
14
+ readonly action: {
15
+ readonly type: StringConstructor;
16
+ readonly default: "#";
17
+ };
18
+ readonly headers: {
19
+ readonly type: PropType<Record<string, string>>;
20
+ readonly default: undefined;
21
+ };
22
+ readonly data: {
23
+ readonly type: PropType<Record<string, any>>;
24
+ readonly default: undefined;
25
+ };
26
+ readonly multiple: {
27
+ readonly type: BooleanConstructor;
28
+ readonly default: false;
29
+ };
30
+ readonly accept: {
31
+ readonly type: StringConstructor;
32
+ readonly default: undefined;
33
+ };
34
+ readonly limit: {
35
+ readonly type: NumberConstructor;
36
+ readonly default: undefined;
37
+ };
38
+ readonly disabled: {
39
+ readonly type: BooleanConstructor;
40
+ readonly default: false;
41
+ };
42
+ readonly drag: {
43
+ readonly type: BooleanConstructor;
44
+ readonly default: false;
45
+ };
46
+ readonly listType: {
47
+ readonly type: PropType<"text" | "picture" | "picture-card">;
48
+ readonly default: "text";
49
+ };
50
+ readonly autoUpload: {
51
+ readonly type: BooleanConstructor;
52
+ readonly default: true;
53
+ };
54
+ readonly fileList: {
55
+ readonly type: PropType<UploadFile[]>;
56
+ readonly default: () => never[];
57
+ };
58
+ readonly showFileList: {
59
+ readonly type: BooleanConstructor;
60
+ readonly default: true;
61
+ };
62
+ readonly withCredentials: {
63
+ readonly type: BooleanConstructor;
64
+ readonly default: false;
65
+ };
66
+ readonly name: {
67
+ readonly type: StringConstructor;
68
+ readonly default: "file";
69
+ };
70
+ readonly httpRequest: {
71
+ readonly type: PropType<(options: any) => Promise<any>>;
72
+ readonly default: undefined;
73
+ };
74
+ readonly beforeUpload: {
75
+ readonly type: PropType<(file: File, fileList: File[]) => boolean | Promise<boolean>>;
76
+ readonly default: undefined;
77
+ };
78
+ readonly beforeRemove: {
79
+ readonly type: PropType<(file: UploadFile, fileList: UploadFile[]) => boolean>;
80
+ readonly default: undefined;
81
+ };
82
+ readonly onSuccess: {
83
+ readonly type: PropType<(response: any, file: UploadFile, fileList: UploadFile[]) => void>;
84
+ readonly default: undefined;
85
+ };
86
+ readonly onError: {
87
+ readonly type: PropType<(error: Error, file: UploadFile, fileList: UploadFile[]) => void>;
88
+ readonly default: undefined;
89
+ };
90
+ readonly onProgress: {
91
+ readonly type: PropType<(event: {
92
+ percent: number;
93
+ }, file: UploadFile, fileList: UploadFile[]) => void>;
94
+ readonly default: undefined;
95
+ };
96
+ readonly onChange: {
97
+ readonly type: PropType<(file: UploadFile, fileList: UploadFile[]) => void>;
98
+ readonly default: undefined;
99
+ };
100
+ readonly onRemove: {
101
+ readonly type: PropType<(file: UploadFile, fileList: UploadFile[]) => void>;
102
+ readonly default: undefined;
103
+ };
104
+ readonly onExceed: {
105
+ readonly type: PropType<(files: File[], fileList: UploadFile[]) => void>;
106
+ readonly default: undefined;
107
+ };
108
+ };
109
+ export type UploadProps = ExtractPropTypes<typeof uploadProps>;
110
+ export { default as Upload } from './index.vue';
@@ -0,0 +1,140 @@
1
+ export interface UploadFile {
2
+ name: string;
3
+ size?: number;
4
+ url?: string;
5
+ status?: 'ready' | 'uploading' | 'success' | 'error';
6
+ percentage?: number;
7
+ uid?: number | string;
8
+ raw?: File;
9
+ response?: any;
10
+ thumbUrl?: string;
11
+ }
12
+ type __VLS_Props = {
13
+ action?: string;
14
+ headers?: Record<string, string>;
15
+ data?: Record<string, any>;
16
+ multiple?: boolean;
17
+ accept?: string;
18
+ limit?: number;
19
+ disabled?: boolean;
20
+ drag?: boolean;
21
+ listType?: 'text' | 'picture' | 'picture-card';
22
+ autoUpload?: boolean;
23
+ fileList?: UploadFile[];
24
+ showFileList?: boolean;
25
+ withCredentials?: boolean;
26
+ name?: string;
27
+ httpRequest?: (options: any) => Promise<any>;
28
+ beforeUpload?: (file: File, fileList: File[]) => boolean | Promise<boolean>;
29
+ beforeRemove?: (file: UploadFile, fileList: UploadFile[]) => boolean;
30
+ onSuccess?: (response: any, file: UploadFile, fileList: UploadFile[]) => void;
31
+ onError?: (error: Error, file: UploadFile, fileList: UploadFile[]) => void;
32
+ onProgress?: (event: {
33
+ percent: number;
34
+ }, file: UploadFile, fileList: UploadFile[]) => void;
35
+ onChange?: (file: UploadFile, fileList: UploadFile[]) => void;
36
+ onRemove?: (file: UploadFile, fileList: UploadFile[]) => void;
37
+ onExceed?: (files: File[], fileList: UploadFile[]) => void;
38
+ };
39
+ declare function __VLS_template(): {
40
+ attrs: Partial<{}>;
41
+ slots: {
42
+ drag?(_: {}): any;
43
+ trigger?(_: {}): any;
44
+ trigger?(_: {}): any;
45
+ default?(_: {}): any;
46
+ tip?(_: {}): any;
47
+ };
48
+ refs: {
49
+ inputRef: HTMLInputElement;
50
+ };
51
+ rootEl: HTMLDivElement;
52
+ };
53
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
54
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
55
+ submit: () => void;
56
+ clearFiles: () => void;
57
+ uploadFiles: import('vue').Ref<{
58
+ name: string;
59
+ size?: number | undefined;
60
+ url?: string | undefined;
61
+ status?: "ready" | "uploading" | "success" | "error" | undefined;
62
+ percentage?: number | undefined;
63
+ uid?: number | string | undefined;
64
+ raw?: {
65
+ readonly lastModified: number;
66
+ readonly name: string;
67
+ readonly webkitRelativePath: string;
68
+ readonly size: number;
69
+ readonly type: string;
70
+ arrayBuffer: () => Promise<ArrayBuffer>;
71
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
72
+ slice: (start?: number, end?: number, contentType?: string) => Blob;
73
+ stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
74
+ text: () => Promise<string>;
75
+ } | undefined;
76
+ response?: any;
77
+ thumbUrl?: string | undefined;
78
+ }[], UploadFile[] | {
79
+ name: string;
80
+ size?: number | undefined;
81
+ url?: string | undefined;
82
+ status?: "ready" | "uploading" | "success" | "error" | undefined;
83
+ percentage?: number | undefined;
84
+ uid?: number | string | undefined;
85
+ raw?: {
86
+ readonly lastModified: number;
87
+ readonly name: string;
88
+ readonly webkitRelativePath: string;
89
+ readonly size: number;
90
+ readonly type: string;
91
+ arrayBuffer: () => Promise<ArrayBuffer>;
92
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
93
+ slice: (start?: number, end?: number, contentType?: string) => Blob;
94
+ stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
95
+ text: () => Promise<string>;
96
+ } | undefined;
97
+ response?: any;
98
+ thumbUrl?: string | undefined;
99
+ }[]>;
100
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
101
+ change: (file: UploadFile, fileList: UploadFile[]) => any;
102
+ progress: (event: {
103
+ percent: number;
104
+ }, file: UploadFile, fileList: UploadFile[]) => any;
105
+ exceed: (files: File[], fileList: UploadFile[]) => any;
106
+ error: (error: Error, file: UploadFile, fileList: UploadFile[]) => any;
107
+ success: (response: any, file: UploadFile, fileList: UploadFile[]) => any;
108
+ "update:fileList": (fileList: UploadFile[]) => any;
109
+ remove: (file: UploadFile, fileList: UploadFile[]) => any;
110
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
111
+ onChange?: ((file: UploadFile, fileList: UploadFile[]) => any) | undefined;
112
+ onProgress?: ((event: {
113
+ percent: number;
114
+ }, file: UploadFile, fileList: UploadFile[]) => any) | undefined;
115
+ onExceed?: ((files: File[], fileList: UploadFile[]) => any) | undefined;
116
+ onError?: ((error: Error, file: UploadFile, fileList: UploadFile[]) => any) | undefined;
117
+ onSuccess?: ((response: any, file: UploadFile, fileList: UploadFile[]) => any) | undefined;
118
+ "onUpdate:fileList"?: ((fileList: UploadFile[]) => any) | undefined;
119
+ onRemove?: ((file: UploadFile, fileList: UploadFile[]) => any) | undefined;
120
+ }>, {
121
+ name: string;
122
+ disabled: boolean;
123
+ drag: boolean;
124
+ multiple: boolean;
125
+ action: string;
126
+ listType: "text" | "picture" | "picture-card";
127
+ autoUpload: boolean;
128
+ fileList: UploadFile[];
129
+ showFileList: boolean;
130
+ withCredentials: boolean;
131
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
132
+ inputRef: HTMLInputElement;
133
+ }, HTMLDivElement>;
134
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
135
+ export default _default;
136
+ type __VLS_WithTemplateSlots<T, S> = T & {
137
+ new (): {
138
+ $slots: S;
139
+ };
140
+ };