vue组件之间props,$refs,$emit传值小结

vue组件之间props,$refs,$emit传值小结 参考文章https://www.jb51.net/article/140581.htm 注意: 1、一般之间刷新子组件获取父组件的值,直接使用props传值就能拿到,$refs可能拿不到值,报错,尝试使用this.$nextTick((){this.$refs.XXX.refreshData()}); 2、有点击事件常用$refs传值,th
相关文章
相关标签/搜索