wlwy-package 4.0.0-beta.2 → 4.0.0-beta.21

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 (182) hide show
  1. package/dist/style.css +2 -1
  2. package/dist/types/axios/index.d.ts +6 -0
  3. package/dist/types/axios/service.d.ts +21 -0
  4. package/dist/types/axios/types/index.d.ts +32 -0
  5. package/dist/types/components/antd/index.d.ts +11 -0
  6. package/dist/types/components/antd/src/button.vue.d.ts +10 -0
  7. package/dist/types/components/antd/src/datePicker.vue.d.ts +16 -0
  8. package/dist/types/components/antd/src/descriptions-item.vue.d.ts +9 -0
  9. package/dist/types/components/antd/src/descriptions.vue.d.ts +6 -0
  10. package/dist/types/components/antd/src/modal.vue.d.ts +30 -0
  11. package/dist/types/components/antd/src/rangePicker.vue.d.ts +24 -0
  12. package/dist/types/components/antd/src/select.vue.d.ts +22 -0
  13. package/dist/types/components/antd/src/statistic.vue.d.ts +3 -0
  14. package/dist/types/components/antd/src/upload.vue.d.ts +40 -0
  15. package/dist/types/components/antd/type.d.ts +188 -0
  16. package/dist/types/components/common/index.d.ts +20 -0
  17. package/dist/types/components/common/src/Analysis.vue.d.ts +5 -0
  18. package/dist/types/components/common/src/Redirect.vue.d.ts +2 -0
  19. package/dist/types/components/common/src/configProvider.vue.d.ts +13 -0
  20. package/dist/types/components/common/src/copyable.vue.d.ts +16 -0
  21. package/dist/types/components/common/src/cropper.vue.d.ts +29 -0
  22. package/dist/types/components/common/src/dropdown.vue.d.ts +23 -0
  23. package/dist/types/components/common/src/noData.vue.d.ts +7 -0
  24. package/dist/types/components/common/src/page.vue.d.ts +38 -0
  25. package/dist/types/components/common/src/page404.vue.d.ts +11 -0
  26. package/dist/types/components/common/src/slashHeader.vue.d.ts +7 -0
  27. package/dist/types/components/common/src/upload-modal.vue.d.ts +43 -0
  28. package/dist/types/components/common/src/warehouseSelectGate.vue.d.ts +2 -0
  29. package/dist/types/components/common/type.d.ts +242 -0
  30. package/dist/types/components/form/business/index.d.ts +8 -0
  31. package/dist/types/components/form/business/src/channel.vue.d.ts +5 -0
  32. package/dist/types/components/form/business/src/country.vue.d.ts +3 -0
  33. package/dist/types/components/form/business/src/customer.vue.d.ts +6 -0
  34. package/dist/types/components/form/business/src/sku.vue.d.ts +16 -0
  35. package/dist/types/components/form/business/type.d.ts +39 -0
  36. package/dist/types/components/form/default/index.d.ts +39 -0
  37. package/dist/types/components/form/default/src/checkbox.vue.d.ts +22 -0
  38. package/dist/types/components/form/default/src/custom.vue.d.ts +14 -0
  39. package/dist/types/components/form/default/src/datePicker.vue.d.ts +5 -0
  40. package/dist/types/components/form/default/src/dateRange.vue.d.ts +10 -0
  41. package/dist/types/components/form/default/src/form.vue.d.ts +430 -0
  42. package/dist/types/components/form/default/src/formCol.vue.d.ts +16 -0
  43. package/dist/types/components/form/default/src/formItem.vue.d.ts +38 -0
  44. package/dist/types/components/form/default/src/formItemRest.vue.d.ts +2 -0
  45. package/dist/types/components/form/default/src/formMultiItem.vue.d.ts +31 -0
  46. package/dist/types/components/form/default/src/formMultiItemOption.vue.d.ts +14 -0
  47. package/dist/types/components/form/default/src/input.vue.d.ts +26 -0
  48. package/dist/types/components/form/default/src/inputI18n.vue.d.ts +14 -0
  49. package/dist/types/components/form/default/src/inputMatch.vue.d.ts +23 -0
  50. package/dist/types/components/form/default/src/inputNumber.vue.d.ts +16 -0
  51. package/dist/types/components/form/default/src/inputPassword.vue.d.ts +16 -0
  52. package/dist/types/components/form/default/src/inputTags.vue.d.ts +23 -0
  53. package/dist/types/components/form/default/src/numberRange.vue.d.ts +9 -0
  54. package/dist/types/components/form/default/src/radio.vue.d.ts +22 -0
  55. package/dist/types/components/form/default/src/select.vue.d.ts +27 -0
  56. package/dist/types/components/form/default/src/textarea.vue.d.ts +14 -0
  57. package/dist/types/components/form/default/src/timePicker.vue.d.ts +6 -0
  58. package/dist/types/components/form/default/src/upload-image.vue.d.ts +23 -0
  59. package/dist/types/components/form/default/src/upload.vue.d.ts +12 -0
  60. package/dist/types/components/form/default/type.d.ts +624 -0
  61. package/dist/types/components/form/index.d.ts +2 -0
  62. package/dist/types/components/form/type.d.ts +2 -0
  63. package/dist/types/components/icon/index.d.ts +4 -0
  64. package/dist/types/components/icon/src/icon.vue.d.ts +12 -0
  65. package/dist/types/components/icon/src/index.vue.d.ts +9 -0
  66. package/dist/types/components/icon/src/switch.vue.d.ts +18 -0
  67. package/dist/types/components/icon/type.d.ts +41 -0
  68. package/dist/types/components/index.d.ts +6 -0
  69. package/dist/types/components/layout/blank.vue.d.ts +2 -0
  70. package/dist/types/components/layout/index.d.ts +7 -0
  71. package/dist/types/components/layout/index.vue.d.ts +9 -0
  72. package/dist/types/components/layout/skeleton/button.vue.d.ts +8 -0
  73. package/dist/types/components/layout/skeleton/descriptions.vue.d.ts +18 -0
  74. package/dist/types/components/layout/skeleton/form.vue.d.ts +25 -0
  75. package/dist/types/components/layout/skeleton/list.vue.d.ts +2 -0
  76. package/dist/types/components/layout/skeleton/switch.vue.d.ts +2 -0
  77. package/dist/types/components/layout/skeleton/table.vue.d.ts +20 -0
  78. package/dist/types/components/layout/skeleton/utils.d.ts +88 -0
  79. package/dist/types/components/layout/src/footer.vue.d.ts +2 -0
  80. package/dist/types/components/layout/src/header/index.vue.d.ts +10 -0
  81. package/dist/types/components/layout/src/header/modules/download.vue.d.ts +6 -0
  82. package/dist/types/components/layout/src/header/modules/language.vue.d.ts +2 -0
  83. package/dist/types/components/layout/src/header/modules/password-modal.vue.d.ts +9 -0
  84. package/dist/types/components/layout/src/header/modules/topMenu.vue.d.ts +2 -0
  85. package/dist/types/components/layout/src/header/modules/warehouse.vue.d.ts +2 -0
  86. package/dist/types/components/layout/src/logo.vue.d.ts +2 -0
  87. package/dist/types/components/layout/src/siderMenu.vue.d.ts +2 -0
  88. package/dist/types/components/layout/src/subMenuItem.vue.d.ts +6 -0
  89. package/dist/types/components/layout/src/tabsNav.vue.d.ts +2 -0
  90. package/dist/types/components/layout/type.d.ts +17 -0
  91. package/dist/types/components/private/inputTags.vue.d.ts +21 -0
  92. package/dist/types/components/table/constants.d.ts +13 -0
  93. package/dist/types/components/table/index.d.ts +8 -0
  94. package/dist/types/components/table/resolveToolbarButtons.d.ts +16 -0
  95. package/dist/types/components/table/src/action-column.vue.d.ts +11 -0
  96. package/dist/types/components/table/src/column.vue.d.ts +119 -0
  97. package/dist/types/components/table/src/detail-search.vue.d.ts +31 -0
  98. package/dist/types/components/table/src/list-search.vue.d.ts +32 -0
  99. package/dist/types/components/table/src/pager.vue.d.ts +325 -0
  100. package/dist/types/components/table/src/search.vue.d.ts +44 -0
  101. package/dist/types/components/table/src/table.vue.d.ts +948 -0
  102. package/dist/types/components/table/src/toolbarButtons.vue.d.ts +18 -0
  103. package/dist/types/components/table/type.d.ts +354 -0
  104. package/dist/types/components/table/useWTableConfig.d.ts +38 -0
  105. package/dist/types/components/table/vxeDefaultConfig.d.ts +9 -0
  106. package/dist/types/components/table/warnDeprecated.d.ts +4 -0
  107. package/dist/types/config.d.ts +29 -0
  108. package/dist/types/directive/auth.d.ts +4 -0
  109. package/dist/types/directive/auths.d.ts +4 -0
  110. package/dist/types/directive/index.d.ts +6 -0
  111. package/dist/types/hooks/business/index.d.ts +5 -0
  112. package/dist/types/hooks/business/src/index.d.ts +5 -0
  113. package/dist/types/hooks/business/src/useCountryDict.d.ts +41 -0
  114. package/dist/types/hooks/business/src/useCurrencyDict.d.ts +29 -0
  115. package/dist/types/hooks/business/src/useCustomerDict.d.ts +41 -0
  116. package/dist/types/hooks/business/src/useWarehouseSelect.d.ts +15 -0
  117. package/dist/types/hooks/business/src/useWarehouseZoneDict.d.ts +29 -0
  118. package/dist/types/hooks/business/useBusinessDict.d.ts +13 -0
  119. package/dist/types/hooks/business/useDict.d.ts +35 -0
  120. package/dist/types/hooks/business/useDictRaw.d.ts +14 -0
  121. package/dist/types/hooks/index.d.ts +2 -0
  122. package/dist/types/hooks/private/index.d.ts +7 -0
  123. package/dist/types/hooks/private/src/useFormContext.d.ts +12 -0
  124. package/dist/types/hooks/private/src/useFormDefaultValue.d.ts +42 -0
  125. package/dist/types/hooks/private/src/useFormFieldRegister.d.ts +13 -0
  126. package/dist/types/hooks/private/src/useFormItemProps.d.ts +45 -0
  127. package/dist/types/hooks/private/src/useKey.d.ts +1 -0
  128. package/dist/types/hooks/private/src/useRenderCell.d.ts +71 -0
  129. package/dist/types/hooks/private/src/useTabsNav.d.ts +13 -0
  130. package/dist/types/hooks/web/index.d.ts +16 -0
  131. package/dist/types/hooks/web/key.d.ts +4 -0
  132. package/dist/types/hooks/web/src/useAffix.d.ts +19 -0
  133. package/dist/types/hooks/web/src/useCatchPreloadError.d.ts +6 -0
  134. package/dist/types/hooks/web/src/useCookie.d.ts +11 -0
  135. package/dist/types/hooks/web/src/useDate.d.ts +86 -0
  136. package/dist/types/hooks/web/src/useEnum.d.ts +28 -0
  137. package/dist/types/hooks/web/src/useExport.d.ts +4 -0
  138. package/dist/types/hooks/web/src/useForm.d.ts +1 -0
  139. package/dist/types/hooks/web/src/useI18n.d.ts +26 -0
  140. package/dist/types/hooks/web/src/useListPager.d.ts +37 -0
  141. package/dist/types/hooks/web/src/useLocale.d.ts +6 -0
  142. package/dist/types/hooks/web/src/useNProgress.d.ts +5 -0
  143. package/dist/types/hooks/web/src/useNavigate.d.ts +11 -0
  144. package/dist/types/hooks/web/src/usePageBack.d.ts +19 -0
  145. package/dist/types/hooks/web/src/useWindowSize.d.ts +8 -0
  146. package/dist/types/hooks/web/type.d.ts +70 -0
  147. package/dist/types/index.d.ts +21 -0
  148. package/dist/types/keys/index.d.ts +76 -0
  149. package/dist/types/keys/public.d.ts +0 -0
  150. package/dist/types/locales/enUs.d.ts +20 -0
  151. package/dist/types/locales/index.d.ts +4 -0
  152. package/dist/types/locales/zhCn.d.ts +20 -0
  153. package/dist/types/plugins/index.d.ts +1 -0
  154. package/dist/types/plugins/vueI18n/helper.d.ts +1 -0
  155. package/dist/types/plugins/vueI18n/index.d.ts +14 -0
  156. package/dist/types/setup/dayjs.d.ts +7 -0
  157. package/dist/types/setup/index.d.ts +3 -0
  158. package/dist/types/setup/vxe.d.ts +10 -0
  159. package/dist/types/store/index.d.ts +9 -0
  160. package/dist/types/store/modules/common.d.ts +30 -0
  161. package/dist/types/store/modules/dict.d.ts +126 -0
  162. package/dist/types/store/modules/language.d.ts +91 -0
  163. package/dist/types/store/modules/tagsNav.d.ts +83 -0
  164. package/dist/types/store/modules/userPermission.d.ts +59 -0
  165. package/dist/types/type.d.ts +53 -0
  166. package/dist/types/utils/config.d.ts +1 -0
  167. package/dist/types/utils/createRefInstanceProxy.d.ts +13 -0
  168. package/dist/types/utils/form.d.ts +9 -0
  169. package/dist/types/utils/formatCellValue.d.ts +88 -0
  170. package/dist/types/utils/getPrefixTitle.d.ts +5 -0
  171. package/dist/types/utils/index.d.ts +50 -0
  172. package/dist/types/utils/localStorage.d.ts +52 -0
  173. package/dist/types/utils/resolveDefaultValue.d.ts +12 -0
  174. package/dist/types/utils/type.d.ts +32 -0
  175. package/dist/wlwy-package.es.js +2 -10390
  176. package/package.json +22 -21
  177. package/dist/charts/index.es.js +0 -4
  178. package/dist/editor/index.es.js +0 -4
  179. package/dist/editor-core-BGPSxIdD.js +0 -21080
  180. package/dist/index-5P9J8Ohq.js +0 -9633
  181. package/dist/index-nd_lc6wA.js +0 -101
  182. package/dist/index.vue_vue_type_script_setup_true_lang-BHLjWGpQ.js +0 -73515
@@ -0,0 +1,624 @@
1
+ import { InputNumberProps, type ColProps, type DatePickerProps, type FormInstance, type FormItemProps, type FormProps, type RowProps, type SelectProps, type SpaceProps, type TimeRangePickerProps, type UploadProps } from 'ant-design-vue';
2
+ import type { OptionType } from '../../../type';
3
+ import type { WCropperProp } from '../../common';
4
+ import type { WUploadProps } from '../../antd';
5
+ import type { WDropdownListItem } from '../../common/type';
6
+ import type { Dayjs } from 'dayjs';
7
+ import type { CreateFormRulesPrompt, DefaultValueType } from '../../../utils/type';
8
+ import { Reactive, Ref, type Component } from 'vue';
9
+ export type { DefaultValueType, MaybePromise } from '../../../utils/type';
10
+ /**
11
+ * w-form 向下 provide 的表单上下文(经 useFormContext)
12
+ */
13
+ export type FormContext = {
14
+ /** 表单 model */
15
+ model: Ref<any>;
16
+ /** 表单禁用 */
17
+ disabled: Ref<boolean>;
18
+ /** 每行列数 */
19
+ column: Ref<number | undefined>;
20
+ /** label 布局 */
21
+ labelCol: Ref<FormProps['labelCol']>;
22
+ /** 控件布局 */
23
+ wrapperCol: Ref<FormProps['wrapperCol']>;
24
+ /** 表单布局 */
25
+ layout: Ref<FormProps['layout']>;
26
+ /** 是否卡片布局 */
27
+ card: Ref<boolean>;
28
+ /** item label 与 model 映射 map */
29
+ labelMap: Reactive<Record<string, {
30
+ label?: string;
31
+ prompt?: CreateFormRulesPrompt;
32
+ }>>;
33
+ /** 按 model 收集 label */
34
+ collectLabel: (model: string, config: {
35
+ label?: string;
36
+ prompt?: CreateFormRulesPrompt;
37
+ }) => void;
38
+ };
39
+ /**
40
+ * w-form 组件实例
41
+ */
42
+ export interface WFormInstance extends FormInstance {
43
+ getFormInstance: () => FormInstance | undefined;
44
+ }
45
+ /**
46
+ * w-form 组件属性
47
+ */
48
+ export interface WFormProps extends Pick<FormProps, 'model' | 'layout' | 'labelAlign' | 'scrollToFirstError' | 'labelCol' | 'wrapperCol' | 'name' | 'disabled' | 'rules'>, Pick<RowProps, 'gutter' | 'align'> {
49
+ /**
50
+ * 每行列数
51
+ */
52
+ column?: number;
53
+ /**
54
+ * 是否卡片类型布局
55
+ * @default false
56
+ */
57
+ card?: boolean;
58
+ }
59
+ /**
60
+ * label 旁 tooltip 提示
61
+ */
62
+ export type FormItemLabelTooltipProps = {
63
+ /**
64
+ * label 旁 tooltip 提示文案(支持 i18n key)
65
+ */
66
+ labelTooltip?: string;
67
+ /**
68
+ * label 旁 tooltip 图标,默认 QuestionCircleOutlined
69
+ */
70
+ labelTooltipIcon?: string;
71
+ };
72
+ /**
73
+ * w-form-item 组件属性
74
+ */
75
+ export interface WFormItemProps extends WFormColProps, Pick<FormItemProps, 'name' | 'labelCol' | 'wrapperCol' | 'colon'>, FormItemLabelTooltipProps {
76
+ /**
77
+ * item Lable名称
78
+ */
79
+ label?: string;
80
+ /**
81
+ * 是否用 Input.Group compact 包裹默认插槽内容
82
+ * @default false
83
+ */
84
+ compact?: boolean;
85
+ /**
86
+ * 是否用 Space 包裹默认插槽内容(compact 为 true 时不生效)
87
+ * - `true`:使用 Space,默认属性
88
+ * - `SpaceProps`:使用 Space,并透传对应 props
89
+ * @default false
90
+ */
91
+ space?: boolean | SpaceProps;
92
+ /**
93
+ * 是否跳过 FormCol / FormItem 包装,只渲染默认插槽(裸控件)
94
+ * - `true` / `false`:强制开启或关闭
95
+ * - 未传:若处于 w-form-multi-item 内则自动为 true
96
+ */
97
+ bare?: boolean;
98
+ }
99
+ /**
100
+ * w-form-col 组件属性
101
+ */
102
+ export interface WFormColProps extends Pick<ColProps, 'offset'> {
103
+ /**
104
+ * 占位格数
105
+ */
106
+ span?: number | 'full';
107
+ }
108
+ export type Response<T = any> = {
109
+ code: string;
110
+ success: boolean;
111
+ result: T;
112
+ message: string;
113
+ };
114
+ /**
115
+ * w-form-xxx 组件基础属性
116
+ */
117
+ export type FormItemXxProps = {
118
+ /**
119
+ * 搜索form数据
120
+ */
121
+ form?: any;
122
+ /**
123
+ * 条件字段名
124
+ */
125
+ model: string;
126
+ /**
127
+ * 条件Lable名称
128
+ */
129
+ label?: string;
130
+ /**
131
+ * 同Ant Design Vue框架FormItem组件的name属性一致(默认为model的值)
132
+ */
133
+ name?: string;
134
+ /**
135
+ * 同Ant Design Vue框架Input、Setect组件的allowClear属性一致(默认为true)
136
+ */
137
+ allowClear?: boolean;
138
+ /**
139
+ * 是否禁用输入
140
+ */
141
+ disabled?: boolean;
142
+ /**
143
+ * 输入框提示
144
+ */
145
+ placeholder?: string;
146
+ } & FormItemLabelTooltipProps;
147
+ export type TextTransformType = 'capitalize' | 'lowercase' | 'uppercase';
148
+ /**
149
+ * w-form-input 组件属性
150
+ */
151
+ export interface WFormInputProps extends Partial<FormItemXxProps> {
152
+ /**
153
+ * 输入字母大小写转换类型
154
+ */
155
+ textTransform?: TextTransformType;
156
+ /**
157
+ * 默认值(仅在为空时写入;重置时强制回写)
158
+ * 支持静态值、Promise、同步/异步函数,解析结果为 string
159
+ */
160
+ defaultValue?: DefaultValueType<string>;
161
+ }
162
+ /**
163
+ * w-form-number 组件属性
164
+ */
165
+ export interface WFormNumberProps extends FormItemXxProps {
166
+ /**
167
+ * 默认值(仅在为空时写入;重置时强制回写)
168
+ * 支持静态值、Promise、同步/异步函数,解析结果为 number
169
+ */
170
+ defaultValue?: DefaultValueType<number>;
171
+ }
172
+ /**
173
+ * w-form-i18n 组件属性
174
+ */
175
+ export interface WFormI18nProps extends FormItemXxProps {
176
+ }
177
+ /**
178
+ * w-form-tags 组件属性
179
+ */
180
+ export interface WFormTagsProps extends Omit<FormItemXxProps, 'allowClear'>, Pick<SelectProps, 'tokenSeparators'> {
181
+ /**
182
+ * Label字段名
183
+ */
184
+ labelModel?: string;
185
+ /**
186
+ * Label下拉选项列表
187
+ */
188
+ labelOptions?: WDropdownListItem[];
189
+ /**
190
+ * 最大标签数量
191
+ */
192
+ maxTagLength?: number;
193
+ /**
194
+ * 超出最大标签数量提示
195
+ */
196
+ maxTagLengthMessage?: string | ((length: number) => string);
197
+ /**
198
+ * 默认值(仅在为空时写入;重置时强制回写)
199
+ * 支持静态值、Promise、同步/异步函数,解析结果为数组
200
+ */
201
+ defaultValue?: DefaultValueType<(string | number)[]>;
202
+ /**
203
+ * Label 下拉默认值;有值用它,否则用 labelOptions[0].value
204
+ */
205
+ defaultLabelValue?: string | number;
206
+ }
207
+ /**
208
+ * w-textarea 组件属性
209
+ */
210
+ export interface WFormTextareaProps extends FormItemXxProps {
211
+ /**
212
+ * 默认值(仅在为空时写入;重置时强制回写)
213
+ * 支持静态值、Promise、同步/异步函数,解析结果为 string
214
+ */
215
+ defaultValue?: DefaultValueType<string>;
216
+ }
217
+ /**
218
+ * w-select 组件属性
219
+ */
220
+ export interface WFormSelectProps extends FormItemXxProps, Pick<SelectProps, 'loading' | 'autoClearSearchValue' | 'mode' | 'filterOption'> {
221
+ /**
222
+ * 下拉框选项列表
223
+ */
224
+ options?: OptionType[];
225
+ /**
226
+ * 加载下拉框选项列表接口url
227
+ */
228
+ url?: string;
229
+ /**
230
+ * 加载下拉框选项列表自定义方法,优先级高于url
231
+ * @param value 搜索关键字
232
+ */
233
+ request?: (value?: string) => Promise<Response>;
234
+ /**
235
+ * 加载下拉框选项列表接口类型(默认POST)
236
+ */
237
+ method?: string;
238
+ /**
239
+ * 加载下拉框选项列表接口请求参数
240
+ */
241
+ params?: any;
242
+ /**
243
+ * 接口请求keyword
244
+ */
245
+ searchKeyword?: string;
246
+ /**
247
+ * 远程搜索防抖毫秒数(默认 300)
248
+ */
249
+ searchDebounceMs?: number;
250
+ /**
251
+ * 触发远程搜索的最小关键字长度(默认 0,空串表示重置全量)
252
+ */
253
+ minSearchLength?: number;
254
+ /**
255
+ * 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
256
+ * 支持静态值、Promise、同步/异步函数
257
+ */
258
+ defaultValue?: DefaultValueType<string | number | (string | number)[]>;
259
+ }
260
+ /**
261
+ * w-select-date-range 组件属性
262
+ * model 可选:仅用 keys 写 From/To 时可不传 model
263
+ */
264
+ export interface WFormDateRangeProps extends Omit<FormItemXxProps, 'model'>, Pick<DatePickerProps, 'picker' | 'showTime'>, Pick<TimeRangePickerProps, 'presets'> {
265
+ /**
266
+ * 区间数组字段名(与 keys 二选一或并存;有 model 时优先读写 form[model])
267
+ */
268
+ model?: string;
269
+ /**
270
+ * Label 下拉选项列表
271
+ */
272
+ labelOptions?: WDropdownListItem[];
273
+ /**
274
+ * Label字段名
275
+ */
276
+ labelModel?: string;
277
+ /**
278
+ * 时长范围,单位天
279
+ */
280
+ offsetDays?: number;
281
+ /**
282
+ * 时长范围的最大值
283
+ */
284
+ limit?: number;
285
+ /**
286
+ * 时间格式
287
+ */
288
+ format?: FormatType;
289
+ /**
290
+ * 绑定时间范围字段名,如果是字符类型。例:'time' => ['timeFrom', 'timeTo']
291
+ */
292
+ keys?: string | [StartField: string, EndField: string];
293
+ /**
294
+ * 搜索区重置时是否删除绑定字段
295
+ * @default true
296
+ */
297
+ delModel?: boolean;
298
+ /**
299
+ * 是否允许选择未来时间
300
+ * @default true
301
+ */
302
+ futureTimeAllowed?: boolean;
303
+ /**
304
+ * 默认时间范围(仅在 form[model] 为空时写入)
305
+ * 支持静态值、Promise、同步/异步函数
306
+ */
307
+ defaultValue?: DefaultValueType<[Dayjs, Dayjs] | [string, string] | [number, number]>;
308
+ /**
309
+ * Label 下拉默认值;有值用它,否则用 labelOptions[0].value
310
+ */
311
+ defaultLabelValue?: string | number;
312
+ }
313
+ /**
314
+ * w-select-time-picker 组件属性
315
+ */
316
+ export interface WFormTimePickerProps extends FormItemXxProps {
317
+ /**
318
+ * 时间格式
319
+ */
320
+ format?: string;
321
+ }
322
+ /**
323
+ * w-select-date-picker 组件属性
324
+ */
325
+ export interface WFormDatePickerProps extends FormItemXxProps, Pick<DatePickerProps, 'picker'> {
326
+ /**
327
+ * 时间格式
328
+ */
329
+ format?: string;
330
+ /**
331
+ * 搜索区重置时是否删除绑定字段
332
+ * @default true
333
+ */
334
+ delModel?: boolean;
335
+ /**
336
+ * 是否展示时间选择;
337
+ * - `'start'`:默认 00:00:00(毫秒 000)
338
+ * - `'end'`:默认 23:59:59(毫秒 999)
339
+ * - 其余同 a-date-picker 的 showTime
340
+ */
341
+ showTime?: DatePickerProps['showTime'] | 'start' | 'end';
342
+ }
343
+ /**
344
+ * w-checkbox 组件属性
345
+ */
346
+ export interface WFormCheckboxProps extends FormItemXxProps {
347
+ /**
348
+ * 复选框选项列表
349
+ */
350
+ options?: OptionType[];
351
+ /**
352
+ * 复选框选项列表接口url,优先级高于 dict 字段
353
+ */
354
+ url?: string;
355
+ /**
356
+ * 复选框选项列表自定义方法,优先级高于url
357
+ * @param value 搜索关键字
358
+ */
359
+ request?: (value?: string) => Promise<Response>;
360
+ /**
361
+ * 复选框选项列表接口类型(默认POST)
362
+ */
363
+ method?: string;
364
+ /**
365
+ * 复选框选项列表接口请求参数
366
+ */
367
+ params?: any;
368
+ /**
369
+ * 快捷请求数据字典同/platform/basicDict/list接口dataType字段
370
+ */
371
+ dict?: string;
372
+ /**
373
+ * 单个选项label字段,
374
+ */
375
+ checkboxLabel?: string;
376
+ /**
377
+ * 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
378
+ * 单选 Checkbox 用 boolean;CheckboxGroup 用数组
379
+ * 支持静态值、Promise、同步/异步函数
380
+ */
381
+ defaultValue?: DefaultValueType<boolean | (string | number)[]>;
382
+ }
383
+ /**
384
+ * w-radio 组件属性
385
+ */
386
+ export interface WFormRadioProps extends FormItemXxProps {
387
+ /**
388
+ * 单选框选项列表
389
+ */
390
+ options?: OptionType[];
391
+ /**
392
+ * 单选框选项列表接口url,优先级高于 dict 字段
393
+ */
394
+ url?: string;
395
+ /**
396
+ * 单选框选项列表自定义方法,优先级高于url
397
+ * @param value 搜索关键字
398
+ */
399
+ request?: (value?: string) => Promise<Response>;
400
+ /**
401
+ * 单选框选项列表接口类型(默认POST)
402
+ */
403
+ method?: string;
404
+ /**
405
+ * 单选框选项列表接口请求参数
406
+ */
407
+ params?: any;
408
+ /**
409
+ * 快捷请求数据字典同/platform/basicDict/list接口dataType字段
410
+ */
411
+ dict?: string;
412
+ /**
413
+ * 默认选中值(仅在 form[model] 为空时写入;重置时强制回写)
414
+ * 支持静态值、Promise、同步/异步函数
415
+ */
416
+ defaultValue?: DefaultValueType<string | number>;
417
+ }
418
+ type InputNumberConfig = {
419
+ /**
420
+ * 提示文本
421
+ */
422
+ placeholder?: string;
423
+ } & Omit<InputNumberProps, 'min' | 'max'>;
424
+ /**
425
+ * w-select-two-input 组件属性
426
+ * model 可选:仅用 keys 写起止字段时可不传 model
427
+ */
428
+ export interface WFormNumberRangeProps extends Omit<FormItemXxProps, 'model'> {
429
+ /**
430
+ * 区间数组字段名(与 keys 二选一或并存)
431
+ */
432
+ model?: string;
433
+ /**
434
+ * Label 下拉选项列表
435
+ */
436
+ labelOptions?: WDropdownListItem[];
437
+ /**
438
+ * Label字段名
439
+ */
440
+ labelModel?: string;
441
+ /**
442
+ * Label 下拉默认值(未传时取 labelOptions[0].value)
443
+ */
444
+ defaultLabelValue?: string | number;
445
+ /**
446
+ * 最小值
447
+ */
448
+ min?: number;
449
+ /**
450
+ * 最大值
451
+ */
452
+ max?: number;
453
+ /**
454
+ * 绑定数值范围字段名,如果是字符类型。例:'amount' => ['amountFrom', 'amountTo']
455
+ */
456
+ keys?: string | [StartField: string, EndField: string];
457
+ /**
458
+ * 输入框配置
459
+ */
460
+ config?: [Start: InputNumberConfig, End: InputNumberConfig];
461
+ /**
462
+ * 默认值:`[start, end]`;挂载写入,WSearch 重置后回写
463
+ */
464
+ defaultValue?: DefaultValueType<[number | undefined, number | undefined]>;
465
+ }
466
+ /**
467
+ * w-form-custom 组件属性
468
+ */
469
+ export interface WFormCustomProps extends FormItemXxProps {
470
+ /**
471
+ * Input插槽名
472
+ */
473
+ inputSlot?: string;
474
+ /**
475
+ * Lable插槽名
476
+ */
477
+ labelSlot?: string;
478
+ }
479
+ /**
480
+ * w-form-upload 组件属性
481
+ */
482
+ export interface WFormUploadProps extends FormItemXxProps, Pick<UploadProps, 'multiple' | 'beforeUpload'> {
483
+ }
484
+ /**
485
+ * w-form-upload-image 组件属性
486
+ */
487
+ export interface WFormUploadImageProps extends WUploadProps, WFormUploadProps {
488
+ /**
489
+ * 宽度
490
+ */
491
+ width?: number;
492
+ /**
493
+ * 高度
494
+ */
495
+ height?: number;
496
+ /**
497
+ * 是否开启裁剪
498
+ */
499
+ cropProps?: WCropperProp;
500
+ }
501
+ /**
502
+ * w-form-multi-item 配置式选项(无 WFormMultiItemOption 子组件时使用)
503
+ */
504
+ export interface WFormMultiItemOptionConfig {
505
+ /**
506
+ * 选项标识,同时作为下拉 key;非区间内层控件会绑定到 form[model]
507
+ */
508
+ model: string;
509
+ /**
510
+ * 下拉展示文案(支持 i18n key)
511
+ */
512
+ label?: string;
513
+ /**
514
+ * 配置式渲染的组件(string 名或组件对象)
515
+ */
516
+ component?: string | Component;
517
+ /**
518
+ * 传给 component 的额外 props
519
+ */
520
+ componentProps?: Record<string, unknown>;
521
+ /**
522
+ * 具名插槽名;未传时默认用 model
523
+ */
524
+ slot?: string;
525
+ /**
526
+ * 是否禁用该下拉项
527
+ */
528
+ disabled?: boolean;
529
+ }
530
+ /**
531
+ * w-form-multi-item 组件属性
532
+ *
533
+ * Label 区为 WDropdown,切换选项时会清空非当前 option 对应字段(或调用 registerClear)。
534
+ * 内层 WFormXxx 在 Option 内自动 bare(跳过 FormItem),非区间控件的 model / label 会被 Option 覆盖。
535
+ */
536
+ export interface WFormMultiItemProps extends Partial<FormItemXxProps> {
537
+ /**
538
+ * 当前选中的 option.model,对应 v-model:activeKey
539
+ */
540
+ activeKey?: string;
541
+ /**
542
+ * 配置式选项列表;存在 WFormMultiItemOption 子组件注册时优先用注册项
543
+ */
544
+ options?: WFormMultiItemOptionConfig[];
545
+ /**
546
+ * 下拉默认选中项;有值用它,否则取 options / 注册项第一项的 model
547
+ */
548
+ defaultLabelValue?: string | number;
549
+ }
550
+ /**
551
+ * w-form-multi-item-option 组件属性(对齐 FormItemXxProps:model + label)
552
+ *
553
+ * 向内层 provide Option.model / Option.label:
554
+ * - 非区间控件绑定 form[model],label 用于 placeholder / 校验文案
555
+ * - 区间类仅用 model 作为 registerClear 的 key
556
+ */
557
+ export interface WFormMultiItemOptionProps {
558
+ /**
559
+ * 选项标识 / 下拉 key;非区间子控件字段名;区间子控件 clear 注册 key
560
+ */
561
+ model: string;
562
+ /**
563
+ * 下拉展示文案(支持 i18n key);同时覆盖内层控件 label
564
+ */
565
+ label?: string;
566
+ /**
567
+ * 是否禁用该下拉项
568
+ */
569
+ disabled?: boolean;
570
+ }
571
+ /**
572
+ * w-form-match 组件属性
573
+ */
574
+ export interface WInputMatchProps extends FormItemXxProps, Pick<SelectProps, 'tokenSeparators'> {
575
+ /**
576
+ * Label字段名
577
+ */
578
+ labelModel?: string;
579
+ /**
580
+ * 匹配模式字段名
581
+ */
582
+ afterModel?: string;
583
+ /**
584
+ * 父级字段名
585
+ */
586
+ parentModel?: string;
587
+ /**
588
+ * Label下拉选项列表
589
+ */
590
+ labelOptions?: WDropdownListItem[];
591
+ /**
592
+ * 匹配模式下拉选项列表
593
+ */
594
+ afterOptions?: OptionType[];
595
+ /**
596
+ * 数字输入类型集合
597
+ */
598
+ numberfs?: string[];
599
+ /**
600
+ * 字符输入类型集合
601
+ */
602
+ inputfs?: string[];
603
+ /**
604
+ * 最大标签数量
605
+ */
606
+ maxTagLength?: number;
607
+ /**
608
+ * 超出最大标签数量提示
609
+ */
610
+ maxTagLengthMessage?: string | ((length: number) => string);
611
+ /**
612
+ * 主输入默认值(仅在为空时写入;重置时强制回写)
613
+ * 支持静态值、Promise、同步/异步函数
614
+ */
615
+ defaultValue?: DefaultValueType<string | number | (string | number)[]>;
616
+ /**
617
+ * Label 下拉默认值;有值用它,否则用 labelOptions[0].value
618
+ */
619
+ defaultLabelValue?: string | number;
620
+ /**
621
+ * after 下拉默认值;有值用它,否则用 afterOptions[0].value
622
+ */
623
+ defaultAfterValue?: string | number;
624
+ }
@@ -0,0 +1,2 @@
1
+ export * from './business';
2
+ export * from './default';
@@ -0,0 +1,2 @@
1
+ export * from './business/type';
2
+ export * from './default/type';
@@ -0,0 +1,4 @@
1
+ export type { WIconProp } from './type';
2
+ export { default as WIcon } from './src/index.vue';
3
+ export { default as Icon } from './src/icon.vue';
4
+ export { default as WSwitchIcon } from './src/switch.vue';
@@ -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;
@@ -0,0 +1,18 @@
1
+ import { type SwitchProps } from 'ant-design-vue';
2
+ interface SwitchIcon extends SwitchProps {
3
+ title?: string;
4
+ }
5
+ type __VLS_Props = SwitchIcon;
6
+ type __VLS_PublicProps = __VLS_Props & {
7
+ 'checked'?: boolean | string | number;
8
+ };
9
+ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ change: (checked: string | number | boolean, event: Event) => any;
11
+ click: (checked: string | number | boolean, event: Event) => any;
12
+ "update:checked": (value: string | number | boolean | undefined) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
14
+ onChange?: ((checked: string | number | boolean, event: Event) => any) | undefined;
15
+ onClick?: ((checked: string | number | boolean, event: Event) => any) | undefined;
16
+ "onUpdate:checked"?: ((value: string | number | boolean | undefined) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ export default _default;