diff --git a/magic-boot-ui/src/components/magic/form/mb-upload-file.vue b/magic-boot-ui/src/components/magic/form/mb-upload-file.vue index 306eb2b..63181a1 100644 --- a/magic-boot-ui/src/components/magic/form/mb-upload-file.vue +++ b/magic-boot-ui/src/components/magic/form/mb-upload-file.vue @@ -107,7 +107,7 @@ export default { } }, watch: { - value(newValue) { + modelValue(newValue) { this.renderFile() } }, @@ -130,8 +130,8 @@ export default { this.$refs.uploadRef.handleRemove(file) }, renderFile() { - if (this.value instanceof Array && this.value.length > 0) { - this.fileList = this.value.map(it => { + if (this.modelValue instanceof Array && this.modelValue.length > 0) { + this.fileList = this.modelValue.map(it => { return { name: it.substring(it.lastIndexOf('/') + 1), response: { @@ -142,12 +142,12 @@ export default { } }) } else { - if (this.value) { + if (this.modelValue) { this.fileList.push({ - name: this.value.substring(this.value.lastIndexOf('/') + 1), + name: this.modelValue.substring(this.modelValue.lastIndexOf('/') + 1), response: { data: { - url: this.value + url: this.modelValue } } }) @@ -267,6 +267,8 @@ export default { } - diff --git a/magic-boot-ui/src/scripts/gen/gen-magic-api.js b/magic-boot-ui/src/scripts/gen/gen-magic-api.js deleted file mode 100644 index e8daeb6..0000000 --- a/magic-boot-ui/src/scripts/gen/gen-magic-api.js +++ /dev/null @@ -1,6 +0,0 @@ -function gen(groupPath, data){ - var magic = {} - -} - -export default gen