vue子组件给父组件传值 上传者:心梦无痕48361 2021-01-17 02:37:12上传 PDF文件 23.18KB 热度 66次 子组件写法 this.$emit(‘fa’, this.num) 父组件写法 {{sonNum}} // 注册全局对象,要写在vue实例的上面 Vue.component('button-add', { data: function () { return { num: 0 } }, template: `{{num}}`, methods: { add: function () { 下载地址 用户评论 更多下载 下载地址 立即下载 用户评论 发表评论