mirror of https://github.com/halo-dev/halo
perf: close attachment upload modal after click complete button (#3784)
#### What type of PR is this? /kind improvement /area console /milestone 2.5.x #### What this PR does / why we need it: 支持在附件上传弹框中点击完成按钮关闭弹框。 <img width="647" alt="image" src="https://user-images.githubusercontent.com/21301288/232964793-d4e94e7a-fc81-4d1b-b0fc-b93d8f5bc537.png"> #### Special notes for your reviewer: 测试方式: 1. 测试上传完附件之后,点击完成按钮,观察是否关闭上传弹框即可。 #### Does this PR introduce a user-facing change? ```release-note 优化 Console 端上传附件的弹框,支持点击完成按钮以关闭弹框。 ```pull/3819/head
parent
f076fc5740
commit
50832a09df
|
@ -24,6 +24,7 @@ const props = withDefaults(
|
||||||
note?: string;
|
note?: string;
|
||||||
method?: "GET" | "POST" | "PUT" | "HEAD" | "get" | "post" | "put" | "head";
|
method?: "GET" | "POST" | "PUT" | "HEAD" | "get" | "post" | "put" | "head";
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
doneButtonHandler?: () => void;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
restrictions: undefined,
|
restrictions: undefined,
|
||||||
|
@ -34,6 +35,7 @@ const props = withDefaults(
|
||||||
note: undefined,
|
note: undefined,
|
||||||
method: "post",
|
method: "post",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
doneButtonHandler: undefined,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -96,6 +98,11 @@ onUnmounted(() => {
|
||||||
<template>
|
<template>
|
||||||
<dashboard
|
<dashboard
|
||||||
:uppy="uppy"
|
:uppy="uppy"
|
||||||
:props="{ theme: 'light', disabled: disabled, note: note }"
|
:props="{
|
||||||
|
theme: 'light',
|
||||||
|
disabled: disabled,
|
||||||
|
note: note,
|
||||||
|
doneButtonHandler: doneButtonHandler,
|
||||||
|
}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -226,6 +226,7 @@ watch(
|
||||||
? ''
|
? ''
|
||||||
: $t('core.attachment.upload_modal.filters.policy.not_select')
|
: $t('core.attachment.upload_modal.filters.policy.not_select')
|
||||||
"
|
"
|
||||||
|
:done-button-handler="() => onVisibleChange(false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</VModal>
|
</VModal>
|
||||||
|
|
Loading…
Reference in New Issue