wlwy-package 3.2.1 → 3.2.2
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/style.css +1 -1
- package/dist/types/index.d.ts +17 -0
- package/dist/types/packages/axios/index.d.ts +6 -0
- package/dist/types/packages/axios/service.d.ts +21 -0
- package/dist/types/packages/axios/types/index.d.ts +32 -0
- package/dist/types/packages/components/antd/index.d.ts +10 -0
- package/dist/types/packages/components/antd/src/button.vue.d.ts +10 -0
- package/dist/types/packages/components/antd/src/datePicker.vue.d.ts +16 -0
- package/dist/types/packages/components/antd/src/descriptions-item.vue.d.ts +9 -0
- package/dist/types/packages/components/antd/src/descriptions.vue.d.ts +6 -0
- package/dist/types/packages/components/antd/src/modal.vue.d.ts +30 -0
- package/dist/types/packages/components/antd/src/select.vue.d.ts +14 -0
- package/dist/types/packages/components/antd/src/statistic.vue.d.ts +3 -0
- package/dist/types/packages/components/antd/src/upload.vue.d.ts +40 -0
- package/dist/types/packages/components/antd/type.d.ts +164 -0
- package/dist/types/packages/components/common/index.d.ts +20 -0
- package/dist/types/packages/components/common/src/Redirect.vue.d.ts +2 -0
- package/dist/types/packages/components/common/src/configProvider.vue.d.ts +13 -0
- package/dist/types/packages/components/common/src/cropper.vue.d.ts +29 -0
- package/dist/types/packages/components/common/src/dropdown.vue.d.ts +23 -0
- package/dist/types/packages/components/common/src/editTitle.vue.d.ts +18 -0
- package/dist/types/packages/components/common/src/noData.vue.d.ts +7 -0
- package/dist/types/packages/components/common/src/page.vue.d.ts +38 -0
- package/dist/types/packages/components/common/src/pageHead.vue.d.ts +29 -0
- package/dist/types/packages/components/common/src/rangePicker.vue.d.ts +24 -0
- package/dist/types/packages/components/common/src/slashHeader.vue.d.ts +7 -0
- package/dist/types/packages/components/common/src/upload-modal.vue.d.ts +43 -0
- package/dist/types/packages/components/common/type.d.ts +296 -0
- package/dist/types/packages/components/form/business/index.d.ts +8 -0
- package/dist/types/packages/components/form/business/src/channel.vue.d.ts +5 -0
- package/dist/types/packages/components/form/business/src/country.vue.d.ts +3 -0
- package/dist/types/packages/components/form/business/src/customer.vue.d.ts +6 -0
- package/dist/types/packages/components/form/business/src/sku.vue.d.ts +5 -0
- package/dist/types/packages/components/form/business/type.d.ts +36 -0
- package/dist/types/packages/components/form/default/index.d.ts +44 -0
- package/dist/types/packages/components/form/default/src/checkbox.vue.d.ts +18 -0
- package/dist/types/packages/components/form/default/src/custom.vue.d.ts +14 -0
- package/dist/types/packages/components/form/default/src/datePicker.vue.d.ts +6 -0
- package/dist/types/packages/components/form/default/src/dateRange.vue.d.ts +10 -0
- package/dist/types/packages/components/form/default/src/form.vue.d.ts +429 -0
- package/dist/types/packages/components/form/default/src/formCol.vue.d.ts +16 -0
- package/dist/types/packages/components/form/default/src/formItem.vue.d.ts +20 -0
- package/dist/types/packages/components/form/default/src/formItemRest.vue.d.ts +2 -0
- package/dist/types/packages/components/form/default/src/input.vue.d.ts +26 -0
- package/dist/types/packages/components/form/default/src/inputI18n.vue.d.ts +14 -0
- package/dist/types/packages/components/form/default/src/inputMatch.vue.d.ts +18 -0
- package/dist/types/packages/components/form/default/src/inputNumber.vue.d.ts +16 -0
- package/dist/types/packages/components/form/default/src/inputPassword.vue.d.ts +16 -0
- package/dist/types/packages/components/form/default/src/inputTags.vue.d.ts +21 -0
- package/dist/types/packages/components/form/default/src/modal.vue.d.ts +46 -0
- package/dist/types/packages/components/form/default/src/numberRange.vue.d.ts +9 -0
- package/dist/types/packages/components/form/default/src/page.vue.d.ts +48 -0
- package/dist/types/packages/components/form/default/src/radio.vue.d.ts +18 -0
- package/dist/types/packages/components/form/default/src/select.vue.d.ts +21 -0
- package/dist/types/packages/components/form/default/src/selectInput.vue.d.ts +13 -0
- package/dist/types/packages/components/form/default/src/textarea.vue.d.ts +14 -0
- package/dist/types/packages/components/form/default/src/timePicker.vue.d.ts +6 -0
- package/dist/types/packages/components/form/default/src/upload-image.vue.d.ts +23 -0
- package/dist/types/packages/components/form/default/src/upload.vue.d.ts +12 -0
- package/dist/types/packages/components/form/default/src/wrap.vue.d.ts +56 -0
- package/dist/types/packages/components/form/default/type.d.ts +680 -0
- package/dist/types/packages/components/form/index.d.ts +2 -0
- package/dist/types/packages/components/form/type.d.ts +2 -0
- package/dist/types/packages/components/icon/index.d.ts +4 -0
- package/dist/types/packages/components/icon/src/icon.vue.d.ts +12 -0
- package/dist/types/packages/components/icon/src/index.vue.d.ts +9 -0
- package/dist/types/packages/components/icon/src/switch.vue.d.ts +18 -0
- package/dist/types/packages/components/icon/type.d.ts +41 -0
- package/dist/types/packages/components/index.d.ts +7 -0
- package/dist/types/packages/components/layout/blank.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/index.d.ts +7 -0
- package/dist/types/packages/components/layout/index.vue.d.ts +9 -0
- package/dist/types/packages/components/layout/skeleton/list.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/skeleton/switch.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/footer.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/header/index.vue.d.ts +10 -0
- package/dist/types/packages/components/layout/src/header/modules/download.vue.d.ts +6 -0
- package/dist/types/packages/components/layout/src/header/modules/language.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/header/modules/password-modal.vue.d.ts +9 -0
- package/dist/types/packages/components/layout/src/header/modules/topMenu.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/header/modules/warehouse.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/logo.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/siderMenu.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/src/subMenuItem.vue.d.ts +6 -0
- package/dist/types/packages/components/layout/src/tabsNav.vue.d.ts +2 -0
- package/dist/types/packages/components/layout/type.d.ts +17 -0
- package/dist/types/packages/components/lazy/charts/index.d.ts +21 -0
- package/dist/types/packages/components/lazy/charts/index.vue.d.ts +7 -0
- package/dist/types/packages/components/lazy/editor/editor-core.vue.d.ts +36 -0
- package/dist/types/packages/components/lazy/editor/index.d.ts +3 -0
- package/dist/types/packages/components/lazy/editor/index.vue.d.ts +35 -0
- package/dist/types/packages/components/lazy/editor/type.d.ts +62 -0
- package/dist/types/packages/components/list/index.d.ts +7 -0
- package/dist/types/packages/components/list/input.d.ts +432 -0
- package/dist/types/packages/components/list/src/header.vue.d.ts +44 -0
- package/dist/types/packages/components/list/src/index.vue.d.ts +68 -0
- package/dist/types/packages/components/list/src/pager.vue.d.ts +10 -0
- package/dist/types/packages/components/list/src/table.vue.d.ts +774 -0
- package/dist/types/packages/components/list/type.d.ts +346 -0
- package/dist/types/packages/components/table/constants.d.ts +15 -0
- package/dist/types/packages/components/table/index.d.ts +7 -0
- package/dist/types/packages/components/table/resolveInjectColumns.d.ts +17 -0
- package/dist/types/packages/components/table/src/action-column.vue.d.ts +11 -0
- package/dist/types/packages/components/table/src/column.vue.d.ts +82 -0
- package/dist/types/packages/components/table/src/pager.vue.d.ts +314 -0
- package/dist/types/packages/components/table/src/search.vue.d.ts +34 -0
- package/dist/types/packages/components/table/src/table.vue.d.ts +802 -0
- package/dist/types/packages/components/table/type.d.ts +179 -0
- package/dist/types/packages/components/table/useWTableConfig.d.ts +34 -0
- package/dist/types/packages/components/table/vxeDefaultConfig.d.ts +8 -0
- package/dist/types/packages/components/table/warnDeprecated.d.ts +6 -0
- package/dist/types/packages/config.d.ts +27 -0
- package/dist/types/packages/directive/auth.d.ts +4 -0
- package/dist/types/packages/directive/auths.d.ts +4 -0
- package/dist/types/packages/directive/index.d.ts +6 -0
- package/dist/types/packages/hooks/business/index.d.ts +4 -0
- package/dist/types/packages/hooks/business/src/index.d.ts +4 -0
- package/dist/types/packages/hooks/business/src/useCountryDict.d.ts +22 -0
- package/dist/types/packages/hooks/business/src/useCurrencyDict.d.ts +22 -0
- package/dist/types/packages/hooks/business/src/useCustomerDict.d.ts +22 -0
- package/dist/types/packages/hooks/business/src/useWarehouseZoneDict.d.ts +22 -0
- package/dist/types/packages/hooks/business/useBusinessDict.d.ts +2 -0
- package/dist/types/packages/hooks/business/useDict.d.ts +25 -0
- package/dist/types/packages/hooks/index.d.ts +2 -0
- package/dist/types/packages/hooks/private/index.d.ts +2 -0
- package/dist/types/packages/hooks/private/src/useKey.d.ts +1 -0
- package/dist/types/packages/hooks/private/src/useRenderCell.d.ts +71 -0
- package/dist/types/packages/hooks/web/index.d.ts +17 -0
- package/dist/types/packages/hooks/web/src/useAffix.d.ts +19 -0
- package/dist/types/packages/hooks/web/src/useCatchPreloadError.d.ts +6 -0
- package/dist/types/packages/hooks/web/src/useCookie.d.ts +11 -0
- package/dist/types/packages/hooks/web/src/useEmitBack.d.ts +3 -0
- package/dist/types/packages/hooks/web/src/useEnum.d.ts +24 -0
- package/dist/types/packages/hooks/web/src/useExport.d.ts +4 -0
- package/dist/types/packages/hooks/web/src/useFormItemProps.d.ts +22 -0
- package/dist/types/packages/hooks/web/src/useFormStorage.d.ts +18 -0
- package/dist/types/packages/hooks/web/src/useI18n.d.ts +26 -0
- package/dist/types/packages/hooks/web/src/useListConfig.d.ts +16 -0
- package/dist/types/packages/hooks/web/src/useLocale.d.ts +6 -0
- package/dist/types/packages/hooks/web/src/useNProgress.d.ts +5 -0
- package/dist/types/packages/hooks/web/src/usePageForm.d.ts +9 -0
- package/dist/types/packages/hooks/web/src/usePrefixTitle.d.ts +7 -0
- package/dist/types/packages/hooks/web/src/useTabsNav.d.ts +13 -0
- package/dist/types/packages/hooks/web/src/useUpload.d.ts +1 -0
- package/dist/types/packages/hooks/web/src/useWatchForm.d.ts +10 -0
- package/dist/types/packages/hooks/web/src/useWindowSize.d.ts +8 -0
- package/dist/types/packages/index.d.ts +21 -0
- package/dist/types/packages/keys/index.d.ts +6 -0
- package/dist/types/packages/keys/public.d.ts +0 -0
- package/dist/types/packages/plugins/index.d.ts +1 -0
- package/dist/types/packages/plugins/vueI18n/helper.d.ts +1 -0
- package/dist/types/packages/plugins/vueI18n/index.d.ts +14 -0
- package/dist/types/packages/setup/index.d.ts +1 -0
- package/dist/types/packages/setup/vxe.d.ts +10 -0
- package/dist/types/packages/store/index.d.ts +9 -0
- package/dist/types/packages/store/modules/common.d.ts +50 -0
- package/dist/types/packages/store/modules/dict.d.ts +436 -0
- package/dist/types/packages/store/modules/language.d.ts +182 -0
- package/dist/types/packages/store/modules/tagsNav.d.ts +156 -0
- package/dist/types/packages/store/modules/userPermission.d.ts +60 -0
- package/dist/types/packages/type.d.ts +44 -0
- package/dist/types/packages/utils/config.d.ts +1 -0
- package/dist/types/packages/utils/createRefInstanceProxy.d.ts +13 -0
- package/dist/types/packages/utils/formatCellValue.d.ts +82 -0
- package/dist/types/packages/utils/getPrefixTitle.d.ts +5 -0
- package/dist/types/packages/utils/index.d.ts +48 -0
- package/dist/types/packages/utils/type.d.ts +6 -0
- package/dist/types/packages/utils/warehouse.d.ts +30 -0
- package/dist/wlwy-package.es.js +19 -21
- package/package.json +1 -1
|
@@ -0,0 +1,680 @@
|
|
|
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 { HandlerMode, OptionType } from '../../../type';
|
|
3
|
+
import type { WCropperProp } from '../../common';
|
|
4
|
+
import type { WModalProps, WUploadProps } from '../../antd';
|
|
5
|
+
import type { FooterButtonType, WDropdownListItem } from '../../common/type';
|
|
6
|
+
import type { UseWatchFormType } from '../../../hooks';
|
|
7
|
+
import type { ApiResponse } from '../../../axios/types';
|
|
8
|
+
export type FormInitializedCallback = (form: any) => void;
|
|
9
|
+
/**
|
|
10
|
+
* w-form 组件实例
|
|
11
|
+
*/
|
|
12
|
+
export interface WFormInstance extends FormInstance {
|
|
13
|
+
getFormInstance: () => FormInstance | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* w-form 组件属性
|
|
17
|
+
*/
|
|
18
|
+
export interface WFormProps extends Pick<FormProps, 'model' | 'layout' | 'labelAlign' | 'scrollToFirstError' | 'labelCol' | 'wrapperCol' | 'name' | 'disabled'>, Pick<RowProps, 'gutter' | 'align'> {
|
|
19
|
+
/**
|
|
20
|
+
* 每行列数
|
|
21
|
+
*/
|
|
22
|
+
column?: number;
|
|
23
|
+
/**
|
|
24
|
+
* 是否卡片类型布局
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
card?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* label 旁 tooltip 提示
|
|
31
|
+
*/
|
|
32
|
+
export type FormItemLabelTooltipProps = {
|
|
33
|
+
/**
|
|
34
|
+
* label 旁 tooltip 提示文案(支持 i18n key)
|
|
35
|
+
*/
|
|
36
|
+
labelTooltip?: string;
|
|
37
|
+
/**
|
|
38
|
+
* label 旁 tooltip 图标,默认 QuestionCircleOutlined
|
|
39
|
+
*/
|
|
40
|
+
labelTooltipIcon?: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* w-form-item 组件属性
|
|
44
|
+
*/
|
|
45
|
+
export interface WFormItemProps extends WFormColProps, Pick<FormItemProps, 'name' | 'labelCol' | 'wrapperCol'>, FormItemLabelTooltipProps {
|
|
46
|
+
/**
|
|
47
|
+
* item Lable名称
|
|
48
|
+
*/
|
|
49
|
+
label?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* w-form-col 组件属性
|
|
53
|
+
*/
|
|
54
|
+
export interface WFormColProps extends Pick<ColProps, 'offset'> {
|
|
55
|
+
/**
|
|
56
|
+
* 占位格数
|
|
57
|
+
*/
|
|
58
|
+
span?: number | 'full';
|
|
59
|
+
}
|
|
60
|
+
export type Response<T = any> = {
|
|
61
|
+
code: string;
|
|
62
|
+
success: boolean;
|
|
63
|
+
result: T;
|
|
64
|
+
message: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* w-form-xxx 组件基础属性
|
|
68
|
+
*/
|
|
69
|
+
export type FormItemXxProps = {
|
|
70
|
+
/**
|
|
71
|
+
* 搜索form数据
|
|
72
|
+
*/
|
|
73
|
+
form?: any;
|
|
74
|
+
/**
|
|
75
|
+
* 条件字段名
|
|
76
|
+
*/
|
|
77
|
+
model: string;
|
|
78
|
+
/**
|
|
79
|
+
* 条件Lable名称
|
|
80
|
+
*/
|
|
81
|
+
label?: string;
|
|
82
|
+
/**
|
|
83
|
+
* 同Ant Design Vue框架FormItem组件的name属性一致(默认为model的值)
|
|
84
|
+
*/
|
|
85
|
+
name?: string;
|
|
86
|
+
/**
|
|
87
|
+
* 同Ant Design Vue框架Input、Setect组件的allowClear属性一致(默认为true)
|
|
88
|
+
*/
|
|
89
|
+
allowClear?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 是否禁用输入
|
|
92
|
+
*/
|
|
93
|
+
isDetails?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 是否禁用输入
|
|
96
|
+
*/
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 输入框提示
|
|
100
|
+
*/
|
|
101
|
+
placeholder?: string;
|
|
102
|
+
} & FormItemLabelTooltipProps;
|
|
103
|
+
export type TextTransformType = 'capitalize' | 'lowercase' | 'uppercase';
|
|
104
|
+
/**
|
|
105
|
+
* w-form-input 组件属性
|
|
106
|
+
*/
|
|
107
|
+
export interface WFormInputProps extends Partial<FormItemXxProps> {
|
|
108
|
+
/**
|
|
109
|
+
* 输入字母大小写转换类型
|
|
110
|
+
*/
|
|
111
|
+
textTransform?: TextTransformType;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* w-form-number 组件属性
|
|
115
|
+
*/
|
|
116
|
+
export interface WFormNumberProps extends FormItemXxProps {
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* w-form-i18n 组件属性
|
|
120
|
+
*/
|
|
121
|
+
export interface WFormI18nProps extends FormItemXxProps {
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* w-form-tags 组件属性
|
|
125
|
+
*/
|
|
126
|
+
export interface WFormTagsProps extends FormItemXxProps, Pick<SelectProps, 'tokenSeparators'> {
|
|
127
|
+
/**
|
|
128
|
+
* 最大标签数量
|
|
129
|
+
*/
|
|
130
|
+
maxTagLength?: number;
|
|
131
|
+
/**
|
|
132
|
+
* 超出最大标签数量提示
|
|
133
|
+
*/
|
|
134
|
+
maxTagLengthMessage?: string | ((length: number) => string);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* w-textarea 组件属性
|
|
138
|
+
*/
|
|
139
|
+
export interface WFormTextareaProps extends FormItemXxProps {
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* w-select 组件属性
|
|
143
|
+
*/
|
|
144
|
+
export interface WFormSelectProps extends FormItemXxProps, Pick<SelectProps, 'loading' | 'autoClearSearchValue' | 'mode' | 'filterOption'> {
|
|
145
|
+
/**
|
|
146
|
+
* 下拉框选项列表
|
|
147
|
+
*/
|
|
148
|
+
option?: OptionType[];
|
|
149
|
+
/**
|
|
150
|
+
* 加载下拉框选项列表接口url
|
|
151
|
+
*/
|
|
152
|
+
url?: string;
|
|
153
|
+
/**
|
|
154
|
+
* 加载下拉框选项列表自定义方法,优先级高于url
|
|
155
|
+
* @param value 搜索关键字
|
|
156
|
+
*/
|
|
157
|
+
request?: (value?: string) => Promise<Response>;
|
|
158
|
+
/**
|
|
159
|
+
* 加载下拉框选项列表接口类型(默认POST)
|
|
160
|
+
*/
|
|
161
|
+
method?: string;
|
|
162
|
+
/**
|
|
163
|
+
* 加载下拉框选项列表接口请求参数
|
|
164
|
+
*/
|
|
165
|
+
params?: any;
|
|
166
|
+
/**
|
|
167
|
+
* 接口请求keyword
|
|
168
|
+
*/
|
|
169
|
+
searchKeyword?: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* w-select-input 组件属性
|
|
173
|
+
*/
|
|
174
|
+
export interface WFormSelectInputProps extends FormItemXxProps, Pick<SelectProps, 'tokenSeparators'> {
|
|
175
|
+
/**
|
|
176
|
+
* Lable下拉选项列表
|
|
177
|
+
*/
|
|
178
|
+
option?: WDropdownListItem[];
|
|
179
|
+
/**
|
|
180
|
+
* 绑定Lable下拉组件字段名
|
|
181
|
+
*/
|
|
182
|
+
selectType?: string;
|
|
183
|
+
/**
|
|
184
|
+
* 输入框类型,同Ant Design Vue框架Setect组件的mode属性一致
|
|
185
|
+
*/
|
|
186
|
+
mode?: SelectProps['mode'];
|
|
187
|
+
/**
|
|
188
|
+
* 是否是数字输入框
|
|
189
|
+
*/
|
|
190
|
+
isNumber?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* 输入框类型,同Ant Design Vue框架InputNumber组件的precision属性一致, isNumber为true才生效
|
|
193
|
+
*/
|
|
194
|
+
precision?: number;
|
|
195
|
+
/**
|
|
196
|
+
* 最大标签数量
|
|
197
|
+
*/
|
|
198
|
+
maxTagLength?: number;
|
|
199
|
+
/**
|
|
200
|
+
* 超出最大标签数量提示
|
|
201
|
+
*/
|
|
202
|
+
maxTagLengthMessage?: string | ((length: number) => string);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* w-select-date-range 组件属性
|
|
206
|
+
*/
|
|
207
|
+
export interface WFormDateRangeProps extends FormItemXxProps, Pick<DatePickerProps, 'picker' | 'showTime'>, Pick<TimeRangePickerProps, 'presets'> {
|
|
208
|
+
/**
|
|
209
|
+
* Lable下拉选项列表
|
|
210
|
+
*/
|
|
211
|
+
option?: WDropdownListItem[];
|
|
212
|
+
/**
|
|
213
|
+
* 绑定Lable下拉组件字段名
|
|
214
|
+
*/
|
|
215
|
+
selectType?: string;
|
|
216
|
+
/**
|
|
217
|
+
* 时长范围,单位天
|
|
218
|
+
*/
|
|
219
|
+
offsetDays?: number;
|
|
220
|
+
/**
|
|
221
|
+
* 时长范围的最大值
|
|
222
|
+
*/
|
|
223
|
+
limit?: number;
|
|
224
|
+
/**
|
|
225
|
+
* 时间格式
|
|
226
|
+
*/
|
|
227
|
+
format?: FormatType;
|
|
228
|
+
/**
|
|
229
|
+
* 绑定时间范围字段名,如果是字符类型。例:'time' => ['timeFrom', 'timeTo']
|
|
230
|
+
*/
|
|
231
|
+
keys?: string | [StartField: string, EndField: string];
|
|
232
|
+
/**
|
|
233
|
+
* w-list组件中是否删除绑定字段
|
|
234
|
+
* @default true
|
|
235
|
+
*/
|
|
236
|
+
delModel?: boolean;
|
|
237
|
+
/**
|
|
238
|
+
* 是否允许选择未来时间
|
|
239
|
+
* @default true
|
|
240
|
+
*/
|
|
241
|
+
futureTimeAllowed?: boolean;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* w-select-time-picker 组件属性
|
|
245
|
+
*/
|
|
246
|
+
export interface WFormTimePickerProps extends FormItemXxProps {
|
|
247
|
+
/**
|
|
248
|
+
* 时间格式
|
|
249
|
+
*/
|
|
250
|
+
format?: string;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* w-select-date-picker 组件属性
|
|
254
|
+
*/
|
|
255
|
+
export interface WFormDatePickerProps extends FormItemXxProps {
|
|
256
|
+
/**
|
|
257
|
+
* 时间格式
|
|
258
|
+
*/
|
|
259
|
+
format?: string;
|
|
260
|
+
/**
|
|
261
|
+
* w-list组件中是否删除绑定字段
|
|
262
|
+
* @default true
|
|
263
|
+
*/
|
|
264
|
+
delModel?: boolean;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* w-checkbox 组件属性
|
|
268
|
+
*/
|
|
269
|
+
export interface WFormCheckboxProps extends FormItemXxProps {
|
|
270
|
+
/**
|
|
271
|
+
* 复选框选项列表
|
|
272
|
+
*/
|
|
273
|
+
option?: OptionType[];
|
|
274
|
+
/**
|
|
275
|
+
* 复选框选项列表接口url,优先级高于 dict 字段
|
|
276
|
+
*/
|
|
277
|
+
url?: string;
|
|
278
|
+
/**
|
|
279
|
+
* 复选框选项列表自定义方法,优先级高于url
|
|
280
|
+
* @param value 搜索关键字
|
|
281
|
+
*/
|
|
282
|
+
request?: (value?: string) => Promise<Response>;
|
|
283
|
+
/**
|
|
284
|
+
* 复选框选项列表接口类型(默认POST)
|
|
285
|
+
*/
|
|
286
|
+
method?: string;
|
|
287
|
+
/**
|
|
288
|
+
* 复选框选项列表接口请求参数
|
|
289
|
+
*/
|
|
290
|
+
params?: any;
|
|
291
|
+
/**
|
|
292
|
+
* 快捷请求数据字典同/platform/basicDict/list接口dataType字段
|
|
293
|
+
*/
|
|
294
|
+
dict?: string;
|
|
295
|
+
/**
|
|
296
|
+
* 单个选项label字段,
|
|
297
|
+
*/
|
|
298
|
+
checkboxLabel?: string;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* w-radio 组件属性
|
|
302
|
+
*/
|
|
303
|
+
export interface WFormRadioProps extends FormItemXxProps {
|
|
304
|
+
/**
|
|
305
|
+
* 单选框选项列表
|
|
306
|
+
*/
|
|
307
|
+
option?: OptionType[];
|
|
308
|
+
/**
|
|
309
|
+
* 单选框选项列表接口url,优先级高于 dict 字段
|
|
310
|
+
*/
|
|
311
|
+
url?: string;
|
|
312
|
+
/**
|
|
313
|
+
* 单选框选项列表自定义方法,优先级高于url
|
|
314
|
+
* @param value 搜索关键字
|
|
315
|
+
*/
|
|
316
|
+
request?: (value?: string) => Promise<Response>;
|
|
317
|
+
/**
|
|
318
|
+
* 单选框选项列表接口类型(默认POST)
|
|
319
|
+
*/
|
|
320
|
+
method?: string;
|
|
321
|
+
/**
|
|
322
|
+
* 单选框选项列表接口请求参数
|
|
323
|
+
*/
|
|
324
|
+
params?: any;
|
|
325
|
+
/**
|
|
326
|
+
* 快捷请求数据字典同/platform/basicDict/list接口dataType字段
|
|
327
|
+
*/
|
|
328
|
+
dict?: string;
|
|
329
|
+
}
|
|
330
|
+
type InputNumberConfig = ({
|
|
331
|
+
/**
|
|
332
|
+
* 绑定字段名
|
|
333
|
+
*/
|
|
334
|
+
model: string;
|
|
335
|
+
/**
|
|
336
|
+
* 提示文本
|
|
337
|
+
*/
|
|
338
|
+
placeholder?: string;
|
|
339
|
+
} & Omit<InputNumberProps, 'min' | 'max'>) | string;
|
|
340
|
+
/**
|
|
341
|
+
* w-select-two-input 组件属性
|
|
342
|
+
*/
|
|
343
|
+
export interface WFormNumberRangeProps extends FormItemXxProps {
|
|
344
|
+
/**
|
|
345
|
+
* Lable下拉选项列表
|
|
346
|
+
*/
|
|
347
|
+
option?: WDropdownListItem[];
|
|
348
|
+
/**
|
|
349
|
+
* 绑定Lable下拉组件字段名
|
|
350
|
+
*/
|
|
351
|
+
selectType?: string;
|
|
352
|
+
/**
|
|
353
|
+
* 最小值
|
|
354
|
+
*/
|
|
355
|
+
min?: number;
|
|
356
|
+
/**
|
|
357
|
+
* 最大值
|
|
358
|
+
*/
|
|
359
|
+
max?: number;
|
|
360
|
+
/**
|
|
361
|
+
* 输入框配置
|
|
362
|
+
*/
|
|
363
|
+
config?: [Start: InputNumberConfig, End: InputNumberConfig];
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* w-form-custom 组件属性
|
|
367
|
+
*/
|
|
368
|
+
export interface WFormCustomProps extends FormItemXxProps {
|
|
369
|
+
/**
|
|
370
|
+
* Input插槽名
|
|
371
|
+
*/
|
|
372
|
+
inputSlot?: string;
|
|
373
|
+
/**
|
|
374
|
+
* Lable插槽名
|
|
375
|
+
*/
|
|
376
|
+
labelSlot?: string;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* w-form-upload 组件属性
|
|
380
|
+
*/
|
|
381
|
+
export interface WFormUploadProps extends FormItemXxProps, Pick<UploadProps, 'multiple' | 'beforeUpload'> {
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* w-form-upload-image 组件属性
|
|
385
|
+
*/
|
|
386
|
+
export interface WFormUploadImageProps extends WUploadProps, WFormUploadProps {
|
|
387
|
+
/**
|
|
388
|
+
* 宽度
|
|
389
|
+
*/
|
|
390
|
+
width?: number;
|
|
391
|
+
/**
|
|
392
|
+
* 高度
|
|
393
|
+
*/
|
|
394
|
+
height?: number;
|
|
395
|
+
/**
|
|
396
|
+
* 是否开启裁剪
|
|
397
|
+
*/
|
|
398
|
+
cropProps?: WCropperProp;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* w-form-match 组件属性
|
|
402
|
+
*/
|
|
403
|
+
export interface WInputMatchProps extends FormItemXxProps, Pick<SelectProps, 'tokenSeparators'> {
|
|
404
|
+
/**
|
|
405
|
+
* Label字段名
|
|
406
|
+
*/
|
|
407
|
+
labelModel?: string;
|
|
408
|
+
/**
|
|
409
|
+
* 匹配模式字段名
|
|
410
|
+
*/
|
|
411
|
+
afterModel?: string;
|
|
412
|
+
/**
|
|
413
|
+
* 父级字段名
|
|
414
|
+
*/
|
|
415
|
+
parentModel?: string;
|
|
416
|
+
/**
|
|
417
|
+
* Label下拉选项列表
|
|
418
|
+
*/
|
|
419
|
+
labelOption?: WDropdownListItem[];
|
|
420
|
+
/**
|
|
421
|
+
* 匹配模式下拉选项列表
|
|
422
|
+
*/
|
|
423
|
+
afterOption?: OptionType[];
|
|
424
|
+
/**
|
|
425
|
+
* 数字输入类型集合
|
|
426
|
+
*/
|
|
427
|
+
numberfs?: string[];
|
|
428
|
+
/**
|
|
429
|
+
* 字符输入类型集合
|
|
430
|
+
*/
|
|
431
|
+
inputfs?: string[];
|
|
432
|
+
/**
|
|
433
|
+
* 最大标签数量
|
|
434
|
+
*/
|
|
435
|
+
maxTagLength?: number;
|
|
436
|
+
/**
|
|
437
|
+
* 超出最大标签数量提示
|
|
438
|
+
*/
|
|
439
|
+
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
|
+
/**
|
|
510
|
+
* 校验表单方法
|
|
511
|
+
*/
|
|
512
|
+
validateForm: () => Promise<{
|
|
513
|
+
[key: string]: any;
|
|
514
|
+
}>;
|
|
515
|
+
/**
|
|
516
|
+
* 提交表单方法
|
|
517
|
+
* @param url 请求链接
|
|
518
|
+
* @param data 请求数据
|
|
519
|
+
* @returns 接口返回数据
|
|
520
|
+
*/
|
|
521
|
+
submit: <T = any>(url?: string, data?: any) => Promise<ApiResponse<T>>;
|
|
522
|
+
/**
|
|
523
|
+
* 校验并提交表单方法
|
|
524
|
+
* @param url 请求链接
|
|
525
|
+
* @param data 请求数据
|
|
526
|
+
* @returns 接口返回数据
|
|
527
|
+
*/
|
|
528
|
+
verifiedSubmit: <T = any>(url?: string, data?: any) => Promise<ApiResponse<T>>;
|
|
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 {
|
|
679
|
+
}
|
|
680
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
type: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
type: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WIconProp } from '../type';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<WIconProp, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
3
|
+
click: (event: Event) => any;
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<WIconProp> & Readonly<{
|
|
5
|
+
onClick?: ((event: Event) => any) | undefined;
|
|
6
|
+
}>, {
|
|
7
|
+
iconClass: string;
|
|
8
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|