perf: turn off preview mode when closing attachment detail modal

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/3445/head
Ryan Wang 2022-09-25 17:05:44 +08:00
parent 9c418f8532
commit c3452a1cd0
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,8 @@ const getGroupName = (name: string | undefined) => {
const onVisibleChange = (visible: boolean) => {
emit("update:visible", visible);
if (!visible) {
policy.value = undefined;
onlyPreview.value = false;
emit("close");
}
};