mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
Update bar.vue
This commit is contained in:
parent
721a3d2743
commit
4202e176c6
@ -52,7 +52,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const clickTrackHandler = (e: MouseEvent) => {
|
||||
const offset = Math.abs(e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client])
|
||||
const offset = Math.abs((e.target as HTMLElement).getBoundingClientRect()[bar.value.direction] - e[bar.value.client])
|
||||
const thumbHalf = (thumb.value[bar.value.offset] / 2)
|
||||
const thumbPositionPercentage = ((offset - thumbHalf) * 100 / instance.value[bar.value.offset])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user