From 9b564c34970202aa0e187f01679e5a677cf9f21d Mon Sep 17 00:00:00 2001 From: onpaper <31533594+Ganlvin@users.noreply.github.com> Date: Wed, 24 May 2023 08:06:43 +0800 Subject: [PATCH] fix(components): [notification] fix props.zIndex lose efficacy bug (#12474) * fix(components): [notification] fix props.zIndex lose efficacy bug * fix(components): [notification] fix props.zIndex lose efficacy bug * fix(components): [notification] fix props.zIndex lose efficacy bug * fix(components): [notification] fix props.zIndex lose efficacy bug --- packages/components/notification/src/notification.ts | 5 +---- packages/components/notification/src/notification.vue | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/components/notification/src/notification.ts b/packages/components/notification/src/notification.ts index 2e0e00dd41..ef448d9cd5 100644 --- a/packages/components/notification/src/notification.ts +++ b/packages/components/notification/src/notification.ts @@ -106,10 +106,7 @@ export const notificationProps = buildProps({ /** * @description initial zIndex */ - zIndex: { - type: Number, - default: 0, - }, + zIndex: Number, } as const) export type NotificationProps = ExtractPropTypes diff --git a/packages/components/notification/src/notification.vue b/packages/components/notification/src/notification.vue index 4cc055833e..646a50126a 100644 --- a/packages/components/notification/src/notification.vue +++ b/packages/components/notification/src/notification.vue @@ -84,7 +84,7 @@ const verticalProperty = computed(() => const positionStyle = computed(() => { return { [verticalProperty.value]: `${props.offset}px`, - zIndex: currentZIndex.value, + zIndex: props.zIndex ?? currentZIndex.value, } })