diff --git a/src/components/Attachment/AttachmentSelectDrawer.vue b/src/components/Attachment/AttachmentSelectDrawer.vue index 06350bbc..ce115a66 100644 --- a/src/components/Attachment/AttachmentSelectDrawer.vue +++ b/src/components/Attachment/AttachmentSelectDrawer.vue @@ -7,6 +7,7 @@ :visible="visible" destroyOnClose @close="onClose" + :afterVisibleChange="handleAfterVisibleChanged" > @@ -136,13 +138,6 @@ export default { uploadHandler: attachmentApi.upload } }, - watch: { - visible: function(newValue, oldValue) { - if (newValue) { - this.handleListAttachments() - } - } - }, methods: { handleShowUploadModal() { this.uploadVisible = true @@ -182,6 +177,11 @@ export default { this.$refs.upload.handleClearFileList() this.handlePaginationChange(1, this.pagination.size) }, + handleAfterVisibleChanged(visible) { + if (visible) { + this.handleListAttachments() + } + }, handleJudgeMediaType(attachment) { var mediaType = attachment.mediaType // 判断文件类型 diff --git a/src/components/GlobalHeader/GlobalHeader.vue b/src/components/GlobalHeader/GlobalHeader.vue index 9a607ae1..3a07d4b2 100644 --- a/src/components/GlobalHeader/GlobalHeader.vue +++ b/src/components/GlobalHeader/GlobalHeader.vue @@ -7,7 +7,7 @@
{ - this.loadOptions() + this.refreshOptionsCache() this.$message.success(`开发者选项已启用!`) this.clickCount = 0 this.$router.push({ name: 'ToolList' }) diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 8ce1b8ff..b7cb6798 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -156,15 +156,6 @@ export default {