mirror of https://github.com/halo-dev/halo
fix: attachment policy editing modal crashes when opened (#3663)
#### 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 端附件存储策略编辑表单无法正常渲染的问题 ```pull/3668/head
parent
d8e8139260
commit
f8e405c8ed
|
@ -207,32 +207,34 @@ const onVisibleChange = (visible: boolean) => {
|
||||||
:width="600"
|
:width="600"
|
||||||
@update:visible="onVisibleChange"
|
@update:visible="onVisibleChange"
|
||||||
>
|
>
|
||||||
<FormKit
|
<div>
|
||||||
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"
|
|
||||||
>
|
|
||||||
<FormKit
|
<FormKit
|
||||||
id="displayNameInput"
|
v-if="formSchema && configMapFormData"
|
||||||
v-model="formState.spec.displayName"
|
id="attachment-policy-form"
|
||||||
:label="
|
v-model="configMapFormData['default']"
|
||||||
$t('core.attachment.policy_editing_modal.fields.display_name.label')
|
name="attachment-policy-form"
|
||||||
"
|
:actions="false"
|
||||||
type="text"
|
:preserve="true"
|
||||||
name="displayName"
|
type="form"
|
||||||
validation="required|length:0,50"
|
:config="{ validationVisibility: 'submit' }"
|
||||||
></FormKit>
|
@submit="handleSave"
|
||||||
<FormKitSchema
|
>
|
||||||
:schema="formSchema"
|
<FormKit
|
||||||
:data="configMapFormData['default']"
|
id="displayNameInput"
|
||||||
/>
|
v-model="formState.spec.displayName"
|
||||||
</FormKit>
|
:label="
|
||||||
|
$t('core.attachment.policy_editing_modal.fields.display_name.label')
|
||||||
|
"
|
||||||
|
type="text"
|
||||||
|
name="displayName"
|
||||||
|
validation="required|length:0,50"
|
||||||
|
></FormKit>
|
||||||
|
<FormKitSchema
|
||||||
|
:schema="formSchema"
|
||||||
|
:data="configMapFormData['default']"
|
||||||
|
/>
|
||||||
|
</FormKit>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<VSpace>
|
<VSpace>
|
||||||
|
|
Loading…
Reference in New Issue