Did vue watch execute before created? What are we going to do?

watch: {

activeTab: {
  handler: function (val, oldVal) {
    if (val === "1") {
      this._getPayBillHouseList()
    } else {
      this._getAppReceiveBillList()
    }
  },
  immediate: true
}

}
created () {

this.hourseId = this.$route.params.id

},
methods: {

async _getPayBillHouseList () {
  let result = await getPayBillHouseList(this.hourseId)
  this.payArr = result.rData
},
async _getAppReceiveBillList () {
  let result = await getAppReceiveBillList(this.hourseId)
  this.overPayArr = result.rData
}

},

Nov.19,2021

perform watch

in created .
this.$watch('activeTab', (val, oldVal) => {
    if (val === '1') {
      this._getPayBillHouseList()
    } else {
      this._getAppReceiveBillList()
    }
  })
The immediate in

watch will let the listener perform the listening calculation when the initial value is declared. If you do not configure the immediate attribute, you can

Menu