@vunk/form 0.0.1-alpha.48 → 0.0.1-alpha.49

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 (37) hide show
  1. package/component.d.ts +1 -1
  2. package/components/button/src/ctx.d.ts +4 -3
  3. package/components/button/src/index.vue.d.ts +27 -23
  4. package/components/cascader/src/ctx.d.ts +10 -11
  5. package/components/cascader/src/index.vue.d.ts +46 -48
  6. package/components/checkbox/src/ctx.d.ts +2 -2
  7. package/components/checkbox/src/index.vue.d.ts +12 -12
  8. package/components/color-picker/src/ctx.d.ts +1 -1
  9. package/components/color-picker/src/index.vue.d.ts +11 -11
  10. package/components/date-picker/src/ctx.d.ts +1 -1
  11. package/components/date-picker/src/index.vue.d.ts +22 -22
  12. package/components/form/src/ctx.d.ts +58 -22
  13. package/components/form/src/index.vue.d.ts +166 -63
  14. package/components/form-item/src/ctx.d.ts +1 -1
  15. package/components/form-item/src/index.vue.d.ts +3 -3
  16. package/components/input/src/ctx.d.ts +3 -3
  17. package/components/input/src/index.vue.d.ts +26 -26
  18. package/components/input-number/src/ctx.d.ts +2 -2
  19. package/components/input-number/src/index.vue.d.ts +17 -17
  20. package/components/radio/src/ctx.d.ts +1 -1
  21. package/components/radio/src/index.vue.d.ts +11 -11
  22. package/components/select/src/ctx.d.ts +5 -5
  23. package/components/select/src/index.vue.d.ts +59 -59
  24. package/components/switch/src/ctx.d.ts +1 -1
  25. package/components/switch/src/index.vue.d.ts +12 -12
  26. package/components/upload/index.css +10 -10
  27. package/components/upload/index.js +129 -51
  28. package/components/upload/src/ctx.d.ts +3 -3
  29. package/components/upload/src/file.vue.d.ts +5 -5
  30. package/components/upload/src/index.vue.d.ts +78 -72
  31. package/index.css +10 -10
  32. package/package.json +1 -1
  33. package/shared/element-plus/ctx.d.ts +2 -2
  34. package/shared/element-plus/index.js +34 -16
  35. package/shared/element-plus/instances.d.ts +7 -8
  36. package/shared/progress-it/index.d.ts +16 -0
  37. package/shared/progress-it/index.js +57 -0
@@ -7,6 +7,7 @@ import { createUploadBindProps } from '@vunk/form/shared/element-plus';
7
7
  import { NOOP } from '@vunk/core/shared/utils-function';
8
8
  import { RestFetch } from '@vunk/core/shared/utils-fetch';
9
9
  import { useComputedReadonly } from '@vunk/form/composables';
10
+ import progress from '@vunk/form/shared/progress-it';
10
11
 
11
12
  var __defProp = Object.defineProperty;
12
13
  var __defProps = Object.defineProperties;
@@ -52,7 +53,7 @@ var ctx = /*#__PURE__*/Object.freeze({
52
53
  createOnEmits: createOnEmits
53
54
  });
54
55
 
55
- /*! Element Plus Icons Vue v2.0.10 */
56
+ /*! Element Plus Icons Vue v2.1.0 */
56
57
 
57
58
  // unplugin-vue:/plugin-vue/export-helper
58
59
  var export_helper_default = (sfc, props) => {
@@ -67,12 +68,18 @@ var check_vue_vue_type_script_lang_default = {
67
68
  name: "Check"
68
69
  };
69
70
  var _hoisted_143 = {
70
- viewBox: "0 0 1024 1024",
71
- xmlns: "http://www.w3.org/2000/svg"
72
- }, _hoisted_243 = /* @__PURE__ */ createElementVNode("path", {
73
- fill: "currentColor",
74
- d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
75
- }, null, -1), _hoisted_342 = [
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ viewBox: "0 0 1024 1024"
73
+ }, _hoisted_243 = /* @__PURE__ */ createElementVNode(
74
+ "path",
75
+ {
76
+ fill: "currentColor",
77
+ d: "M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"
78
+ },
79
+ null,
80
+ -1
81
+ /* HOISTED */
82
+ ), _hoisted_342 = [
76
83
  _hoisted_243
77
84
  ];
78
85
  function _sfc_render43(_ctx, _cache, $props, $setup, $data, $options) {
@@ -85,15 +92,27 @@ var circle_check_vue_vue_type_script_lang_default = {
85
92
  name: "CircleCheck"
86
93
  };
87
94
  var _hoisted_149 = {
88
- viewBox: "0 0 1024 1024",
89
- xmlns: "http://www.w3.org/2000/svg"
90
- }, _hoisted_249 = /* @__PURE__ */ createElementVNode("path", {
91
- fill: "currentColor",
92
- d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
93
- }, null, -1), _hoisted_348 = /* @__PURE__ */ createElementVNode("path", {
94
- fill: "currentColor",
95
- d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
96
- }, null, -1), _hoisted_415 = [
95
+ xmlns: "http://www.w3.org/2000/svg",
96
+ viewBox: "0 0 1024 1024"
97
+ }, _hoisted_249 = /* @__PURE__ */ createElementVNode(
98
+ "path",
99
+ {
100
+ fill: "currentColor",
101
+ d: "M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"
102
+ },
103
+ null,
104
+ -1
105
+ /* HOISTED */
106
+ ), _hoisted_348 = /* @__PURE__ */ createElementVNode(
107
+ "path",
108
+ {
109
+ fill: "currentColor",
110
+ d: "M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"
111
+ },
112
+ null,
113
+ -1
114
+ /* HOISTED */
115
+ ), _hoisted_415 = [
97
116
  _hoisted_249,
98
117
  _hoisted_348
99
118
  ];
@@ -107,12 +126,18 @@ var close_vue_vue_type_script_lang_default = {
107
126
  name: "Close"
108
127
  };
109
128
  var _hoisted_156 = {
110
- viewBox: "0 0 1024 1024",
111
- xmlns: "http://www.w3.org/2000/svg"
112
- }, _hoisted_256 = /* @__PURE__ */ createElementVNode("path", {
113
- fill: "currentColor",
114
- d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
115
- }, null, -1), _hoisted_355 = [
129
+ xmlns: "http://www.w3.org/2000/svg",
130
+ viewBox: "0 0 1024 1024"
131
+ }, _hoisted_256 = /* @__PURE__ */ createElementVNode(
132
+ "path",
133
+ {
134
+ fill: "currentColor",
135
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
136
+ },
137
+ null,
138
+ -1
139
+ /* HOISTED */
140
+ ), _hoisted_355 = [
116
141
  _hoisted_256
117
142
  ];
118
143
  function _sfc_render56(_ctx, _cache, $props, $setup, $data, $options) {
@@ -125,12 +150,18 @@ var delete_vue_vue_type_script_lang_default = {
125
150
  name: "Delete"
126
151
  };
127
152
  var _hoisted_180 = {
128
- viewBox: "0 0 1024 1024",
129
- xmlns: "http://www.w3.org/2000/svg"
130
- }, _hoisted_280 = /* @__PURE__ */ createElementVNode("path", {
131
- fill: "currentColor",
132
- d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"
133
- }, null, -1), _hoisted_379 = [
153
+ xmlns: "http://www.w3.org/2000/svg",
154
+ viewBox: "0 0 1024 1024"
155
+ }, _hoisted_280 = /* @__PURE__ */ createElementVNode(
156
+ "path",
157
+ {
158
+ fill: "currentColor",
159
+ d: "M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"
160
+ },
161
+ null,
162
+ -1
163
+ /* HOISTED */
164
+ ), _hoisted_379 = [
134
165
  _hoisted_280
135
166
  ];
136
167
  function _sfc_render80(_ctx, _cache, $props, $setup, $data, $options) {
@@ -143,12 +174,18 @@ var document_vue_vue_type_script_lang_default = {
143
174
  name: "Document"
144
175
  };
145
176
  var _hoisted_190 = {
146
- viewBox: "0 0 1024 1024",
147
- xmlns: "http://www.w3.org/2000/svg"
148
- }, _hoisted_290 = /* @__PURE__ */ createElementVNode("path", {
149
- fill: "currentColor",
150
- d: "M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"
151
- }, null, -1), _hoisted_389 = [
177
+ xmlns: "http://www.w3.org/2000/svg",
178
+ viewBox: "0 0 1024 1024"
179
+ }, _hoisted_290 = /* @__PURE__ */ createElementVNode(
180
+ "path",
181
+ {
182
+ fill: "currentColor",
183
+ d: "M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"
184
+ },
185
+ null,
186
+ -1
187
+ /* HOISTED */
188
+ ), _hoisted_389 = [
152
189
  _hoisted_290
153
190
  ];
154
191
  function _sfc_render90(_ctx, _cache, $props, $setup, $data, $options) {
@@ -161,12 +198,18 @@ var download_vue_vue_type_script_lang_default = {
161
198
  name: "Download"
162
199
  };
163
200
  var _hoisted_191 = {
164
- viewBox: "0 0 1024 1024",
165
- xmlns: "http://www.w3.org/2000/svg"
166
- }, _hoisted_291 = /* @__PURE__ */ createElementVNode("path", {
167
- fill: "currentColor",
168
- d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64v450.304z"
169
- }, null, -1), _hoisted_390 = [
201
+ xmlns: "http://www.w3.org/2000/svg",
202
+ viewBox: "0 0 1024 1024"
203
+ }, _hoisted_291 = /* @__PURE__ */ createElementVNode(
204
+ "path",
205
+ {
206
+ fill: "currentColor",
207
+ d: "M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64v450.304z"
208
+ },
209
+ null,
210
+ -1
211
+ /* HOISTED */
212
+ ), _hoisted_390 = [
170
213
  _hoisted_291
171
214
  ];
172
215
  function _sfc_render91(_ctx, _cache, $props, $setup, $data, $options) {
@@ -179,12 +222,18 @@ var zoom_in_vue_vue_type_script_lang_default = {
179
222
  name: "ZoomIn"
180
223
  };
181
224
  var _hoisted_1292 = {
182
- viewBox: "0 0 1024 1024",
183
- xmlns: "http://www.w3.org/2000/svg"
184
- }, _hoisted_2292 = /* @__PURE__ */ createElementVNode("path", {
185
- fill: "currentColor",
186
- d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z"
187
- }, null, -1), _hoisted_3291 = [
225
+ xmlns: "http://www.w3.org/2000/svg",
226
+ viewBox: "0 0 1024 1024"
227
+ }, _hoisted_2292 = /* @__PURE__ */ createElementVNode(
228
+ "path",
229
+ {
230
+ fill: "currentColor",
231
+ d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704zm-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64h96z"
232
+ },
233
+ null,
234
+ -1
235
+ /* HOISTED */
236
+ ), _hoisted_3291 = [
188
237
  _hoisted_2292
189
238
  ];
190
239
  function _sfc_render292(_ctx, _cache, $props, $setup, $data, $options) {
@@ -369,8 +418,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
369
418
  createCommentVNode(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),
370
419
  createCommentVNode(" This is a bug which needs to be fixed "),
371
420
  createCommentVNode(" TODO: Fix the incorrect navigation interaction "),
372
- createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{\r
373
- t('el.upload.deleteTip')\r
421
+ createCommentVNode(` <i v-if="!disabled" :class="nsIcon.m('close-tip')">{{
422
+ t('el.upload.deleteTip')
374
423
  }}</i> `),
375
424
  createCommentVNode(" picture-card "),
376
425
  _ctx.listType === "picture-card" ? (openBlock(), createElementBlock("span", {
@@ -436,19 +485,45 @@ const _sfc_main = defineComponent({
436
485
  props,
437
486
  setup(props2) {
438
487
  const formItemBindProps = _VkfFormItemCtx.createBindProps(props2);
439
- const coreBindProps = createUploadBindProps(props2, ["disabled", "fileList"]);
488
+ const coreBindProps = createUploadBindProps(props2, ["disabled", "fileList", "beforeUpload"]);
440
489
  const uploadRef = shallowRef();
441
490
  const handleRemove = (file) => {
442
491
  uploadRef.value?.handleRemove(file);
443
492
  };
444
493
  const readonly = useComputedReadonly(props2);
494
+ const onSuccess = (response, uploadFile) => {
495
+ const raw = uploadFile.raw;
496
+ raw.progress(true);
497
+ uploadFile.percentage = 100;
498
+ uploadFile.status = "success";
499
+ };
500
+ const onProgress = (evt, uploadFile, uploadFiles) => {
501
+ console.log(evt, uploadFile, uploadFiles);
502
+ };
503
+ const beforeUpload = (rawFile) => {
504
+ const effect = (e, s) => {
505
+ const file = props2.fileList.find((item) => item.uid === rawFile.uid);
506
+ if (file) {
507
+ file.percentage = Number((e * 100).toFixed(2));
508
+ if (s === false) {
509
+ file.status = "uploading";
510
+ }
511
+ }
512
+ };
513
+ rawFile.progress = progress(effect)(false);
514
+ props2.beforeUpload?.(rawFile);
515
+ return true;
516
+ };
445
517
  return {
446
518
  formItemBindProps,
447
519
  pickObject,
448
520
  coreBindProps,
449
521
  uploadRef,
450
522
  handleRemove,
451
- readonly
523
+ readonly,
524
+ onSuccess,
525
+ onProgress,
526
+ beforeUpload
452
527
  };
453
528
  }
454
529
  });
@@ -469,6 +544,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
469
544
  fileList: _ctx.fileList ?? [],
470
545
  "onUpdate:fileList": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:fileList", $event)),
471
546
  ref: "uploadRef",
547
+ "on-success": _ctx.onSuccess,
548
+ "on-progress": _ctx.onProgress,
549
+ "before-upload": _ctx.beforeUpload,
472
550
  disabled: _ctx.readonly || _ctx.disabled
473
551
  }), createSlots({
474
552
  file: withCtx(({ file }) => [
@@ -498,7 +576,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
498
576
  ]),
499
577
  key: "0"
500
578
  } : void 0
501
- ]), 1040, ["class", "fileList", "disabled"]),
579
+ ]), 1040, ["class", "fileList", "on-success", "on-progress", "before-upload", "disabled"]),
502
580
  createElementVNode("span", {
503
581
  class: normalizeClass(["vkf-upload-empty-tip", {
504
582
  "is-readonly": _ctx.readonly,
@@ -104,7 +104,7 @@ export declare const props: {
104
104
  type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "select", boolean>;
105
105
  fileList: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadUserFile[]) | (() => import("element-plus").UploadUserFile[]) | ((new (...args: any[]) => import("element-plus").UploadUserFile[]) | (() => import("element-plus").UploadUserFile[]))[], unknown, unknown, () => [], boolean>;
106
106
  autoUpload: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
107
- listType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "text" | "picture" | "picture-card", unknown, "text", boolean>;
107
+ listType: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "picture" | "text" | "picture-card", unknown, "text", boolean>;
108
108
  httpRequest: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("element-plus").UploadRequestHandler) | (() => import("element-plus").UploadRequestHandler) | {
109
109
  (): import("element-plus").UploadRequestHandler;
110
110
  new (): any;
@@ -133,7 +133,7 @@ export declare const props: {
133
133
  };
134
134
  error: StringConstructor;
135
135
  validateStatus: {
136
- readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "error" | "success" | "validating", unknown>>;
136
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "success" | "error" | "validating", unknown>>;
137
137
  readonly required: false;
138
138
  readonly validator: ((val: unknown) => boolean) | undefined;
139
139
  __epPropKey: true;
@@ -162,7 +162,7 @@ export declare const props: {
162
162
  default: undefined;
163
163
  };
164
164
  };
165
- export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onChange", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"name", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"drag", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"onChange", keyof T2>, KE> | Exclude<Extract<"onRemove", keyof T2>, KE> | Exclude<Extract<"listType", keyof T2>, KE> | Exclude<Extract<"onPreview", keyof T2>, KE> | Exclude<Extract<"preview", keyof T2>, KE> | Exclude<Extract<"method", keyof T2>, KE> | Exclude<Extract<"beforeUpload", keyof T2>, KE> | Exclude<Extract<"beforeRemove", keyof T2>, KE> | Exclude<Extract<"onSuccess", keyof T2>, KE> | Exclude<Extract<"onProgress", keyof T2>, KE> | Exclude<Extract<"onError", keyof T2>, KE> | Exclude<Extract<"onExceed", keyof T2>, KE> | Exclude<Extract<"action", keyof T2>, KE> | Exclude<Extract<"headers", keyof T2>, KE> | Exclude<Extract<"withCredentials", keyof T2>, KE> | Exclude<Extract<"showFileList", keyof T2>, KE> | Exclude<Extract<"accept", keyof T2>, KE> | Exclude<Extract<"fileList", keyof T2>, KE> | Exclude<Extract<"autoUpload", keyof T2>, KE> | Exclude<Extract<"httpRequest", keyof T2>, KE> | Exclude<Extract<"limit", keyof T2>, KE> | Exclude<Extract<"tip", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onChange", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"disabled", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onChange", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>]: T2[k]; }[P]; }>;
165
+ export declare const createBindProps: <T2 extends import("@vunk/core").NormalObject, EX extends (Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"disabled", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"onChange", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>)[] | undefined>(propsArg: T2, excludes?: EX | undefined) => import("vue").ComputedRef<{ [P in EX extends (infer KE)[] ? Exclude<Extract<"required", keyof T2>, KE> | Exclude<Extract<"type", keyof T2>, KE> | Exclude<Extract<"disabled", keyof T2>, KE> | Exclude<Extract<"label", keyof T2>, KE> | Exclude<Extract<"labelWidth", keyof T2>, KE> | Exclude<Extract<"prop", keyof T2>, KE> | Exclude<Extract<"rules", keyof T2>, KE> | Exclude<Extract<"error", keyof T2>, KE> | Exclude<Extract<"validateStatus", keyof T2>, KE> | Exclude<Extract<"for", keyof T2>, KE> | Exclude<Extract<"inlineMessage", keyof T2>, KE> | Exclude<Extract<"showMessage", keyof T2>, KE> | Exclude<Extract<"formItemSize", keyof T2>, KE> | Exclude<Extract<"formItemSlots", keyof T2>, KE> | Exclude<Extract<"elRef", keyof T2>, KE> | Exclude<Extract<"inline", keyof T2>, KE> | Exclude<Extract<"readonly", keyof T2>, KE> | Exclude<Extract<"name", keyof T2>, KE> | Exclude<Extract<"data", keyof T2>, KE> | Exclude<Extract<"onChange", keyof T2>, KE> | Exclude<Extract<"drag", keyof T2>, KE> | Exclude<Extract<"multiple", keyof T2>, KE> | Exclude<Extract<"onRemove", keyof T2>, KE> | Exclude<Extract<"listType", keyof T2>, KE> | Exclude<Extract<"onPreview", keyof T2>, KE> | Exclude<Extract<"preview", keyof T2>, KE> | Exclude<Extract<"method", keyof T2>, KE> | Exclude<Extract<"beforeUpload", keyof T2>, KE> | Exclude<Extract<"beforeRemove", keyof T2>, KE> | Exclude<Extract<"onSuccess", keyof T2>, KE> | Exclude<Extract<"onProgress", keyof T2>, KE> | Exclude<Extract<"onError", keyof T2>, KE> | Exclude<Extract<"onExceed", keyof T2>, KE> | Exclude<Extract<"action", keyof T2>, KE> | Exclude<Extract<"headers", keyof T2>, KE> | Exclude<Extract<"withCredentials", keyof T2>, KE> | Exclude<Extract<"showFileList", keyof T2>, KE> | Exclude<Extract<"accept", keyof T2>, KE> | Exclude<Extract<"fileList", keyof T2>, KE> | Exclude<Extract<"autoUpload", keyof T2>, KE> | Exclude<Extract<"httpRequest", keyof T2>, KE> | Exclude<Extract<"limit", keyof T2>, KE> | Exclude<Extract<"tip", keyof T2>, KE> : Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"disabled", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"onChange", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>]: { [k in Extract<"required", keyof T2> | Extract<"type", keyof T2> | Extract<"disabled", keyof T2> | Extract<"label", keyof T2> | Extract<"labelWidth", keyof T2> | Extract<"prop", keyof T2> | Extract<"rules", keyof T2> | Extract<"error", keyof T2> | Extract<"validateStatus", keyof T2> | Extract<"for", keyof T2> | Extract<"inlineMessage", keyof T2> | Extract<"showMessage", keyof T2> | Extract<"formItemSize", keyof T2> | Extract<"formItemSlots", keyof T2> | Extract<"elRef", keyof T2> | Extract<"inline", keyof T2> | Extract<"readonly", keyof T2> | Extract<"name", keyof T2> | Extract<"data", keyof T2> | Extract<"onChange", keyof T2> | Extract<"drag", keyof T2> | Extract<"multiple", keyof T2> | Extract<"onRemove", keyof T2> | Extract<"listType", keyof T2> | Extract<"onPreview", keyof T2> | Extract<"preview", keyof T2> | Extract<"method", keyof T2> | Extract<"beforeUpload", keyof T2> | Extract<"beforeRemove", keyof T2> | Extract<"onSuccess", keyof T2> | Extract<"onProgress", keyof T2> | Extract<"onError", keyof T2> | Extract<"onExceed", keyof T2> | Extract<"action", keyof T2> | Extract<"headers", keyof T2> | Extract<"withCredentials", keyof T2> | Extract<"showFileList", keyof T2> | Extract<"accept", keyof T2> | Extract<"fileList", keyof T2> | Extract<"autoUpload", keyof T2> | Extract<"httpRequest", keyof T2> | Extract<"limit", keyof T2> | Extract<"tip", keyof T2>]: T2[k]; }[P]; }>;
166
166
  export declare const emits: {
167
167
  'update:fileList': null;
168
168
  remove: (e: UploadFile) => UploadFile;
@@ -2,7 +2,7 @@ import { UploadFile } from 'element-plus';
2
2
  import { PropType } from 'vue';
3
3
  declare const _default: import("vue").DefineComponent<{
4
4
  listType: {
5
- type: PropType<"text" | "picture" | "picture-card">;
5
+ type: PropType<"picture" | "text" | "picture-card">;
6
6
  default: string;
7
7
  };
8
8
  file: {
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  handleRemove: (file?: UploadFile) => void;
26
26
  t: import("element-plus").Translator;
27
27
  nsIcon: {
28
- namespace: import("vue").Ref<string>;
28
+ namespace: import("vue").ComputedRef<string>;
29
29
  b: (blockSuffix?: string | undefined) => string;
30
30
  e: (element?: string | undefined) => string;
31
31
  m: (modifier?: string | undefined) => string;
@@ -43,7 +43,7 @@ declare const _default: import("vue").DefineComponent<{
43
43
  cssVarBlockName: (name: string) => string;
44
44
  };
45
45
  nsUpload: {
46
- namespace: import("vue").Ref<string>;
46
+ namespace: import("vue").ComputedRef<string>;
47
47
  b: (blockSuffix?: string | undefined) => string;
48
48
  e: (element?: string | undefined) => string;
49
49
  m: (modifier?: string | undefined) => string;
@@ -65,7 +65,7 @@ declare const _default: import("vue").DefineComponent<{
65
65
  remove: (e: UploadFile) => UploadFile;
66
66
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
67
67
  listType: {
68
- type: PropType<"text" | "picture" | "picture-card">;
68
+ type: PropType<"picture" | "text" | "picture-card">;
69
69
  default: string;
70
70
  };
71
71
  file: {
@@ -89,7 +89,7 @@ declare const _default: import("vue").DefineComponent<{
89
89
  }, {
90
90
  disabled: boolean;
91
91
  file: UploadFile;
92
- listType: "text" | "picture" | "picture-card";
92
+ listType: "picture" | "text" | "picture-card";
93
93
  onPreview: (arg: UploadFile) => any;
94
94
  preview: boolean;
95
95
  }>;