[fix] 修复吸附组件的背景颜色bug

This commit is contained in:
aisen
2025-03-27 16:01:13 +08:00
parent e87317d52e
commit 5ba0d32004

View File

@@ -12,7 +12,8 @@
top: stickyTop + 'px',
left: left + 'px',
width: width === 'auto' ? 'auto' : width + 'px',
zIndex: elZIndex
zIndex: elZIndex,
backgroundColor: backgroundColorStyle
}"
>
<slot></slot>
@@ -83,9 +84,6 @@
stickyStyle() {
let style = {}
style.height = this.fixed ? this.height + 'px' : 'auto'
if (this.backgroundColorStyle) {
style.color = this.backgroundColorStyle
}
if (this.elZIndex) {
style.zIndex = this.elZIndex
}