diff --git a/src/views/attachment/components/AttachmentDetailModal.vue b/src/components/Attachment/AttachmentDetailModal.vue similarity index 91% rename from src/views/attachment/components/AttachmentDetailModal.vue rename to src/components/Attachment/AttachmentDetailModal.vue index 891ea522b..e81049dc4 100644 --- a/src/views/attachment/components/AttachmentDetailModal.vue +++ b/src/components/Attachment/AttachmentDetailModal.vue @@ -108,52 +108,14 @@ diff --git a/src/components/Attachment/AttachmentSelectModal.vue b/src/components/Attachment/AttachmentSelectModal.vue new file mode 100644 index 000000000..6b634843c --- /dev/null +++ b/src/components/Attachment/AttachmentSelectModal.vue @@ -0,0 +1,461 @@ + + + + + + + + + + + + + + + {{ item | typeText }} + + + + + + + + + {{ item }} + + + + + + + + 查询 + 重置 + + + + + + + + + 上传 + + + + + + + + + {{ item.suffix }} + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + + + + {{ item }} + + + + + 未选择附件 + + + + 已选择 {{ list.selected.length }} 项 + + + + + + + + + + + 取消 + 确定 + + + + + + + 上一项 + 下一项 + + {{ list.selected.findIndex(item => item.id === list.current.id) > -1 ? '取消选择' : '选择' }} + + + + + + diff --git a/src/components/Input/AttachmentInput.vue b/src/components/Input/AttachmentInput.vue index 61fb60462..81e04b236 100644 --- a/src/components/Input/AttachmentInput.vue +++ b/src/components/Input/AttachmentInput.vue @@ -1,11 +1,15 @@ - + - + diff --git a/src/views/interface/components/ThemeSettingDrawer.vue b/src/views/interface/components/ThemeSettingDrawer.vue index d26f428f7..ff5bdf743 100644 --- a/src/views/interface/components/ThemeSettingDrawer.vue +++ b/src/views/interface/components/ThemeSettingDrawer.vue @@ -122,10 +122,10 @@ - @@ -167,7 +167,7 @@ export default { }, data() { return { - attachmentDrawerVisible: false, + attachmentSelectVisible: false, themeConfigurations: [], themeSettings: [], settingLoading: true, @@ -251,12 +251,14 @@ export default { }, handleShowSelectAttachment(field) { this.selectedField = field - this.attachmentDrawerVisible = true + this.attachmentSelectVisible = true }, - handleSelectAttachment(data) { - this.$set(this.themeSettings, this.selectedField, encodeURI(data.path)) + handleSelectAttachment({ raw }) { + if (raw.length) { + this.$set(this.themeSettings, this.selectedField, encodeURI(raw[0].path)) + } // this.themeSettings[this.selectedField] = encodeURI(data.path) - this.attachmentDrawerVisible = false + this.attachmentSelectVisible = false }, handleAfterVisibleChanged(visible) { if (visible) { diff --git a/src/views/post/PostEdit.vue b/src/views/post/PostEdit.vue index e76c06668..bc57d424e 100644 --- a/src/views/post/PostEdit.vue +++ b/src/views/post/PostEdit.vue @@ -14,7 +14,7 @@ > 预览 发布 - 附件库 + 附件库 @@ -39,31 +39,31 @@ @onUpdate="onUpdateFromSetting" /> - +