feat(editor): 历史记录差异对比弹窗关闭时派发 close 事件

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
roymondchen 2026-06-02 19:56:34 +08:00
parent 7a161cab00
commit 42162f2e4a

View File

@ -8,6 +8,7 @@
destroy-on-close
append-to-body
:width="width"
@close="onClose"
>
<div v-if="payload" class="m-editor-history-diff-dialog-body">
<div class="m-editor-history-diff-dialog-header">
@ -105,6 +106,8 @@ const props = withDefaults(
},
);
const emit = defineEmits(['close']);
/**
* 差异对比模式
* - before该步骤修改前 vs 该步骤修改后默认行为体现这一步带来的变化
@ -209,6 +212,10 @@ watch(visible, (v) => {
}
});
const onClose = () => {
emit('close');
};
defineExpose({
open,
close,