Skip to content
LBJhui-blog
Main Navigation
首页
前端基础
HTML
CSS
JavaScript
Git
微信小程序
前端进阶
Vue
前端工程化
浏览器和网络
妙码
微信环境
业务场景
面试
Leetcode算法
研究生
数学
408
更多
python
其他
Appearance
Menu
Return to top
On this page
组件通信
父子组件通信 父->子 props,子->父
、
o
n
、
emit 获取父子组件实例
、
p
a
r
e
n
t
、
children Ref 获取实例的方式调用组件的属性或者方法 Provide、inject 官方不推荐使用,但是写组件库时很常用
兄弟组件通信 Event Bus 实现跨组件通信 Vue.prototype.$bus = new Vue Vuex
跨级组件通信 Vuex
、
a
t
t
r
s
、
listeners Provide、inject