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 * @description initial zIndex
*/ */
zIndex: { zIndex: Number,
type: Number,
default: 0,
},
} as const) } as const)
export type NotificationProps = ExtractPropTypes<typeof notificationProps> export type NotificationProps = ExtractPropTypes<typeof notificationProps>

View File

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