feat: ReDialog组件添加全屏回调事件

This commit is contained in:
xiaoxian521
2024-03-18 12:42:05 +08:00
parent d0d77bef21
commit dbfd014209
3 changed files with 33 additions and 7 deletions

View File

@@ -64,9 +64,10 @@ const fullscreenClass = computed(() => {
function eventsCallBack(
event: EventType,
options: DialogOptions,
index: number
index: number,
isClickFullScreen = false
) {
fullscreen.value = options?.fullscreen ?? false;
if (!isClickFullScreen) fullscreen.value = options?.fullscreen ?? false;
if (options?.[event] && isFunction(options?.[event])) {
return options?.[event]({ options, index });
}
@@ -108,7 +109,17 @@ function handleClose(
<i
v-if="!options?.fullscreen"
:class="fullscreenClass"
@click="fullscreen = !fullscreen"
@click="
() => {
fullscreen = !fullscreen;
eventsCallBack(
'fullscreenCallBack',
{ ...options, fullscreen },
index,
true
);
}
"
>
<IconifyIconOffline
class="pure-dialog-svg"