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
This commit is contained in:
onpaper 2023-05-24 08:06:43 +08:00 committed by GitHub
parent 8851532487
commit 9b564c3497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -106,10 +106,7 @@ export const notificationProps = buildProps({
/**
* @description initial zIndex
*/
zIndex: {
type: Number,
default: 0,
},
zIndex: Number,
} as const)
export type NotificationProps = ExtractPropTypes<typeof notificationProps>

View File

@ -84,7 +84,7 @@ const verticalProperty = computed(() =>
const positionStyle = computed<CSSProperties>(() => {
return {
[verticalProperty.value]: `${props.offset}px`,
zIndex: currentZIndex.value,
zIndex: props.zIndex ?? currentZIndex.value,
}
})