2021-12-07 vue3 component.ctx

2021-12-07  本文已影响0人  罗不错

通过ref获取到component.ctx ,实际上等价于getCurrentInstanc().ctx
在生产环境都会被干掉, 应该用component.proxy,或getCurrentInstanc().proxy

上一篇 下一篇

猜你喜欢

热点阅读