摘要: 1、在子组件中直接使用 this.$parent.parentMethod() 子组件: 父组件: 2、在子组件中使用 this.$emit 触发父组件中子组件标签上的自定义事件 子组件: 父组件: 3、在子组件中通过 props 接收父组件中子组件标签上的自定义属性,然后直接调用 子组件: 父组件 阅读全文
posted @ 2020-11-03 17:04 小船二 阅读(536) 评论(0) 推荐(0) 编辑