diff --git a/magic-boot-ui/src/components/magic/data/mb-table-column.vue b/magic-boot-ui/src/components/magic/data/mb-table-column.vue index 07ec02c..a0cc3f0 100644 --- a/magic-boot-ui/src/components/magic/data/mb-table-column.vue +++ b/magic-boot-ui/src/components/magic/data/mb-table-column.vue @@ -19,8 +19,8 @@ @@ -40,6 +40,7 @@ 下载 diff --git a/magic-boot-ui/src/components/magic/form/mb-select.vue b/magic-boot-ui/src/components/magic/form/mb-select.vue index 0d3973c..93d8d40 100644 --- a/magic-boot-ui/src/components/magic/form/mb-select.vue +++ b/magic-boot-ui/src/components/magic/form/mb-select.vue @@ -108,7 +108,7 @@ function setValue(value){ if(props.multiple && props.join){ selectValue.value = value ? value.split(',') : [] }else{ - selectValue.value = value ? value.toString() : '' + selectValue.value = value || value === 0 ? value.toString() : '' } } diff --git a/magic-boot-ui/src/components/magic/form/mb-switch.vue b/magic-boot-ui/src/components/magic/form/mb-switch.vue index 4bf79c6..df1a7ab 100644 --- a/magic-boot-ui/src/components/magic/form/mb-switch.vue +++ b/magic-boot-ui/src/components/magic/form/mb-switch.vue @@ -1,31 +1,37 @@ diff --git a/magic-boot-ui/src/components/magic/form/mb-upload-image.vue b/magic-boot-ui/src/components/magic/form/mb-upload-image.vue index 3c74580..3c94f16 100644 --- a/magic-boot-ui/src/components/magic/form/mb-upload-image.vue +++ b/magic-boot-ui/src/components/magic/form/mb-upload-image.vue @@ -43,9 +43,12 @@ :show-file-list="false" :multiple="multiple" :limit="limit" - :on-success="handleAvatarSuccess" + :on-success="onSuccess" + :on-error="onError" + :before-upload="beforeUpload" :on-exceed="onExceed" :file-list="fileList" + :disabled="isUploading" > @@ -238,7 +241,13 @@ export default { handleDownload(file) { console.log(file) }, - handleAvatarSuccess(res, file, fileList) { + beforeUpload(){ + this.isUploading = true + }, + onError(){ + this.isUploading = true + }, + onSuccess(res, file, fileList) { console.log(res) this.fileList = fileList if (res.data) {