JavaScript/vue.js/inject
来自康健生活
< JavaScript | vue.js
provide
export default {
name: 'UserPage',
provide () {
return {
/* userInfo: () => this.userInfo,
whetherMyself: () => this.whetherMyself */
userInfo: this.userInfo,
whetherMyself: this.whetherMyself,
myId: this.myId
};
},
inject
inject: ['userInfo', 'whetherMyself'],
No categories