eoss-ui 0.4.85 → 0.4.87
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/lib/button-group.js +4 -0
- package/lib/button.js +4 -0
- package/lib/checkbox-group.js +4 -0
- package/lib/data-table-form.js +4 -0
- package/lib/data-table.js +73 -33
- package/lib/date-picker.js +4 -0
- package/lib/dialog.js +4 -0
- package/lib/eoss-ui.common.js +1744 -1582
- package/lib/flow-group.js +4 -0
- package/lib/flow-list.js +4 -0
- package/lib/flow.js +7 -3
- package/lib/form.js +10 -22
- package/lib/handle-user.js +4 -0
- package/lib/handler.js +4 -0
- package/lib/index.js +1 -1
- package/lib/input-number.js +4 -0
- package/lib/input.js +4 -0
- package/lib/login.js +4 -0
- package/lib/main.js +4 -0
- package/lib/nav.js +9 -6
- package/lib/page.js +4 -0
- package/lib/player.js +4 -0
- package/lib/qr-code.js +4 -0
- package/lib/radio-group.js +4 -0
- package/lib/retrial-auth.js +4 -0
- package/lib/select-ganged.js +4 -0
- package/lib/select.js +4 -0
- package/lib/selector-panel.js +4 -0
- package/lib/selector.js +4 -0
- package/lib/sizer.js +4 -0
- package/lib/steps.js +4 -0
- package/lib/switch.js +4 -0
- package/lib/table-form.js +10 -6
- package/lib/tabs.js +1569 -1435
- package/lib/tips.js +4 -0
- package/lib/tree-group.js +4 -0
- package/lib/tree.js +4 -0
- package/lib/upload.js +76 -28
- package/lib/utils/util.js +4 -0
- package/lib/wujie.js +4 -0
- package/lib/wxlogin.js +4 -0
- package/package.json +2 -2
- package/packages/data-table/src/main.vue +74 -40
- package/packages/flow/src/main.vue +1 -1
- package/packages/form/src/main.vue +4 -18
- package/packages/form/src/table.vue +1 -1
- package/packages/nav/src/main.vue +3 -4
- package/packages/tabs/src/main.vue +479 -474
- package/packages/upload/src/main.vue +44 -30
- package/src/index.js +1 -1
- package/src/utils/util.js +4 -0
|
@@ -190,6 +190,7 @@ import {
|
|
|
190
190
|
} from 'eoss-ui/src/config/api.js';
|
|
191
191
|
import util from 'eoss-ui/src/utils/util.js';
|
|
192
192
|
import picture from './picture.js';
|
|
193
|
+
import store from 'eoss-ui/src/utils/store';
|
|
193
194
|
export default {
|
|
194
195
|
name: 'EsUpload',
|
|
195
196
|
components: {
|
|
@@ -479,7 +480,7 @@ export default {
|
|
|
479
480
|
url() {
|
|
480
481
|
let url = this.action
|
|
481
482
|
? this.action
|
|
482
|
-
: this.portrait
|
|
483
|
+
: this.portrait
|
|
483
484
|
? uploadOnlyOne
|
|
484
485
|
: uploads;
|
|
485
486
|
return url.indexOf(this.host) > -1 ? url : this.host + url;
|
|
@@ -694,37 +695,50 @@ export default {
|
|
|
694
695
|
//根据code获取附件参数配置
|
|
695
696
|
getAdjunctPropertie() {
|
|
696
697
|
if (this.code !== undefined) {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
698
|
+
let config = store.get(this.code);
|
|
699
|
+
if (config) {
|
|
700
|
+
this.fileAccept = config.accept;
|
|
701
|
+
this.fileSize = config.size;
|
|
702
|
+
this.fileTotalSize = config.totalSize;
|
|
703
|
+
} else {
|
|
704
|
+
util
|
|
705
|
+
.ajax({
|
|
706
|
+
method: this.method,
|
|
707
|
+
url: this.properties,
|
|
708
|
+
data: { code: this.code, ...this.param },
|
|
709
|
+
params: { code: this.code, ...this.param }
|
|
710
|
+
})
|
|
711
|
+
.then((res) => {
|
|
712
|
+
if (res.rCode === 0) {
|
|
713
|
+
if (res.results) {
|
|
714
|
+
this.excludeNames = res.results.excludeName;
|
|
715
|
+
if (res.results.fileTypeExtName) {
|
|
716
|
+
let fileTypeExtName =
|
|
717
|
+
res.results.fileTypeExtName.split(';');
|
|
718
|
+
this.fileAccept = fileTypeExtName
|
|
719
|
+
.filter((item) => {
|
|
720
|
+
return item;
|
|
721
|
+
})
|
|
722
|
+
.join(',');
|
|
723
|
+
}
|
|
724
|
+
this.fileSize = res.results.limitFileSize
|
|
725
|
+
? res.results.limitFileSize
|
|
726
|
+
: 0;
|
|
727
|
+
this.fileTotalSize = res.results.limitTotalSize;
|
|
728
|
+
store.set(this.code, {
|
|
729
|
+
accept: this.fileAccept,
|
|
730
|
+
size: this.fileSize,
|
|
731
|
+
totalSize: this.fileTotalSize
|
|
732
|
+
});
|
|
715
733
|
}
|
|
716
|
-
this.fileSize = res.results.limitFileSize
|
|
717
|
-
? res.results.limitFileSize
|
|
718
|
-
: 0;
|
|
719
|
-
this.fileTotalSize = res.results.limitTotalSize;
|
|
720
734
|
}
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
}
|
|
727
|
-
|
|
735
|
+
})
|
|
736
|
+
.catch((err) => {
|
|
737
|
+
if (err.message && err.message !== 'canceled') {
|
|
738
|
+
this.$message.error(err.message);
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
728
742
|
}
|
|
729
743
|
},
|
|
730
744
|
getFiles(params) {
|
package/src/index.js
CHANGED
package/src/utils/util.js
CHANGED
|
@@ -396,6 +396,10 @@ const ajax = function ({
|
|
|
396
396
|
if (!header['content-type']) {
|
|
397
397
|
header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
398
398
|
}
|
|
399
|
+
} else {
|
|
400
|
+
if (!header['content-type']) {
|
|
401
|
+
header['content-type'] = 'application/json;charset=UTF-8';
|
|
402
|
+
}
|
|
399
403
|
}
|
|
400
404
|
return http({
|
|
401
405
|
method,
|