vxe-pc-ui 4.10.23 → 4.10.25

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 (42) 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 +256 -203
  7. package/es/upload/style.css +1 -1
  8. package/es/upload/style.min.css +1 -1
  9. package/es/vxe-upload/style.css +1 -1
  10. package/es/vxe-upload/style.min.css +1 -1
  11. package/lib/icon/style/style.css +1 -1
  12. package/lib/icon/style/style.min.css +1 -1
  13. package/lib/index.umd.js +108 -16
  14. package/lib/index.umd.min.js +1 -1
  15. package/lib/style.css +1 -1
  16. package/lib/style.min.css +1 -1
  17. package/lib/ui/index.js +1 -1
  18. package/lib/ui/index.min.js +1 -1
  19. package/lib/ui/src/log.js +1 -1
  20. package/lib/ui/src/log.min.js +1 -1
  21. package/lib/upload/src/upload.js +106 -14
  22. package/lib/upload/src/upload.min.js +1 -1
  23. package/lib/upload/style/style.css +1 -1
  24. package/lib/upload/style/style.min.css +1 -1
  25. package/lib/vxe-upload/style/style.css +1 -1
  26. package/lib/vxe-upload/style/style.min.css +1 -1
  27. package/package.json +1 -1
  28. package/packages/upload/src/upload.ts +275 -223
  29. package/styles/components/upload.scss +1 -1
  30. package/types/components/upload.d.ts +56 -5
  31. /package/es/icon/{iconfont.1762996548923.ttf → iconfont.1763018326353.ttf} +0 -0
  32. /package/es/icon/{iconfont.1762996548923.woff → iconfont.1763018326353.woff} +0 -0
  33. /package/es/icon/{iconfont.1762996548923.woff2 → iconfont.1763018326353.woff2} +0 -0
  34. /package/es/{iconfont.1762996548923.ttf → iconfont.1763018326353.ttf} +0 -0
  35. /package/es/{iconfont.1762996548923.woff → iconfont.1763018326353.woff} +0 -0
  36. /package/es/{iconfont.1762996548923.woff2 → iconfont.1763018326353.woff2} +0 -0
  37. /package/lib/icon/style/{iconfont.1762996548923.ttf → iconfont.1763018326353.ttf} +0 -0
  38. /package/lib/icon/style/{iconfont.1762996548923.woff → iconfont.1763018326353.woff} +0 -0
  39. /package/lib/icon/style/{iconfont.1762996548923.woff2 → iconfont.1763018326353.woff2} +0 -0
  40. /package/lib/{iconfont.1762996548923.ttf → iconfont.1763018326353.ttf} +0 -0
  41. /package/lib/{iconfont.1762996548923.woff → iconfont.1763018326353.woff} +0 -0
  42. /package/lib/{iconfont.1762996548923.woff2 → iconfont.1763018326353.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3596,14 +3596,14 @@ function checkDynamic() {
3596
3596
  }
3597
3597
  ;// CONCATENATED MODULE: ./packages/ui/src/log.ts
3598
3598
 
3599
- const log_version = `ui v${"4.10.23"}`;
3599
+ const log_version = `ui v${"4.10.25"}`;
3600
3600
  const warnLog = log.create('warn', log_version);
3601
3601
  const errLog = log.create('error', log_version);
3602
3602
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
3603
3603
 
3604
3604
 
3605
3605
 
3606
- const ui_version = "4.10.23";
3606
+ const ui_version = "4.10.25";
3607
3607
  index_esm_VxeUI.uiVersion = ui_version;
3608
3608
  index_esm_VxeUI.dynamicApp = dynamicApp;
3609
3609
  function config(options) {
@@ -42459,7 +42459,7 @@ const saveLocalFile = options => {
42459
42459
  default: () => getConfig().upload.size || getConfig().size
42460
42460
  }
42461
42461
  },
42462
- emits: ['update:modelValue', 'add', 'remove', 'remove-fail', 'download', 'download-fail', 'upload-success', 'upload-error', 'sort-dragend'],
42462
+ emits: ['update:modelValue', 'add', 'remove', 'remove-fail', 'download', 'download-fail', 'upload-success', 'upload-error', 'sort-dragend', 'more-visible'],
42463
42463
  setup(props, context) {
42464
42464
  const {
42465
42465
  emit,
@@ -42487,6 +42487,7 @@ const saveLocalFile = options => {
42487
42487
  dragTipText: ''
42488
42488
  });
42489
42489
  const internalData = {
42490
+ moreId: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId('upload'),
42490
42491
  imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
42491
42492
  prevDragIndex: -1
42492
42493
  // prevDragPos: ''
@@ -43257,11 +43258,13 @@ const saveLocalFile = options => {
43257
43258
  });
43258
43259
  return files;
43259
43260
  };
43260
- const handleMoreEvent = () => {
43261
+ const handleMoreEvent = evntParams => {
43261
43262
  const formReadonly = computeFormReadonly.value;
43262
43263
  const isImage = computeIsImage.value;
43264
+ const evnt = evntParams.$event;
43263
43265
  if (index_esm_VxeUI.modal) {
43264
43266
  index_esm_VxeUI.modal.open({
43267
+ id: internalData.moreId,
43265
43268
  title: formReadonly ? getI18n('vxe.upload.morePopup.readTitle') : getI18n(`vxe.upload.morePopup.${isImage ? 'imageTitle' : 'fileTitle'}`),
43266
43269
  width: 660,
43267
43270
  height: 500,
@@ -43286,6 +43289,7 @@ const saveLocalFile = options => {
43286
43289
  fileList
43287
43290
  } = reactData;
43288
43291
  const isDisabled = computeIsDisabled.value;
43292
+ const moreContSlot = slots.moreContent || slots['more-content'];
43289
43293
  const ons = {};
43290
43294
  if (dragToUpload && dragIndex === -1) {
43291
43295
  ons.onDragover = handleUploadDragoverEvent;
@@ -43302,7 +43306,9 @@ const saveLocalFile = options => {
43302
43306
  'is--drag': isDragUploadStatus
43303
43307
  }],
43304
43308
  ...ons
43305
- }, [isImage ? dragSort ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
43309
+ }, moreContSlot ? vn_getSlotVNs(moreContSlot({
43310
+ options: fileList
43311
+ })) : [isImage ? dragSort ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.TransitionGroup, {
43306
43312
  name: `vxe-upload--drag-list${isDragMove ? '' : '-disabled'}`,
43307
43313
  tag: 'div',
43308
43314
  class: 'vxe-upload--image-more-list'
@@ -43331,10 +43337,22 @@ const saveLocalFile = options => {
43331
43337
  onShow() {
43332
43338
  reactData.showMorePopup = true;
43333
43339
  },
43334
- onHide() {
43340
+ onHide({
43341
+ $event
43342
+ }) {
43335
43343
  reactData.showMorePopup = false;
43344
+ if ($event) {
43345
+ dispatchEvent('more-visible', {
43346
+ visible: false
43347
+ }, $event);
43348
+ }
43336
43349
  }
43337
43350
  });
43351
+ if (evnt) {
43352
+ dispatchEvent('more-visible', {
43353
+ visible: true
43354
+ }, evnt);
43355
+ }
43338
43356
  }
43339
43357
  };
43340
43358
  const showDropTip = (evnt, dragEl, dragPos) => {
@@ -43537,6 +43555,27 @@ const saveLocalFile = options => {
43537
43555
  return Promise.all(allPendingList.splice(0, msNum).map(handleSubmit)).then(() => {
43538
43556
  // 完成
43539
43557
  });
43558
+ },
43559
+ getMoreVisible() {
43560
+ return reactData.showMorePopup;
43561
+ },
43562
+ openMore() {
43563
+ handleMoreEvent({
43564
+ $event: new Event('click')
43565
+ });
43566
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
43567
+ },
43568
+ openMoreByEvent(evnt) {
43569
+ handleMoreEvent({
43570
+ $event: evnt
43571
+ });
43572
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
43573
+ },
43574
+ closeMore() {
43575
+ if (index_esm_VxeUI.modal) {
43576
+ index_esm_VxeUI.modal.close(internalData.moreId);
43577
+ }
43578
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
43540
43579
  }
43541
43580
  };
43542
43581
  const uploadPrivateMethods = {};
@@ -43554,13 +43593,17 @@ const saveLocalFile = options => {
43554
43593
  showSubmitButton
43555
43594
  } = props;
43556
43595
  const {
43596
+ fileList,
43557
43597
  fileCacheMaps
43558
43598
  } = reactData;
43559
43599
  const isDisabled = computeIsDisabled.value;
43560
43600
  const formReadonly = computeFormReadonly.value;
43561
43601
  const nameProp = computeNameProp.value;
43562
43602
  const typeProp = computeTypeProp.value;
43603
+ const optionSlot = slots.option;
43604
+ const actionSlot = slots.action;
43563
43605
  const cornerSlot = slots.corner;
43606
+ const nameSlot = slots.name;
43564
43607
  const ons = {};
43565
43608
  if (dragSort && currList.length > 1) {
43566
43609
  ons.onDragstart = handleDragSortDragstartEvent;
@@ -43590,7 +43633,11 @@ const saveLocalFile = options => {
43590
43633
  fileid: fileKey,
43591
43634
  draggable: dragSort ? true : null,
43592
43635
  ...ons
43593
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43636
+ }, optionSlot ? vn_getSlotVNs(optionSlot({
43637
+ option: item,
43638
+ isMoreView,
43639
+ options: fileList
43640
+ })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43594
43641
  class: 'vxe-upload--file-item-icon'
43595
43642
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
43596
43643
  class: getIcon()[`UPLOAD_FILE_TYPE_${`${item[typeProp]}`.toLocaleUpperCase()}`] || getIcon().UPLOAD_FILE_TYPE_DEFAULT
@@ -43602,7 +43649,11 @@ const saveLocalFile = options => {
43602
43649
  handlePreviewFileEvent(evnt, item);
43603
43650
  }
43604
43651
  }
43605
- }, fileName), isLoading ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43652
+ }, nameSlot ? vn_getSlotVNs(nameSlot({
43653
+ option: item,
43654
+ isMoreView,
43655
+ options: fileList
43656
+ })) : fileName), isLoading ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43606
43657
  class: 'vxe-upload--file-item-loading-icon'
43607
43658
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
43608
43659
  class: getIcon().UPLOAD_LOADING
@@ -43622,11 +43673,17 @@ const saveLocalFile = options => {
43622
43673
  }
43623
43674
  })]) : renderEmptyElement($xeUpload), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43624
43675
  class: 'vxe-upload--file-item-btn-wrapper'
43625
- }, [cornerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43626
- class: 'vxe-upload--file-item-corner'
43676
+ }, actionSlot ? vn_getSlotVNs(actionSlot({
43677
+ option: item,
43678
+ isMoreView,
43679
+ options: fileList,
43680
+ readonly: formReadonly
43681
+ })) : [cornerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43682
+ class: 'vxe-upload--file-item-action'
43627
43683
  }, vn_getSlotVNs(cornerSlot({
43628
43684
  option: item,
43629
43685
  isMoreView,
43686
+ options: fileList,
43630
43687
  readonly: formReadonly
43631
43688
  }))) : renderEmptyElement($xeUpload), showDownloadButton && !(isLoading || isPending) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43632
43689
  class: 'vxe-upload--file-item-download-btn',
@@ -43654,6 +43711,9 @@ const saveLocalFile = options => {
43654
43711
  showButtonIcon,
43655
43712
  autoHiddenButton
43656
43713
  } = props;
43714
+ const {
43715
+ fileList
43716
+ } = reactData;
43657
43717
  const isDisabled = computeIsDisabled.value;
43658
43718
  const formReadonly = computeFormReadonly.value;
43659
43719
  const showTipText = computedShowTipText.value;
@@ -43670,6 +43730,8 @@ const saveLocalFile = options => {
43670
43730
  class: 'vxe-upload--file-action-btn',
43671
43731
  onClick: clickEvent
43672
43732
  }, defaultSlot ? vn_getSlotVNs(defaultSlot({
43733
+ isMoreView,
43734
+ options: fileList,
43673
43735
  $upload: $xeUpload
43674
43736
  })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43675
43737
  class: 'vxe-upload--file-action-button',
@@ -43679,6 +43741,8 @@ const saveLocalFile = options => {
43679
43741
  })]), showTipText && (defTipText || tipSlot) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43680
43742
  class: 'vxe-upload--file-action-tip'
43681
43743
  }, tipSlot ? vn_getSlotVNs(tipSlot({
43744
+ isMoreView,
43745
+ options: fileList,
43682
43746
  $upload: $xeUpload
43683
43747
  })) : `${defTipText}`) : renderEmptyElement($xeUpload)]);
43684
43748
  };
@@ -43699,6 +43763,7 @@ const saveLocalFile = options => {
43699
43763
  layout
43700
43764
  } = moreOpts;
43701
43765
  const isHorizontal = layout === 'horizontal';
43766
+ const moreBtnSlot = slots.moreButton || slots['more-button'];
43702
43767
  let currList = fileList;
43703
43768
  let overMaxNum = 0;
43704
43769
  if (maxCount && fileList.length > maxCount) {
@@ -43722,7 +43787,9 @@ const saveLocalFile = options => {
43722
43787
  class: 'vxe-upload--file-list'
43723
43788
  }, renderFileItemList(currList, false)) : renderEmptyElement($xeUpload), showMoreButton && overMaxNum ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43724
43789
  class: 'vxe-upload--file-over-more'
43725
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43790
+ }, moreBtnSlot ? vn_getSlotVNs(moreBtnSlot({
43791
+ options: fileList
43792
+ })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43726
43793
  mode: 'text',
43727
43794
  content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
43728
43795
  status: 'primary',
@@ -43741,12 +43808,15 @@ const saveLocalFile = options => {
43741
43808
  showSubmitButton
43742
43809
  } = props;
43743
43810
  const {
43811
+ fileList,
43744
43812
  fileCacheMaps
43745
43813
  } = reactData;
43746
43814
  const isDisabled = computeIsDisabled.value;
43747
43815
  const formReadonly = computeFormReadonly.value;
43748
43816
  const imageOpts = computeImageOpts.value;
43749
43817
  const imgStyle = computeImgStyle.value;
43818
+ const optionSlot = slots.option;
43819
+ const actionSlot = slots.action;
43750
43820
  const cornerSlot = slots.corner;
43751
43821
  const ons = {
43752
43822
  onMousedown: handleItemMousedownEvent
@@ -43779,7 +43849,11 @@ const saveLocalFile = options => {
43779
43849
  fileid: fileKey,
43780
43850
  draggable: dragSort ? true : null,
43781
43851
  ...ons
43782
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43852
+ }, optionSlot ? vn_getSlotVNs(optionSlot({
43853
+ option: item,
43854
+ isMoreView,
43855
+ options: fileList
43856
+ })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43783
43857
  class: 'vxe-upload--image-item-box',
43784
43858
  style: isMoreView ? null : imgStyle,
43785
43859
  onClick(evnt) {
@@ -43818,11 +43892,17 @@ const saveLocalFile = options => {
43818
43892
  onClick(evnt) {
43819
43893
  evnt.stopPropagation();
43820
43894
  }
43821
- }, [cornerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43822
- class: 'vxe-upload--file-item-corner'
43895
+ }, actionSlot ? vn_getSlotVNs(actionSlot({
43896
+ option: item,
43897
+ isMoreView,
43898
+ options: fileList,
43899
+ readonly: formReadonly
43900
+ })) : [cornerSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43901
+ class: 'vxe-upload--file-item-action'
43823
43902
  }, vn_getSlotVNs(cornerSlot({
43824
43903
  option: item,
43825
43904
  isMoreView,
43905
+ options: fileList,
43826
43906
  readonly: formReadonly
43827
43907
  }))) : renderEmptyElement($xeUpload), showRemoveButton && !formReadonly && !isDisabled && !isLoading ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43828
43908
  class: 'vxe-upload--image-item-remove-btn',
@@ -43844,6 +43924,9 @@ const saveLocalFile = options => {
43844
43924
  showButtonIcon,
43845
43925
  autoHiddenButton
43846
43926
  } = props;
43927
+ const {
43928
+ fileList
43929
+ } = reactData;
43847
43930
  const formReadonly = computeFormReadonly.value;
43848
43931
  const showTipText = computedShowTipText.value;
43849
43932
  const defTipText = computedDefTipText.value;
@@ -43861,6 +43944,8 @@ const saveLocalFile = options => {
43861
43944
  class: 'vxe-upload--image-action-btn',
43862
43945
  onClick: clickEvent
43863
43946
  }, defaultSlot ? defaultSlot({
43947
+ isMoreView,
43948
+ options: fileList,
43864
43949
  $upload: $xeUpload
43865
43950
  }) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43866
43951
  class: 'vxe-upload--image-action-box',
@@ -43874,6 +43959,8 @@ const saveLocalFile = options => {
43874
43959
  }, buttonText ? `${external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n('vxe.upload.imgBtnText')) : renderEmptyElement($xeUpload), showTipText && (defTipText || tipSlot) ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43875
43960
  class: 'vxe-upload--image-action-hint'
43876
43961
  }, tipSlot ? vn_getSlotVNs(tipSlot({
43962
+ isMoreView,
43963
+ options: fileList,
43877
43964
  $upload: $xeUpload
43878
43965
  })) : `${defTipText}`) : renderEmptyElement($xeUpload)])])]);
43879
43966
  };
@@ -43887,6 +43974,7 @@ const saveLocalFile = options => {
43887
43974
  isDragMove
43888
43975
  } = reactData;
43889
43976
  const moreOpts = computeMoreOpts.value;
43977
+ const moreBtnSlot = slots.moreButton || slots['more-button'];
43890
43978
  const {
43891
43979
  maxCount,
43892
43980
  showMoreButton
@@ -43908,7 +43996,9 @@ const saveLocalFile = options => {
43908
43996
  default: () => renderImageItemList(currList, false).concat([showMoreButton && overMaxNum ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43909
43997
  key: 'om',
43910
43998
  class: 'vxe-upload--image-over-more'
43911
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43999
+ }, moreBtnSlot ? vn_getSlotVNs(moreBtnSlot({
44000
+ options: fileList
44001
+ })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43912
44002
  mode: 'text',
43913
44003
  content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
43914
44004
  status: 'primary',
@@ -43918,7 +44008,9 @@ const saveLocalFile = options => {
43918
44008
  class: 'vxe-upload--image-list'
43919
44009
  }, renderImageItemList(currList, false).concat([showMoreButton && overMaxNum ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
43920
44010
  class: 'vxe-upload--image-over-more'
43921
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
44011
+ }, moreBtnSlot ? vn_getSlotVNs(moreBtnSlot({
44012
+ options: fileList
44013
+ })) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(src_button, {
43922
44014
  mode: 'text',
43923
44015
  content: getI18n('vxe.upload.moreBtnText', [fileList.length]),
43924
44016
  status: 'primary',