点击关闭

This commit is contained in:
lq
2025-09-24 17:27:57 +08:00
parent 6aa532bebe
commit cc35c1020f
3 changed files with 5 additions and 18 deletions

View File

@ -6,7 +6,7 @@
placement="right"
:visible="visible"
@after-visible-change="onAfterVisibleChange"
@close="handleClose"
@cancel="handleCancel"
width="904px"
class="task-drawer"
style="right: 481px"
@ -150,7 +150,6 @@ const getOrigin = (origin: number): string => {
// 定义Emits类型
const emit = defineEmits<{
(e: 'update:visible', value: boolean): void;
(e: 'after-visible-change', visible: boolean): void;
(
e: 'confirm',
data: {
@ -262,15 +261,9 @@ const onAfterVisibleChange = (visible: boolean) => {
}
};
// 抽屉关闭事件处理
const handleClose = () => {
emit('update:visible', false);
emit('cancel');
};
// 取消按钮处理
const handleCancel = () => {
emit('update:visible', false);
console.log('取消');
emit('cancel');
};