wlwy-package 3.2.2 → 4.0.0-beta.1
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/editor/index.es.js +1 -1
- package/dist/{editor-core-D9MSA0yc.js → editor-core-BuQ0a_wZ.js} +2 -2
- package/dist/{index-DbAXWdHe.js → index-CcW4jJHZ.js} +1 -1
- package/dist/{index-D4mQXwMj.js → index-DHKUfRSS.js} +189 -17
- package/dist/style.css +1 -1
- package/dist/types/packages/components/antd/src/datePicker.vue.d.ts +1 -1
- package/dist/types/packages/components/common/index.d.ts +0 -3
- package/dist/types/packages/components/common/src/page.vue.d.ts +1 -1
- package/dist/types/packages/components/common/src/rangePicker.vue.d.ts +1 -1
- package/dist/types/packages/components/common/type.d.ts +1 -37
- package/dist/types/packages/components/form/default/index.d.ts +1 -7
- package/dist/types/packages/components/form/default/src/checkbox.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/dateRange.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/form.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/numberRange.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/radio.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/select.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/src/selectInput.vue.d.ts +1 -0
- package/dist/types/packages/components/form/default/type.d.ts +100 -249
- package/dist/types/packages/components/index.d.ts +0 -1
- package/dist/types/packages/components/table/constants.d.ts +3 -5
- package/dist/types/packages/components/table/index.d.ts +1 -1
- package/dist/types/packages/components/table/resolveToolbarButtons.d.ts +16 -0
- package/dist/types/packages/components/table/src/search.vue.d.ts +9 -3
- package/dist/types/packages/components/table/src/table.vue.d.ts +8 -20
- package/dist/types/packages/components/{common/src/editTitle.vue.d.ts → table/src/toolbarButtons.vue.d.ts} +7 -7
- package/dist/types/packages/components/table/type.d.ts +101 -15
- package/dist/types/packages/components/table/useWTableConfig.d.ts +0 -1
- package/dist/types/packages/components/table/warnDeprecated.d.ts +3 -5
- package/dist/types/packages/hooks/private/src/useRenderCell.d.ts +6 -4
- package/dist/types/packages/hooks/web/index.d.ts +1 -4
- package/dist/types/packages/hooks/web/src/useDate.d.ts +65 -0
- package/dist/types/packages/keys/index.d.ts +3 -0
- package/dist/types/packages/utils/formatCellValue.d.ts +5 -1
- package/dist/types/packages/utils/index.d.ts +2 -1
- package/dist/types/packages/utils/resolveDefaultValue.d.ts +7 -0
- package/dist/types/packages/utils/type.d.ts +7 -0
- package/dist/wlwy-package.es.js +2599 -4162
- package/package.json +1 -1
- package/dist/types/packages/components/common/src/pageHead.vue.d.ts +0 -29
- package/dist/types/packages/components/form/default/src/modal.vue.d.ts +0 -46
- package/dist/types/packages/components/form/default/src/page.vue.d.ts +0 -48
- package/dist/types/packages/components/form/default/src/wrap.vue.d.ts +0 -56
- package/dist/types/packages/components/list/index.d.ts +0 -7
- package/dist/types/packages/components/list/input.d.ts +0 -432
- package/dist/types/packages/components/list/src/header.vue.d.ts +0 -44
- package/dist/types/packages/components/list/src/index.vue.d.ts +0 -68
- package/dist/types/packages/components/list/src/pager.vue.d.ts +0 -10
- package/dist/types/packages/components/list/src/table.vue.d.ts +0 -774
- package/dist/types/packages/components/list/type.d.ts +0 -346
- package/dist/types/packages/components/table/resolveInjectColumns.d.ts +0 -17
- package/dist/types/packages/hooks/web/src/useListConfig.d.ts +0 -16
- package/dist/types/packages/hooks/web/src/usePageForm.d.ts +0 -9
- package/dist/types/packages/hooks/web/src/usePrefixTitle.d.ts +0 -7
- package/dist/types/packages/hooks/web/src/useUpload.d.ts +0 -1
|
@@ -9,7 +9,7 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value: string | dayjs.Dayjs | undefined) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
|
-
picker: "
|
|
12
|
+
picker: "month" | "year" | "date" | "week" | "quarter" | "time";
|
|
13
13
|
allowClear: boolean;
|
|
14
14
|
futureTimeAllowed: boolean;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,14 +6,11 @@ export type { WCropperProp, WCropperInstance } from './type';
|
|
|
6
6
|
export { default as WCropper } from './src/cropper.vue';
|
|
7
7
|
export type { WTableInstance, WPagerProps, WPagerInstance, ResetPagerParams, PagerState, WColumnProp, WListSearchProps, WListSearchInstance } from '../table';
|
|
8
8
|
export { WTable, WPager, WColumn, WListSearch } from '../table';
|
|
9
|
-
export { default as WEditTitle } from './src/editTitle.vue';
|
|
10
9
|
export type { WDropdownProps, WDropdownListItem } from './type';
|
|
11
10
|
export { default as WDropdown } from './src/dropdown.vue';
|
|
12
11
|
export type { WUploadModalProps } from './type';
|
|
13
12
|
export { default as WUploadModal } from './src/upload-modal.vue';
|
|
14
13
|
export { default as WSlashHeader } from './src/slashHeader.vue';
|
|
15
|
-
export type { WPageHeadProps } from './type';
|
|
16
|
-
export { default as WPageHead } from './src/pageHead.vue';
|
|
17
14
|
export type { WRangePickerProps } from './type';
|
|
18
15
|
export { default as WRangePicker } from './src/rangePicker.vue';
|
|
19
16
|
export type { WPageProps } from './type';
|
|
@@ -27,8 +27,8 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Prop
|
|
|
27
27
|
cancelText: string;
|
|
28
28
|
hideFooter: boolean | FooterButtonType[];
|
|
29
29
|
questionIcon: string;
|
|
30
|
-
refreshText: string;
|
|
31
30
|
hideButton: boolean | FooterButtonType[];
|
|
31
|
+
refreshText: string;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
33
33
|
export default _default;
|
|
34
34
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -17,7 +17,7 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
17
17
|
"onUpdate:start"?: ((value: string | number | dayjs.Dayjs | undefined) => any) | undefined;
|
|
18
18
|
"onUpdate:end"?: ((value: string | number | dayjs.Dayjs | undefined) => any) | undefined;
|
|
19
19
|
}>, {
|
|
20
|
-
picker: "
|
|
20
|
+
picker: "month" | "year" | "date" | "week" | "quarter" | "time";
|
|
21
21
|
allowClear: boolean;
|
|
22
22
|
futureTimeAllowed: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -92,6 +92,7 @@ export type WCropperInstance = {
|
|
|
92
92
|
export type WDropdownListItem = {
|
|
93
93
|
key: KeyType;
|
|
94
94
|
label: string;
|
|
95
|
+
value?: KeyType;
|
|
95
96
|
};
|
|
96
97
|
/**
|
|
97
98
|
* w-dropdown 组件属性
|
|
@@ -173,43 +174,6 @@ export interface WUploadModalInstance {
|
|
|
173
174
|
setUploading: (uploading: boolean) => void;
|
|
174
175
|
onUploadProgress: (progressEvent: AxiosProgressEvent) => void;
|
|
175
176
|
}
|
|
176
|
-
/**
|
|
177
|
-
* w-page-head组件属性
|
|
178
|
-
*/
|
|
179
|
-
export interface WPageHeadProps {
|
|
180
|
-
/**
|
|
181
|
-
* 页面表单标题,会自动添加表单模式前缀
|
|
182
|
-
*/
|
|
183
|
-
title?: string;
|
|
184
|
-
/**
|
|
185
|
-
* 页面表单提示语
|
|
186
|
-
*/
|
|
187
|
-
question?: string;
|
|
188
|
-
/**
|
|
189
|
-
* 页面表单提示语图标
|
|
190
|
-
*/
|
|
191
|
-
questionIcon?: string;
|
|
192
|
-
/**
|
|
193
|
-
* 页面表单loading状态
|
|
194
|
-
*/
|
|
195
|
-
loading?: boolean;
|
|
196
|
-
/**
|
|
197
|
-
* 页面表单顶部是否隐藏,可隐藏单独按钮
|
|
198
|
-
*/
|
|
199
|
-
hideButton?: boolean | Array<FooterButtonType>;
|
|
200
|
-
/**
|
|
201
|
-
* 页面表单顶部确定按钮文本
|
|
202
|
-
*/
|
|
203
|
-
okText?: string;
|
|
204
|
-
/**
|
|
205
|
-
* 页面表单顶部取消按钮文本
|
|
206
|
-
*/
|
|
207
|
-
cancelText?: string;
|
|
208
|
-
/**
|
|
209
|
-
* 页面表单顶部刷新按钮文本
|
|
210
|
-
*/
|
|
211
|
-
refreshText?: string;
|
|
212
|
-
}
|
|
213
177
|
/**
|
|
214
178
|
* w-range-picker 组件属性
|
|
215
179
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { FormItemXxProps, WFormInstance } from './type';
|
|
1
|
+
export type { FormItemXxProps, WFormInstance, DefaultValueType, MaybePromise } from './type';
|
|
2
2
|
export { default as WForm } from './src/form.vue';
|
|
3
3
|
export { default as WFormItem } from './src/formItem.vue';
|
|
4
4
|
export { default as WFormCol } from './src/formCol.vue';
|
|
@@ -36,9 +36,3 @@ export type { WFormUploadProps } from './type';
|
|
|
36
36
|
export { default as WFormUpload } from './src/upload.vue';
|
|
37
37
|
export type { WFormUploadImageProps } from './type';
|
|
38
38
|
export { default as WFormUploadImage } from './src/upload-image.vue';
|
|
39
|
-
export type { WFormModalProps, WFormModalInstance, WFormModalOkHandleType } from './type';
|
|
40
|
-
export { default as WFormModal } from './src/modal.vue';
|
|
41
|
-
export type { WFormPageProps, WFormPageInstance, WFormPageOkHandleType } from './type';
|
|
42
|
-
export { default as WFormPage } from './src/page.vue';
|
|
43
|
-
export type { WFormWrapProps, WFormWrapInstance, WFormWrapOkHandleType } from './type';
|
|
44
|
-
export { default as WFormWrap } from './src/wrap.vue';
|
|
@@ -3,6 +3,7 @@ import type { OptionType } from '../../../../type';
|
|
|
3
3
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<WFormCheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormCheckboxProps> & Readonly<{}>, {
|
|
4
4
|
params: any;
|
|
5
5
|
method: string;
|
|
6
|
+
options: OptionType[];
|
|
6
7
|
option: OptionType[];
|
|
7
8
|
allowClear: boolean;
|
|
8
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { WFormDateRangeProps } from '../type';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<WFormDateRangeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormDateRangeProps> & Readonly<{}>, {
|
|
3
|
+
options: import("../../../common").WDropdownListItem[];
|
|
3
4
|
option: import("../../../common").WDropdownListItem[];
|
|
4
5
|
format: FormatType;
|
|
5
6
|
allowClear: boolean;
|
|
@@ -416,6 +416,7 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<WFormProps
|
|
|
416
416
|
$tm<Key_30 extends string, Messages extends object = {}, ResourceKeys_30 extends import("vue-i18n").PickupKeys<Messages> = import("vue-i18n").PickupKeys<Messages>>(key: Key_30 | ResourceKeys_30): {} | import("vue-i18n").LocaleMessageValue<import("vue-i18n").VueMessageType>;
|
|
417
417
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormProps> & Readonly<{}>, {
|
|
418
418
|
name: string;
|
|
419
|
+
gutter: number | Partial<Record<import("ant-design-vue/es/_util/responsiveObserve").Breakpoint, number>> | [import("ant-design-vue/es/grid/Row").Gutter, import("ant-design-vue/es/grid/Row").Gutter];
|
|
419
420
|
labelAlign: import("ant-design-vue/es/form/interface").FormLabelAlign;
|
|
420
421
|
scrollToFirstError: boolean | import("scroll-into-view-if-needed").Options<any>;
|
|
421
422
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -3,6 +3,7 @@ import { type WDropdownListItem } from '../../../common';
|
|
|
3
3
|
declare const _default: import("vue").DefineComponent<WFormNumberRangeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormNumberRangeProps> & Readonly<{}>, {
|
|
4
4
|
min: number;
|
|
5
5
|
max: number;
|
|
6
|
+
options: WDropdownListItem[];
|
|
6
7
|
option: WDropdownListItem[];
|
|
7
8
|
allowClear: boolean;
|
|
8
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,6 +3,7 @@ import type { OptionType } from '../../../../type';
|
|
|
3
3
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<WFormRadioProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormRadioProps> & Readonly<{}>, {
|
|
4
4
|
params: any;
|
|
5
5
|
method: string;
|
|
6
|
+
options: OptionType[];
|
|
6
7
|
option: OptionType[];
|
|
7
8
|
allowClear: boolean;
|
|
8
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -9,6 +9,7 @@ type __VLS_Slots = {} & {
|
|
|
9
9
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<WFormSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WFormSelectProps> & Readonly<{}>, {
|
|
10
10
|
params: any;
|
|
11
11
|
method: string;
|
|
12
|
+
options: OptionType[];
|
|
12
13
|
option: OptionType[];
|
|
13
14
|
allowClear: boolean;
|
|
14
15
|
autoClearSearchValue: boolean;
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<WFormSelectInputProps, {},
|
|
|
5
5
|
}, string, import("vue").PublicProps, Readonly<WFormSelectInputProps> & Readonly<{
|
|
6
6
|
onSelectChange?: ((value: import("ant-design-vue/es/select").SelectValue, option: import("ant-design-vue/es/select").DefaultOptionType | import("ant-design-vue/es/select").DefaultOptionType[]) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
|
+
options: WDropdownListItem[];
|
|
8
9
|
option: WDropdownListItem[];
|
|
9
10
|
allowClear: boolean;
|
|
10
11
|
tokenSeparators: string[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InputNumberProps, type ColProps, type DatePickerProps, type FormInstance, type FormItemProps, type FormProps, type RowProps, type SelectProps, type TimeRangePickerProps, type UploadProps } from 'ant-design-vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { OptionType } from '../../../type';
|
|
3
3
|
import type { WCropperProp } from '../../common';
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
export type
|
|
4
|
+
import type { WUploadProps } from '../../antd';
|
|
5
|
+
import type { WDropdownListItem } from '../../common/type';
|
|
6
|
+
import type { Dayjs } from 'dayjs';
|
|
7
|
+
import type { DefaultValueType } from '../../../utils/type';
|
|
8
|
+
export type { DefaultValueType, MaybePromise } from '../../../utils/type';
|
|
9
9
|
/**
|
|
10
10
|
* w-form 组件实例
|
|
11
11
|
*/
|
|
@@ -42,7 +42,7 @@ export type FormItemLabelTooltipProps = {
|
|
|
42
42
|
/**
|
|
43
43
|
* w-form-item 组件属性
|
|
44
44
|
*/
|
|
45
|
-
export interface WFormItemProps extends WFormColProps, Pick<FormItemProps, 'name' | 'labelCol' | 'wrapperCol'>, FormItemLabelTooltipProps {
|
|
45
|
+
export interface WFormItemProps extends WFormColProps, Pick<FormItemProps, 'name' | 'labelCol' | 'wrapperCol' | 'colon'>, FormItemLabelTooltipProps {
|
|
46
46
|
/**
|
|
47
47
|
* item Lable名称
|
|
48
48
|
*/
|
|
@@ -109,11 +109,21 @@ export interface WFormInputProps extends Partial<FormItemXxProps> {
|
|
|
109
109
|
* 输入字母大小写转换类型
|
|
110
110
|
*/
|
|
111
111
|
textTransform?: TextTransformType;
|
|
112
|
+
/**
|
|
113
|
+
* 默认值(仅在为空时写入;重置时强制回写)
|
|
114
|
+
* 支持静态值、Promise、同步/异步函数,解析结果为 string
|
|
115
|
+
*/
|
|
116
|
+
defaultValue?: DefaultValueType<string>;
|
|
112
117
|
}
|
|
113
118
|
/**
|
|
114
119
|
* w-form-number 组件属性
|
|
115
120
|
*/
|
|
116
121
|
export interface WFormNumberProps extends FormItemXxProps {
|
|
122
|
+
/**
|
|
123
|
+
* 默认值(仅在为空时写入;重置时强制回写)
|
|
124
|
+
* 支持静态值、Promise、同步/异步函数,解析结果为 number
|
|
125
|
+
*/
|
|
126
|
+
defaultValue?: DefaultValueType<number>;
|
|
117
127
|
}
|
|
118
128
|
/**
|
|
119
129
|
* w-form-i18n 组件属性
|
|
@@ -132,20 +142,34 @@ export interface WFormTagsProps extends FormItemXxProps, Pick<SelectProps, 'toke
|
|
|
132
142
|
* 超出最大标签数量提示
|
|
133
143
|
*/
|
|
134
144
|
maxTagLengthMessage?: string | ((length: number) => string);
|
|
145
|
+
/**
|
|
146
|
+
* 默认值(仅在为空时写入;重置时强制回写)
|
|
147
|
+
* 支持静态值、Promise、同步/异步函数,解析结果为数组
|
|
148
|
+
*/
|
|
149
|
+
defaultValue?: DefaultValueType<(string | number)[]>;
|
|
135
150
|
}
|
|
136
151
|
/**
|
|
137
152
|
* w-textarea 组件属性
|
|
138
153
|
*/
|
|
139
154
|
export interface WFormTextareaProps extends FormItemXxProps {
|
|
155
|
+
/**
|
|
156
|
+
* 默认值(仅在为空时写入;重置时强制回写)
|
|
157
|
+
* 支持静态值、Promise、同步/异步函数,解析结果为 string
|
|
158
|
+
*/
|
|
159
|
+
defaultValue?: DefaultValueType<string>;
|
|
140
160
|
}
|
|
141
161
|
/**
|
|
142
162
|
* w-select 组件属性
|
|
143
163
|
*/
|
|
144
164
|
export interface WFormSelectProps extends FormItemXxProps, Pick<SelectProps, 'loading' | 'autoClearSearchValue' | 'mode' | 'filterOption'> {
|
|
145
165
|
/**
|
|
146
|
-
*
|
|
166
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
147
167
|
*/
|
|
148
168
|
option?: OptionType[];
|
|
169
|
+
/**
|
|
170
|
+
* 下拉框选项列表
|
|
171
|
+
*/
|
|
172
|
+
options?: OptionType[];
|
|
149
173
|
/**
|
|
150
174
|
* 加载下拉框选项列表接口url
|
|
151
175
|
*/
|
|
@@ -167,15 +191,24 @@ export interface WFormSelectProps extends FormItemXxProps, Pick<SelectProps, 'lo
|
|
|
167
191
|
* 接口请求keyword
|
|
168
192
|
*/
|
|
169
193
|
searchKeyword?: string;
|
|
194
|
+
/**
|
|
195
|
+
* 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
|
|
196
|
+
* 支持静态值、Promise、同步/异步函数
|
|
197
|
+
*/
|
|
198
|
+
defaultValue?: DefaultValueType<string | number | (string | number)[]>;
|
|
170
199
|
}
|
|
171
200
|
/**
|
|
172
201
|
* w-select-input 组件属性
|
|
173
202
|
*/
|
|
174
203
|
export interface WFormSelectInputProps extends FormItemXxProps, Pick<SelectProps, 'tokenSeparators'> {
|
|
175
204
|
/**
|
|
176
|
-
*
|
|
205
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
177
206
|
*/
|
|
178
207
|
option?: WDropdownListItem[];
|
|
208
|
+
/**
|
|
209
|
+
* Label 下拉选项列表
|
|
210
|
+
*/
|
|
211
|
+
options?: WDropdownListItem[];
|
|
179
212
|
/**
|
|
180
213
|
* 绑定Lable下拉组件字段名
|
|
181
214
|
*/
|
|
@@ -200,15 +233,28 @@ export interface WFormSelectInputProps extends FormItemXxProps, Pick<SelectProps
|
|
|
200
233
|
* 超出最大标签数量提示
|
|
201
234
|
*/
|
|
202
235
|
maxTagLengthMessage?: string | ((length: number) => string);
|
|
236
|
+
/**
|
|
237
|
+
* 输入区默认值(仅在为空时写入;重置时强制回写)
|
|
238
|
+
* 支持静态值、Promise、同步/异步函数
|
|
239
|
+
*/
|
|
240
|
+
defaultValue?: DefaultValueType<string | number | (string | number)[]>;
|
|
241
|
+
/**
|
|
242
|
+
* Label 下拉默认值;有值用它,否则用 options[0].value
|
|
243
|
+
*/
|
|
244
|
+
defaultLabelValue?: string | number;
|
|
203
245
|
}
|
|
204
246
|
/**
|
|
205
247
|
* w-select-date-range 组件属性
|
|
206
248
|
*/
|
|
207
249
|
export interface WFormDateRangeProps extends FormItemXxProps, Pick<DatePickerProps, 'picker' | 'showTime'>, Pick<TimeRangePickerProps, 'presets'> {
|
|
208
250
|
/**
|
|
209
|
-
*
|
|
251
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
210
252
|
*/
|
|
211
253
|
option?: WDropdownListItem[];
|
|
254
|
+
/**
|
|
255
|
+
* Label 下拉选项列表
|
|
256
|
+
*/
|
|
257
|
+
options?: WDropdownListItem[];
|
|
212
258
|
/**
|
|
213
259
|
* 绑定Lable下拉组件字段名
|
|
214
260
|
*/
|
|
@@ -230,7 +276,7 @@ export interface WFormDateRangeProps extends FormItemXxProps, Pick<DatePickerPro
|
|
|
230
276
|
*/
|
|
231
277
|
keys?: string | [StartField: string, EndField: string];
|
|
232
278
|
/**
|
|
233
|
-
*
|
|
279
|
+
* 搜索区重置时是否删除绑定字段
|
|
234
280
|
* @default true
|
|
235
281
|
*/
|
|
236
282
|
delModel?: boolean;
|
|
@@ -239,6 +285,15 @@ export interface WFormDateRangeProps extends FormItemXxProps, Pick<DatePickerPro
|
|
|
239
285
|
* @default true
|
|
240
286
|
*/
|
|
241
287
|
futureTimeAllowed?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* 默认时间范围(仅在 form[model] 为空时写入)
|
|
290
|
+
* 支持静态值、Promise、同步/异步函数
|
|
291
|
+
*/
|
|
292
|
+
defaultValue?: DefaultValueType<[Dayjs, Dayjs] | [string, string] | [number, number]>;
|
|
293
|
+
/**
|
|
294
|
+
* Label 下拉默认值;有值用它,否则用 options[0].value
|
|
295
|
+
*/
|
|
296
|
+
defaultLabelValue?: string | number;
|
|
242
297
|
}
|
|
243
298
|
/**
|
|
244
299
|
* w-select-time-picker 组件属性
|
|
@@ -258,7 +313,7 @@ export interface WFormDatePickerProps extends FormItemXxProps {
|
|
|
258
313
|
*/
|
|
259
314
|
format?: string;
|
|
260
315
|
/**
|
|
261
|
-
*
|
|
316
|
+
* 搜索区重置时是否删除绑定字段
|
|
262
317
|
* @default true
|
|
263
318
|
*/
|
|
264
319
|
delModel?: boolean;
|
|
@@ -268,9 +323,13 @@ export interface WFormDatePickerProps extends FormItemXxProps {
|
|
|
268
323
|
*/
|
|
269
324
|
export interface WFormCheckboxProps extends FormItemXxProps {
|
|
270
325
|
/**
|
|
271
|
-
*
|
|
326
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
272
327
|
*/
|
|
273
328
|
option?: OptionType[];
|
|
329
|
+
/**
|
|
330
|
+
* 复选框选项列表
|
|
331
|
+
*/
|
|
332
|
+
options?: OptionType[];
|
|
274
333
|
/**
|
|
275
334
|
* 复选框选项列表接口url,优先级高于 dict 字段
|
|
276
335
|
*/
|
|
@@ -296,15 +355,25 @@ export interface WFormCheckboxProps extends FormItemXxProps {
|
|
|
296
355
|
* 单个选项label字段,
|
|
297
356
|
*/
|
|
298
357
|
checkboxLabel?: string;
|
|
358
|
+
/**
|
|
359
|
+
* 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
|
|
360
|
+
* 单选 Checkbox 用 boolean;CheckboxGroup 用数组
|
|
361
|
+
* 支持静态值、Promise、同步/异步函数
|
|
362
|
+
*/
|
|
363
|
+
defaultValue?: DefaultValueType<boolean | (string | number)[]>;
|
|
299
364
|
}
|
|
300
365
|
/**
|
|
301
366
|
* w-radio 组件属性
|
|
302
367
|
*/
|
|
303
368
|
export interface WFormRadioProps extends FormItemXxProps {
|
|
304
369
|
/**
|
|
305
|
-
*
|
|
370
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
306
371
|
*/
|
|
307
372
|
option?: OptionType[];
|
|
373
|
+
/**
|
|
374
|
+
* 单选框选项列表
|
|
375
|
+
*/
|
|
376
|
+
options?: OptionType[];
|
|
308
377
|
/**
|
|
309
378
|
* 单选框选项列表接口url,优先级高于 dict 字段
|
|
310
379
|
*/
|
|
@@ -326,6 +395,11 @@ export interface WFormRadioProps extends FormItemXxProps {
|
|
|
326
395
|
* 快捷请求数据字典同/platform/basicDict/list接口dataType字段
|
|
327
396
|
*/
|
|
328
397
|
dict?: string;
|
|
398
|
+
/**
|
|
399
|
+
* 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
|
|
400
|
+
* 支持静态值、Promise、同步/异步函数
|
|
401
|
+
*/
|
|
402
|
+
defaultValue?: DefaultValueType<string | number>;
|
|
329
403
|
}
|
|
330
404
|
type InputNumberConfig = ({
|
|
331
405
|
/**
|
|
@@ -342,9 +416,13 @@ type InputNumberConfig = ({
|
|
|
342
416
|
*/
|
|
343
417
|
export interface WFormNumberRangeProps extends FormItemXxProps {
|
|
344
418
|
/**
|
|
345
|
-
*
|
|
419
|
+
* @deprecated 已废弃,请使用 options 代替
|
|
346
420
|
*/
|
|
347
421
|
option?: WDropdownListItem[];
|
|
422
|
+
/**
|
|
423
|
+
* Label 下拉选项列表
|
|
424
|
+
*/
|
|
425
|
+
options?: WDropdownListItem[];
|
|
348
426
|
/**
|
|
349
427
|
* 绑定Lable下拉组件字段名
|
|
350
428
|
*/
|
|
@@ -437,244 +515,17 @@ export interface WInputMatchProps extends FormItemXxProps, Pick<SelectProps, 'to
|
|
|
437
515
|
* 超出最大标签数量提示
|
|
438
516
|
*/
|
|
439
517
|
maxTagLengthMessage?: string | ((length: number) => string);
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* w-form-modal组件属性
|
|
443
|
-
*/
|
|
444
|
-
export interface WFormModalProps<T extends string = HandlerMode> extends Omit<WModalProps, 'title'> {
|
|
445
|
-
/**
|
|
446
|
-
* 表单模式,如add | edit
|
|
447
|
-
*/
|
|
448
|
-
mode?: T;
|
|
449
|
-
/**
|
|
450
|
-
* 表单是否禁用
|
|
451
|
-
*/
|
|
452
|
-
disabled?: boolean;
|
|
453
|
-
/**
|
|
454
|
-
* 页面表单标题,会自动添加表单模式前缀
|
|
455
|
-
*/
|
|
456
|
-
title?: string;
|
|
457
|
-
/**
|
|
458
|
-
* 页面表单loading状态
|
|
459
|
-
*/
|
|
460
|
-
loading?: boolean;
|
|
461
|
-
/**
|
|
462
|
-
* 当前行数据
|
|
463
|
-
*/
|
|
464
|
-
row?: {
|
|
465
|
-
[keys: string]: any;
|
|
466
|
-
};
|
|
467
|
-
/**
|
|
468
|
-
* 请求链接
|
|
469
|
-
*/
|
|
470
|
-
urls?: {
|
|
471
|
-
[keys in T]?: string | (() => Promise<any>);
|
|
472
|
-
};
|
|
473
|
-
/**
|
|
474
|
-
* 详情请求模式,默认GET
|
|
475
|
-
*/
|
|
476
|
-
detailsApiMethod?: 'GET' | 'POST';
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* 弹窗表单实例
|
|
480
|
-
*/
|
|
481
|
-
export interface WFormModalInstance extends UseWatchFormType {
|
|
482
|
-
/**
|
|
483
|
-
* 获取表单实例
|
|
484
|
-
*/
|
|
485
|
-
getFormInstance: () => FormInstance | undefined;
|
|
486
|
-
/**
|
|
487
|
-
* 监听表单初始化完成事件
|
|
488
|
-
* @param cb 回调函数
|
|
489
|
-
* @param one 是否只监听一次
|
|
490
|
-
*/
|
|
491
|
-
onFormInitialized: (cb: FormInitializedCallback, one?: boolean) => void;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* w-form-modal点击确定回调参数
|
|
495
|
-
*/
|
|
496
|
-
export type WFormModalOkHandleType = {
|
|
497
|
-
/**
|
|
498
|
-
* 表单实例
|
|
499
|
-
*/
|
|
500
|
-
formInstance: FormInstance | undefined;
|
|
501
|
-
/**
|
|
502
|
-
* 表单数据
|
|
503
|
-
*/
|
|
504
|
-
form: any;
|
|
505
|
-
/**
|
|
506
|
-
* 设置表单loading状态
|
|
507
|
-
*/
|
|
508
|
-
setLoading: (loading: boolean) => void;
|
|
509
518
|
/**
|
|
510
|
-
*
|
|
519
|
+
* 主输入默认值(仅在为空时写入;重置时强制回写)
|
|
520
|
+
* 支持静态值、Promise、同步/异步函数
|
|
511
521
|
*/
|
|
512
|
-
|
|
513
|
-
[key: string]: any;
|
|
514
|
-
}>;
|
|
522
|
+
defaultValue?: DefaultValueType<string | number | (string | number)[]>;
|
|
515
523
|
/**
|
|
516
|
-
*
|
|
517
|
-
* @param url 请求链接
|
|
518
|
-
* @param data 请求数据
|
|
519
|
-
* @returns 接口返回数据
|
|
524
|
+
* Label 下拉默认值;有值用它,否则用 labelOption[0].value
|
|
520
525
|
*/
|
|
521
|
-
|
|
526
|
+
defaultLabelValue?: string | number;
|
|
522
527
|
/**
|
|
523
|
-
*
|
|
524
|
-
* @param url 请求链接
|
|
525
|
-
* @param data 请求数据
|
|
526
|
-
* @returns 接口返回数据
|
|
528
|
+
* after 下拉默认值;有值用它,否则用 afterOption[0].value
|
|
527
529
|
*/
|
|
528
|
-
|
|
529
|
-
};
|
|
530
|
-
/**
|
|
531
|
-
* w-form-page组件属性
|
|
532
|
-
*/
|
|
533
|
-
export interface WFormPageProps<T extends string = HandlerMode> {
|
|
534
|
-
/**
|
|
535
|
-
* 表单模式,如add | edit
|
|
536
|
-
*/
|
|
537
|
-
mode: T;
|
|
538
|
-
/**
|
|
539
|
-
* 页面表单标题,会自动添加表单模式前缀
|
|
540
|
-
*/
|
|
541
|
-
title?: string;
|
|
542
|
-
/**
|
|
543
|
-
* 页面表单提示语
|
|
544
|
-
*/
|
|
545
|
-
question?: string;
|
|
546
|
-
/**
|
|
547
|
-
* 页面表单提示语图标
|
|
548
|
-
*/
|
|
549
|
-
questionIcon?: string;
|
|
550
|
-
/**
|
|
551
|
-
* 页面表单loading状态
|
|
552
|
-
*/
|
|
553
|
-
loading?: boolean;
|
|
554
|
-
/**
|
|
555
|
-
* 页面表单顶部是否隐藏,可隐藏单独按钮
|
|
556
|
-
*/
|
|
557
|
-
hideFooter?: boolean | Array<FooterButtonType>;
|
|
558
|
-
/**
|
|
559
|
-
* 页面表单顶部确定按钮文本
|
|
560
|
-
*/
|
|
561
|
-
okText?: string;
|
|
562
|
-
/**
|
|
563
|
-
* 页面表单顶部取消按钮文本
|
|
564
|
-
*/
|
|
565
|
-
cancelText?: string;
|
|
566
|
-
/**
|
|
567
|
-
* 页面表单顶部刷新按钮文本
|
|
568
|
-
*/
|
|
569
|
-
refreshText?: string;
|
|
570
|
-
/**
|
|
571
|
-
* 页面表单配置
|
|
572
|
-
*/
|
|
573
|
-
row?: {
|
|
574
|
-
[keys: string]: any;
|
|
575
|
-
};
|
|
576
|
-
/**
|
|
577
|
-
* 请求链接
|
|
578
|
-
*/
|
|
579
|
-
urls?: {
|
|
580
|
-
[keys in T]?: string | (() => Promise<any>);
|
|
581
|
-
};
|
|
582
|
-
/**
|
|
583
|
-
* 详情请求模式,默认GET
|
|
584
|
-
*/
|
|
585
|
-
detailsApiMethod?: 'GET' | 'POST';
|
|
586
|
-
/**
|
|
587
|
-
* class
|
|
588
|
-
*/
|
|
589
|
-
className?: string;
|
|
590
|
-
/**
|
|
591
|
-
* 详情请求后拦截器
|
|
592
|
-
*/
|
|
593
|
-
afterDetailsInterceptor?: (form: any) => any;
|
|
594
|
-
}
|
|
595
|
-
/**
|
|
596
|
-
* 页面表单实例
|
|
597
|
-
*/
|
|
598
|
-
export interface WFormPageInstance extends Omit<WFormModalInstance, 'onFormInitialized'> {
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* w-form-page点击确定回调参数
|
|
602
|
-
*/
|
|
603
|
-
export interface WFormPageOkHandleType extends WFormModalOkHandleType {
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* w-form-page组件属性
|
|
607
|
-
*/
|
|
608
|
-
export interface WFormWrapProps<T extends string = HandlerMode> {
|
|
609
|
-
/**
|
|
610
|
-
* 表单模式,如add | edit
|
|
611
|
-
*/
|
|
612
|
-
mode?: T;
|
|
613
|
-
/**
|
|
614
|
-
* 页面表单标题,会自动添加表单模式前缀
|
|
615
|
-
*/
|
|
616
|
-
title?: string;
|
|
617
|
-
/**
|
|
618
|
-
* 页面表单提示语
|
|
619
|
-
*/
|
|
620
|
-
question?: string;
|
|
621
|
-
/**
|
|
622
|
-
* 页面表单提示语图标
|
|
623
|
-
*/
|
|
624
|
-
questionIcon?: string;
|
|
625
|
-
/**
|
|
626
|
-
* 页面表单loading状态
|
|
627
|
-
*/
|
|
628
|
-
loading?: boolean;
|
|
629
|
-
/**
|
|
630
|
-
* 页面表单顶部是否隐藏,可隐藏单独按钮
|
|
631
|
-
*/
|
|
632
|
-
hideFooter?: boolean | Array<FooterButtonType>;
|
|
633
|
-
/**
|
|
634
|
-
* 页面表单顶部确定按钮文本
|
|
635
|
-
*/
|
|
636
|
-
okText?: string;
|
|
637
|
-
/**
|
|
638
|
-
* 页面表单顶部取消按钮文本
|
|
639
|
-
*/
|
|
640
|
-
cancelText?: string;
|
|
641
|
-
/**
|
|
642
|
-
* 页面表单顶部刷新按钮文本
|
|
643
|
-
*/
|
|
644
|
-
refreshText?: string;
|
|
645
|
-
/**
|
|
646
|
-
* 页面表单配置
|
|
647
|
-
*/
|
|
648
|
-
row?: {
|
|
649
|
-
[keys: string]: any;
|
|
650
|
-
};
|
|
651
|
-
/**
|
|
652
|
-
* 请求链接
|
|
653
|
-
*/
|
|
654
|
-
urls?: {
|
|
655
|
-
[keys in T]?: string | (() => Promise<any>);
|
|
656
|
-
};
|
|
657
|
-
/**
|
|
658
|
-
* 详情请求模式,默认GET
|
|
659
|
-
*/
|
|
660
|
-
detailsApiMethod?: 'GET' | 'POST';
|
|
661
|
-
/**
|
|
662
|
-
* class
|
|
663
|
-
*/
|
|
664
|
-
className?: string;
|
|
665
|
-
/**
|
|
666
|
-
* 详情请求后拦截器
|
|
667
|
-
*/
|
|
668
|
-
afterDetailsInterceptor?: (form: any) => any;
|
|
669
|
-
}
|
|
670
|
-
/**
|
|
671
|
-
* w-form-wrap实例
|
|
672
|
-
*/
|
|
673
|
-
export interface WFormWrapInstance extends Omit<WFormModalInstance, 'onFormInitialized'> {
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* w-form-wrap点击确定回调参数
|
|
677
|
-
*/
|
|
678
|
-
export interface WFormWrapOkHandleType extends WFormModalOkHandleType {
|
|
530
|
+
defaultAfterValue?: string | number;
|
|
679
531
|
}
|
|
680
|
-
export {};
|