feat: 允许清除关联关系

This commit is contained in:
pixelmaxQM
2024-11-14 23:16:10 +08:00
parent 51e1c62ee6
commit a9894acd51
3 changed files with 72 additions and 23 deletions
@@ -198,8 +198,10 @@
placeholder="请选择数据源表"
filterable
allow-create
clearable
@focus="getDBTableList"
@change="selectDB"
@clear="clearAccress"
>
<el-option
v-for="item in dbTableList"
@@ -425,13 +427,21 @@
}
}
const dbNameChange = () => {
getDBTableList()
middleDate.value.dataSource.table = ''
const clearAccress = () => {
middleDate.value.dataSource.value = ''
middleDate.value.dataSource.label = ''
}
const clearDataSourceTable = () => {
middleDate.value.dataSource.table = ''
}
const dbNameChange = () => {
getDBTableList()
clearDataSourceTable()
clearAccress()
}
const dbTableList = ref([])
const getDBTableList = async () => {
@@ -445,8 +455,7 @@
value: item.tableName // 这里假设 value 也是 tableName,如果不同请调整
}))
}
middleDate.value.dataSource.value = ''
middleDate.value.dataSource.label = ''
clearAccress()
}
const dbColumnList = ref([])