perf: turn off preview mode when closing attachment detail modal

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/621/head^2
Ryan Wang 2022-09-25 17:05:44 +08:00
parent 831e3fd6ca
commit 3a5db4178a
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");
}
};