vxe-pc-ui 3.15.19 → 3.15.20

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 (34) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/style.css +1 -1
  3. package/es/style.min.css +1 -1
  4. package/es/ui/index.js +1 -1
  5. package/es/ui/src/log.js +1 -1
  6. package/es/upload/src/upload.js +29 -13
  7. package/lib/icon/style/style.css +1 -1
  8. package/lib/icon/style/style.min.css +1 -1
  9. package/lib/index.umd.js +36 -16
  10. package/lib/index.umd.min.js +1 -1
  11. package/lib/style.css +1 -1
  12. package/lib/style.min.css +1 -1
  13. package/lib/ui/index.js +1 -1
  14. package/lib/ui/index.min.js +1 -1
  15. package/lib/ui/src/log.js +1 -1
  16. package/lib/ui/src/log.min.js +1 -1
  17. package/lib/upload/src/upload.js +32 -12
  18. package/lib/upload/src/upload.min.js +1 -1
  19. package/package.json +1 -1
  20. package/packages/upload/src/upload.ts +29 -13
  21. package/types/components/table.d.ts +6 -1
  22. package/types/components/upload.d.ts +17 -0
  23. /package/es/icon/{iconfont.1782955787484.ttf → iconfont.1782978162180.ttf} +0 -0
  24. /package/es/icon/{iconfont.1782955787484.woff → iconfont.1782978162180.woff} +0 -0
  25. /package/es/icon/{iconfont.1782955787484.woff2 → iconfont.1782978162180.woff2} +0 -0
  26. /package/es/{iconfont.1782955787484.ttf → iconfont.1782978162180.ttf} +0 -0
  27. /package/es/{iconfont.1782955787484.woff → iconfont.1782978162180.woff} +0 -0
  28. /package/es/{iconfont.1782955787484.woff2 → iconfont.1782978162180.woff2} +0 -0
  29. /package/lib/icon/style/{iconfont.1782955787484.ttf → iconfont.1782978162180.ttf} +0 -0
  30. /package/lib/icon/style/{iconfont.1782955787484.woff → iconfont.1782978162180.woff} +0 -0
  31. /package/lib/icon/style/{iconfont.1782955787484.woff2 → iconfont.1782978162180.woff2} +0 -0
  32. /package/lib/{iconfont.1782955787484.ttf → iconfont.1782978162180.ttf} +0 -0
  33. /package/lib/{iconfont.1782955787484.woff → iconfont.1782978162180.woff} +0 -0
  34. /package/lib/{iconfont.1782955787484.woff2 → iconfont.1782978162180.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -11650,7 +11650,7 @@ var es_regexp_exec = __webpack_require__(7495);
11650
11650
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
11651
11651
  var es_string_match = __webpack_require__(1761);
11652
11652
  ;// ./node_modules/@vxe-ui/core/es/src/core.js
11653
- var coreVersion = "3.4.14";
11653
+ var coreVersion = "3.4.15";
11654
11654
  var VxeCore = {
11655
11655
  coreVersion: coreVersion,
11656
11656
  uiVersion: '',
@@ -12410,7 +12410,7 @@ function createLog(type, name) {
12410
12410
  return msg;
12411
12411
  };
12412
12412
  }
12413
- var version = "3.4.14";
12413
+ var version = "3.4.15";
12414
12414
  var log = {
12415
12415
  create: createLog,
12416
12416
  warn: createLog('warn', "v".concat(version)),
@@ -13226,7 +13226,7 @@ var es_array_join = __webpack_require__(8598);
13226
13226
 
13227
13227
 
13228
13228
  var log_log = VxeUI.log;
13229
- var uiVersion = "ui v".concat("3.15.19");
13229
+ var uiVersion = "ui v".concat("3.15.20");
13230
13230
  function createComponentLog(name) {
13231
13231
  var tableVersion = VxeUI.tableVersion ? "table v".concat(VxeUI.tableVersion) : '';
13232
13232
  var ganttVersion = VxeUI.ganttVersion ? "gantt v".concat(VxeUI.ganttVersion) : '';
@@ -13244,7 +13244,7 @@ var errLog = log_log.create('error', uiVersion);
13244
13244
 
13245
13245
 
13246
13246
 
13247
- var ui_version = "3.15.19";
13247
+ var ui_version = "3.15.20";
13248
13248
  VxeUI.uiVersion = ui_version;
13249
13249
  VxeUI.dynamicApp = dynamicApp;
13250
13250
  function config(options) {
@@ -67010,7 +67010,7 @@ function upload_createInternalData() {
67010
67010
  }
67011
67011
  return '';
67012
67012
  },
67013
- handleChange: function handleChange(value) {
67013
+ handleChangeEvent: function handleChangeEvent(evnt, vals) {
67014
67014
  var $xeUpload = this;
67015
67015
  var props = $xeUpload;
67016
67016
  var singleMode = props.singleMode,
@@ -67018,7 +67018,7 @@ function upload_createInternalData() {
67018
67018
  urlArgs = props.urlArgs;
67019
67019
  var urlProp = $xeUpload.computeUrlProp;
67020
67020
  var nameProp = $xeUpload.computeNameProp;
67021
- var restList = value ? value.slice(0) : [];
67021
+ var restList = vals ? vals.slice(0) : [];
67022
67022
  if (urlMode) {
67023
67023
  restList = restList.map(function (item) {
67024
67024
  var url = item[urlProp];
@@ -67033,7 +67033,12 @@ function upload_createInternalData() {
67033
67033
  return url;
67034
67034
  });
67035
67035
  }
67036
- $xeUpload.emitModel(singleMode ? restList[0] || null : restList);
67036
+ var value = singleMode ? restList[0] || null : restList;
67037
+ $xeUpload.emitModel(value);
67038
+ $xeUpload.dispatchEvent('change', {
67039
+ value: value
67040
+ }, evnt);
67041
+ return value;
67037
67042
  },
67038
67043
  getThumbnailFileUrl: function getThumbnailFileUrl(item) {
67039
67044
  var $xeUpload = this;
@@ -67157,6 +67162,7 @@ function upload_createInternalData() {
67157
67162
  if (cacheItem) {
67158
67163
  cacheItem.percent = 100;
67159
67164
  cacheItem.status = 'success';
67165
+ cacheItem.response = res;
67160
67166
  }
67161
67167
  // 处理动态字段双向绑定问题
67162
67168
  // Object.assign(item, res)
@@ -67172,6 +67178,7 @@ function upload_createInternalData() {
67172
67178
  var cacheItem = fileCacheMaps[fileKey];
67173
67179
  if (cacheItem) {
67174
67180
  cacheItem.status = 'error';
67181
+ cacheItem.response = res;
67175
67182
  }
67176
67183
  if (showErrorStatus) {
67177
67184
  // 处理动态字段双向绑定问题
@@ -67208,7 +67215,7 @@ function upload_createInternalData() {
67208
67215
  }
67209
67216
  return Promise.resolve();
67210
67217
  },
67211
- handleReUpload: function handleReUpload(item) {
67218
+ handleReUploadEvent: function handleReUploadEvent(evnt, item) {
67212
67219
  var $xeUpload = this;
67213
67220
  var props = $xeUpload;
67214
67221
  var reactData = $xeUpload.reactData;
@@ -67225,7 +67232,7 @@ function upload_createInternalData() {
67225
67232
  cacheItem.percent = 0;
67226
67233
  $xeUpload.handleUploadResult(item, file).then(function () {
67227
67234
  if (urlMode) {
67228
- $xeUpload.handleChange(reactData.fileList);
67235
+ $xeUpload.handleChangeEvent(evnt, reactData.fileList);
67229
67236
  }
67230
67237
  });
67231
67238
  }
@@ -67335,7 +67342,8 @@ function upload_createInternalData() {
67335
67342
  file: file,
67336
67343
  loading: !!autoSubmit,
67337
67344
  status: 'pending',
67338
- percent: 0
67345
+ percent: 0,
67346
+ response: null
67339
67347
  };
67340
67348
  }
67341
67349
  var item = fileObj;
@@ -67357,12 +67365,24 @@ function upload_createInternalData() {
67357
67365
  }, evnt);
67358
67366
  });
67359
67367
  Promise.all(uploadPromiseRests).then(function () {
67368
+ var fileCacheMaps = reactData.fileCacheMaps;
67360
67369
  var restFileList = reactData.fileList;
67370
+ var uploadResults = restFileList.map(function (option) {
67371
+ var fileKey = $xeUpload.getFieldKey(option);
67372
+ var cacheItem = fileCacheMaps[fileKey];
67373
+ return {
67374
+ option: option,
67375
+ status: cacheItem ? cacheItem.status : null,
67376
+ response: cacheItem ? cacheItem.response : null
67377
+ };
67378
+ });
67379
+ var value = $xeUpload.handleChangeEvent(evnt, restFileList);
67361
67380
  $xeUpload.dispatchEvent('upload-queue-end', {
67381
+ value: value,
67362
67382
  options: restFileList,
67383
+ results: uploadResults,
67363
67384
  files: selectFiles
67364
67385
  }, evnt);
67365
- $xeUpload.handleChange(restFileList);
67366
67386
  // 自动更新校验状态
67367
67387
  if ($xeForm && formItemInfo) {
67368
67388
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, restFileList);
@@ -67405,7 +67425,7 @@ function upload_createInternalData() {
67405
67425
  var formItemInfo = $xeUpload.formItemInfo;
67406
67426
  var fileList = reactData.fileList;
67407
67427
  fileList.splice(index, 1);
67408
- $xeUpload.handleChange(fileList);
67428
+ $xeUpload.handleChangeEvent(evnt, fileList);
67409
67429
  // 自动更新校验状态
67410
67430
  if ($xeForm && formItemInfo) {
67411
67431
  $xeForm.triggerItemEvent(evnt || {
@@ -67920,8 +67940,8 @@ function upload_createInternalData() {
67920
67940
  content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
67921
67941
  },
67922
67942
  on: {
67923
- click: function click() {
67924
- $xeUpload.handleReUpload(item);
67943
+ click: function click(evnt) {
67944
+ $xeUpload.handleReUploadEvent(evnt, item);
67925
67945
  }
67926
67946
  }
67927
67947
  })]) : renderEmptyElement($xeUpload), h('div', {
@@ -68164,8 +68184,8 @@ function upload_createInternalData() {
68164
68184
  content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
68165
68185
  },
68166
68186
  on: {
68167
- click: function click() {
68168
- $xeUpload.handleReUpload(item);
68187
+ click: function click(evnt) {
68188
+ $xeUpload.handleReUploadEvent(evnt, item);
68169
68189
  }
68170
68190
  }
68171
68191
  })]) : renderEmptyElement($xeUpload), h('div', {