|
@@ -111,6 +111,13 @@ export default {
|
|
|
onOversize() {
|
|
|
Toast('文件大小不能超过 10MB');
|
|
|
},
|
|
|
+ async toUpload({ file }, model) {
|
|
|
+ // 上传,赋值
|
|
|
+ const res = await this.upload({ file, dir: 'serve' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this.form, model, [{ url: res.uri }]);
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user', 'menuParams']),
|