TASK: #111576 解除初始height覆盖的问题
This commit is contained in:
parent
f99cc08d19
commit
500951aa8e
|
@ -158,8 +158,8 @@ export class StarSlider extends LitElement {
|
|||
}
|
||||
} else {
|
||||
this.style.setProperty('--dot-move', this.barX + 'px')
|
||||
this.progress.style.setProperty(
|
||||
'width',
|
||||
this.style.setProperty(
|
||||
'--cover-width',
|
||||
(this.barWidth * Math.ceil(this.proportion)) / 100 + 'px'
|
||||
)
|
||||
}
|
||||
|
@ -191,8 +191,8 @@ export class StarSlider extends LitElement {
|
|||
this.endValue = Math.ceil(this.proportion) + ''
|
||||
if (!this.tick) {
|
||||
this.style.setProperty('--dot-move', this.newX + 'px')
|
||||
this.progress.style.setProperty(
|
||||
'width',
|
||||
this.style.setProperty(
|
||||
'--cover-width',
|
||||
(this.barWidth * Math.ceil(this.proportion)) / 100 + 'px'
|
||||
)
|
||||
} else {
|
||||
|
@ -238,7 +238,7 @@ export class StarSlider extends LitElement {
|
|||
//点击跳转
|
||||
this.proportion = (this.dotL / this.barWidth) * 100
|
||||
this.endValue = Math.ceil(this.proportion) + ''
|
||||
this.vProgress.style.setProperty(
|
||||
this.style.setProperty(
|
||||
'--cover-width',
|
||||
(this.barWidth * Math.ceil(this.proportion)) / 100 + 'px'
|
||||
)
|
||||
|
@ -264,7 +264,7 @@ export class StarSlider extends LitElement {
|
|||
this.proportion = (this.newY / this.barWidth) * 100
|
||||
//取整
|
||||
this.endValue = Math.ceil(this.proportion) + ''
|
||||
this.vProgress.style.setProperty('--cover-width', this.newY + 'px')
|
||||
this.style.setProperty('--cover-width', this.newY + 'px')
|
||||
}
|
||||
}
|
||||
private touchEndVertical(_: TouchEvent): string | void {
|
||||
|
|
Loading…
Reference in New Issue