父组件模板:<template><div> <u-newtoast ref="cdnmonitor" :content="content"></u-newtoast></div></template>在父组件中,请求成功后的操作是 self.content = error.message; self.$refs.cdnmonitor.show();发现在执行子组件$refs.cdnmonitor.show方法的时候,子组件的content的属性依然是初始化的默认值,导致子组件显示的内容不对,在执行完show方法之后,子组件才会更新content的值,这个机制是vue自带的机制吗,有什么可以解决的方案吗?
添加回答
举报
0/150
提交
取消