vxe-pc-ui 4.15.19 → 4.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.
- package/dist/all.esm.js +32 -15
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +30 -13
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +37 -15
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +35 -13
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/upload/src/upload.ts +30 -13
- package/types/components/table.d.ts +6 -1
- package/types/components/upload.d.ts +17 -0
- /package/es/icon/{iconfont.1782955796278.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/es/icon/{iconfont.1782955796278.woff → iconfont.1782978164206.woff} +0 -0
- /package/es/icon/{iconfont.1782955796278.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/es/{iconfont.1782955796278.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/es/{iconfont.1782955796278.woff → iconfont.1782978164206.woff} +0 -0
- /package/es/{iconfont.1782955796278.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782955796278.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782955796278.woff → iconfont.1782978164206.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782955796278.woff2 → iconfont.1782978164206.woff2} +0 -0
- /package/lib/{iconfont.1782955796278.ttf → iconfont.1782978164206.ttf} +0 -0
- /package/lib/{iconfont.1782955796278.woff → iconfont.1782978164206.woff} +0 -0
- /package/lib/{iconfont.1782955796278.woff2 → iconfont.1782978164206.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.15.
|
|
84
|
+
const uiVersion = `ui v${"4.15.20"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$c = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.15.
|
|
98
|
+
const version = "4.15.20";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -44271,6 +44271,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44271
44271
|
},
|
|
44272
44272
|
emits: [
|
|
44273
44273
|
'update:modelValue',
|
|
44274
|
+
'change',
|
|
44274
44275
|
'add',
|
|
44275
44276
|
'remove',
|
|
44276
44277
|
'remove-fail',
|
|
@@ -44510,11 +44511,11 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44510
44511
|
const emitModel = (value) => {
|
|
44511
44512
|
emit('update:modelValue', value);
|
|
44512
44513
|
};
|
|
44513
|
-
const
|
|
44514
|
+
const handleChangeEvent = (evnt, vals) => {
|
|
44514
44515
|
const { singleMode, urlMode, urlArgs } = props;
|
|
44515
44516
|
const urlProp = computeUrlProp.value;
|
|
44516
44517
|
const nameProp = computeNameProp.value;
|
|
44517
|
-
let restList =
|
|
44518
|
+
let restList = vals ? vals.slice(0) : [];
|
|
44518
44519
|
if (urlMode) {
|
|
44519
44520
|
restList = restList.map(item => {
|
|
44520
44521
|
const url = item[urlProp];
|
|
@@ -44529,7 +44530,10 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44529
44530
|
return url;
|
|
44530
44531
|
});
|
|
44531
44532
|
}
|
|
44532
|
-
|
|
44533
|
+
const value = singleMode ? (restList[0] || null) : restList;
|
|
44534
|
+
emitModel(value);
|
|
44535
|
+
dispatchEvent('change', { value }, evnt);
|
|
44536
|
+
return value;
|
|
44533
44537
|
};
|
|
44534
44538
|
const getThumbnailFileUrl = (item) => {
|
|
44535
44539
|
const getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig$3().upload.getThumbnailUrlMethod;
|
|
@@ -44633,6 +44637,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44633
44637
|
if (cacheItem) {
|
|
44634
44638
|
cacheItem.percent = 100;
|
|
44635
44639
|
cacheItem.status = 'success';
|
|
44640
|
+
cacheItem.response = res;
|
|
44636
44641
|
}
|
|
44637
44642
|
Object.assign(item, res);
|
|
44638
44643
|
dispatchEvent('upload-success', { option: item, data: res }, null);
|
|
@@ -44641,6 +44646,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44641
44646
|
const cacheItem = fileCacheMaps[fileKey];
|
|
44642
44647
|
if (cacheItem) {
|
|
44643
44648
|
cacheItem.status = 'error';
|
|
44649
|
+
cacheItem.response = res;
|
|
44644
44650
|
}
|
|
44645
44651
|
if (showErrorStatus) {
|
|
44646
44652
|
Object.assign(item, res);
|
|
@@ -44668,7 +44674,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44668
44674
|
}
|
|
44669
44675
|
return Promise.resolve();
|
|
44670
44676
|
};
|
|
44671
|
-
const
|
|
44677
|
+
const handleReUploadEvent = (evnt, item) => {
|
|
44672
44678
|
const { uploadMethod, urlMode } = props;
|
|
44673
44679
|
const { fileCacheMaps } = reactData;
|
|
44674
44680
|
const fileKey = getFieldKey(item);
|
|
@@ -44681,7 +44687,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44681
44687
|
cacheItem.percent = 0;
|
|
44682
44688
|
handleUploadResult(item, file).then(() => {
|
|
44683
44689
|
if (urlMode) {
|
|
44684
|
-
|
|
44690
|
+
handleChangeEvent(evnt, reactData.fileList);
|
|
44685
44691
|
}
|
|
44686
44692
|
});
|
|
44687
44693
|
}
|
|
@@ -44784,7 +44790,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44784
44790
|
file: file,
|
|
44785
44791
|
loading: !!autoSubmit,
|
|
44786
44792
|
status: 'pending',
|
|
44787
|
-
percent: 0
|
|
44793
|
+
percent: 0,
|
|
44794
|
+
response: null
|
|
44788
44795
|
};
|
|
44789
44796
|
}
|
|
44790
44797
|
const item = reactive(fileObj);
|
|
@@ -44801,9 +44808,19 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44801
44808
|
dispatchEvent('add', { option: item }, evnt);
|
|
44802
44809
|
});
|
|
44803
44810
|
Promise.all(uploadPromiseRests).then(() => {
|
|
44811
|
+
const { fileCacheMaps } = reactData;
|
|
44804
44812
|
const restFileList = reactData.fileList;
|
|
44805
|
-
|
|
44806
|
-
|
|
44813
|
+
const uploadResults = restFileList.map(option => {
|
|
44814
|
+
const fileKey = getFieldKey(option);
|
|
44815
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
44816
|
+
return {
|
|
44817
|
+
option,
|
|
44818
|
+
status: cacheItem ? cacheItem.status : null,
|
|
44819
|
+
response: cacheItem ? cacheItem.response : null
|
|
44820
|
+
};
|
|
44821
|
+
});
|
|
44822
|
+
const value = handleChangeEvent(evnt, restFileList);
|
|
44823
|
+
dispatchEvent('upload-queue-end', { value, options: restFileList, results: uploadResults, files: selectFiles }, evnt);
|
|
44807
44824
|
// 自动更新校验状态
|
|
44808
44825
|
if ($xeForm && formItemInfo) {
|
|
44809
44826
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, restFileList);
|
|
@@ -44837,7 +44854,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
44837
44854
|
const handleRemoveEvent = (evnt, item, index) => {
|
|
44838
44855
|
const { fileList } = reactData;
|
|
44839
44856
|
fileList.splice(index, 1);
|
|
44840
|
-
|
|
44857
|
+
handleChangeEvent(evnt, fileList);
|
|
44841
44858
|
// 自动更新校验状态
|
|
44842
44859
|
if ($xeForm && formItemInfo) {
|
|
44843
44860
|
$xeForm.triggerItemEvent(evnt || { type: 'remove' }, formItemInfo.itemConfig.field, fileList);
|
|
@@ -45422,8 +45439,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
45422
45439
|
mode: 'text',
|
|
45423
45440
|
status: 'primary',
|
|
45424
45441
|
content: isError ? getI18n$2('vxe.upload.reUpload') : getI18n$2('vxe.upload.manualUpload'),
|
|
45425
|
-
onClick() {
|
|
45426
|
-
|
|
45442
|
+
onClick(evnt) {
|
|
45443
|
+
handleReUploadEvent(evnt, item);
|
|
45427
45444
|
}
|
|
45428
45445
|
})
|
|
45429
45446
|
])
|
|
@@ -45653,8 +45670,8 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
45653
45670
|
mode: 'text',
|
|
45654
45671
|
status: 'primary',
|
|
45655
45672
|
content: isError ? getI18n$2('vxe.upload.reUpload') : getI18n$2('vxe.upload.manualUpload'),
|
|
45656
|
-
onClick() {
|
|
45657
|
-
|
|
45673
|
+
onClick(evnt) {
|
|
45674
|
+
handleReUploadEvent(evnt, item);
|
|
45658
45675
|
}
|
|
45659
45676
|
})
|
|
45660
45677
|
])
|