点击关闭
This commit is contained in:
@ -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');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user