From f8e405c8ed6aa284b2a8e394fbee16420ed41fe2 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 3 Apr 2023 11:02:12 +0800 Subject: [PATCH] fix: attachment policy editing modal crashes when opened (#3663) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind bug /area console /milestone 2.5.x #### What this PR does / why we need it: 修复附件存储策略编辑表单无法正常渲染的问题。此问题原因为 Modal 组件使用了 OverlayScrollbars 库来模拟滚动条,但在初始化的时候由于 Body 没有任何子元素,所以导致异常。 #### Which issue(s) this PR fixes: Fixes #3662 #### Special notes for your reviewer: 测试是否能够正常打开附件存储策略编辑表单即可。 #### Does this PR introduce a user-facing change? ```release-note 修复 Console 端附件存储策略编辑表单无法正常渲染的问题 ``` --- .../AttachmentPolicyEditingModal.vue | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/console/src/modules/contents/attachments/components/AttachmentPolicyEditingModal.vue b/console/src/modules/contents/attachments/components/AttachmentPolicyEditingModal.vue index cad6647fc..891390ba5 100644 --- a/console/src/modules/contents/attachments/components/AttachmentPolicyEditingModal.vue +++ b/console/src/modules/contents/attachments/components/AttachmentPolicyEditingModal.vue @@ -207,32 +207,34 @@ const onVisibleChange = (visible: boolean) => { :width="600" @update:visible="onVisibleChange" > - +
- - + v-if="formSchema && configMapFormData" + id="attachment-policy-form" + v-model="configMapFormData['default']" + name="attachment-policy-form" + :actions="false" + :preserve="true" + type="form" + :config="{ validationVisibility: 'submit' }" + @submit="handleSave" + > + + + +