解决初始化下拉选项的问题

This commit is contained in:
aixianling
2024-10-23 10:53:15 +08:00
parent 398b3e799c
commit af296ebf51
2 changed files with 18 additions and 18 deletions

View File

@@ -71,15 +71,12 @@ export default {
},
watch: {
search: {
deep: true, handler() {
this.getTableData()
immediate: true, deep: true, handler() {
this.getTableData().then(() => {
if (this.options.length == 0) this.options = this.getOptions()
})
}
}
},
created() {
this.getTableData().then(() => {
this.options = this.getOptions()
})
}
}
</script>