You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
概述 Summary
如果Plugin方式去调用组件,实际原理是调用vue的createApp创建了一个新的应用并挂载到页面
动机 Motivation
在Plugin方式调用中,因为和页面并不是一个上下文,所以没办法使用主应用上下文中的一些挂载,如i18n,router,vue-query等
解决方案 Solutions
对于Plugin增加统一传入参数:
同时应该增加一个设置全局AppContext的方法
Demo
进展
目前尚无进展。
Beta Was this translation helpful? Give feedback.
All reactions