composition api 使用自定义指令 参数binding.instance 的实例和 getCurrentInstance 返回的实例不一致 #7350
Unanswered
lxfljw
asked this question in
Help/Questions
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@lxfljw Could you please provide a runnable minimal reproduction? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Vue version
3.2.41
Link to minimal reproduction
https://sfc.vuejs.org/#__DEV__eNp9kMFuwyAMhl/F45JWahJ1u0Vppd32BrtwSRM3oQoGAckOiHefSbdp2qTesP3xYf4oXq2t1gVFI1rfO2UDeAyLPUtS2hoXIILDKyS4OqOhYLSQJAlAUsdXB+WwD2rFXdEtYSoOELVZKODQ7C6KBkXjHk5niL0hb2asZjN+DypFPnTU4z6lvaRMBNB+hFN+cle84TwbeDduHp4KBtr6viHvxkVAbecuIFcA7XSEtcwbnKQ4Pr9IcY5xc6XU1tPxDimyS2BOmwFnBnnO4Garf3TiIO4/L3Vnq5s3xNnE7cdfAy9FA1sn9ziRXEsxhWB9U9f+2udEb74ybqz5VDkORGms0Ovy4syHR8diKQ6/HDU3V3SlQxrQoXvk/IP+82ZtkpRE+gQpXaZO
Steps to reproduce
setup 组件内使用自定义指令即可复现
What is expected?
自定义指令取到的 组件实例是页面实例应该一致
What is actually happening?
新的 setup 组件调用原vue2升级上来的自定义指令,由于自定义指令调用大量的mixin 函数,原来通过 binding.instance 调用,现在Instance 不存在全局的mixin,导致报错
System Info
No response
Any additional comments?
No response
Beta Was this translation helpful? Give feedback.
All reactions