fix(slider): potential drag event handler leak

This commit is contained in:
07akioni 2022-06-05 17:07:01 +08:00
parent 8f1a449ab9
commit 3982ac26ed

View File

@ -9,7 +9,8 @@ import {
Transition,
PropType,
CSSProperties,
ComponentPublicInstance
ComponentPublicInstance,
onBeforeUnmount
} from 'vue'
import {
VBinder,
@ -527,6 +528,9 @@ export default defineComponent({
}
void nextTick(syncPosition)
})
onBeforeUnmount(() => {
stopDragging()
})
const cssVarsRef = computed(() => {
const {
self: {