想实现下例效果,要如何销毁创建的 y 值
const x = shared(0)
const y = shared(0)
this.applyAnimatedStyle('.ele', ()=>{
"worklet"
let returnObj = {}
if (x && y) {
returnObj = {
translateX: `${x.value}px`,
translateY: `${y.value}px`
}
}
if (x && !y) {
returnObj = {
translateX: `${x.value}px`
}
}
return returnObj
})
const left = ()=>{
x.value = 50
y.value = 100
}