export default { name: 'Test', props: { a1: { // 异步数据 type: Array, default: () => [] }, a2: { // 异步数据 type: Array, default: () => [] } }, data() { return { a3: [] } }, watch: { a1: { deep: true, handler(newValue, oldValue) { if (newValue!==oldValue) { this.initA3() } } }, a2: { deep: true, handler(newValue, oldValue) { if (newValue!==oldValue) { this.initA3() } } } }, mounted() { // watch里 不建议使用immediate: true this.$nextTick(() => { this.initA3() }) }, methods: { initA3() { if (this.a1 && this.a2) { // 对 a1、a2 进行运算后得到 a3,这里都是简化场景 a3 = a1 + a2 } else { console.log('看那个没有获取到') } } } }