mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-09-09 05:29:06 +00:00
feat(editor): 历史记录差异对比弹窗关闭时派发 close 事件
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
7a161cab00
commit
42162f2e4a
@ -8,6 +8,7 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
append-to-body
|
append-to-body
|
||||||
:width="width"
|
:width="width"
|
||||||
|
@close="onClose"
|
||||||
>
|
>
|
||||||
<div v-if="payload" class="m-editor-history-diff-dialog-body">
|
<div v-if="payload" class="m-editor-history-diff-dialog-body">
|
||||||
<div class="m-editor-history-diff-dialog-header">
|
<div class="m-editor-history-diff-dialog-header">
|
||||||
@ -105,6 +106,8 @@ const props = withDefaults(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits(['close']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 差异对比模式:
|
* 差异对比模式:
|
||||||
* - before:该步骤修改前 vs 该步骤修改后(默认行为,体现这一步带来的变化)
|
* - before:该步骤修改前 vs 该步骤修改后(默认行为,体现这一步带来的变化)
|
||||||
@ -209,6 +212,10 @@ watch(visible, (v) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const onClose = () => {
|
||||||
|
emit('close');
|
||||||
|
};
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
close,
|
close,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user