首页 > 技术文章 > Vue Parent Send Ajax Data to Child Component
mouseleo 2019-07-04 23:44 原文
当父组件 axjos 获取数据,子组件使用 props 接收数据时,执行 mounted 的时候 axjos 还没有返回数据,而且 mounted 只执行一次,这时 props 中接收的数据为空
解决方案:在对应组件中判断数据的长度