watch( //监听props里面的某个对象users,这里是 () =>{return props.users}的简写, () => props.users, (newValue, oldValue) => { if (newValue.length > 0) { //得到新值后再进行下一步操作 isShow.value = true; accountId.value = newValue[0].id; $emit("tabclick", props.users[0]); } } );