Merge branch 'main' into dev2.7.7

# Conflicts:
#	web/src/pathInfo.json
#	web/vitePlugin/componentName/index.js
This commit is contained in:
pixel(奇淼
2024-10-26 12:30:41 +08:00
4 changed files with 53 additions and 27 deletions
@@ -31,15 +31,14 @@ const emits = defineEmits(['change'])
const pathOptions = ref([])
const tempPath = ref('')
const activeComponent = ref('')
const activeComponent = ref([])
const pathIsSelect = ref(true)
const togglePathIsSelect = () => {
if(pathIsSelect.value){
tempPath.value = activeComponent.value?.join('/')
tempPath.value = activeComponent.value?.join('/') || ''
}else{
activeComponent.value = tempPath.value.split('/')
console.log(activeComponent.value)
activeComponent.value = tempPath.value?.split('/') || []
}
pathIsSelect.value = !pathIsSelect.value
@@ -456,7 +456,7 @@ const getDBTableList = async () => {
}
const dbColumnList = ref([])
const selectDB = async (val) => {
const selectDB = async (val,isInit) => {
middleDate.value.dataSource.table = val
const res = await getColumn({
businessDB: middleDate.value.dataSource.dbName,
@@ -472,7 +472,7 @@ const selectDB = async (val) => {
isPrimary: item.primaryKey,
comment: item.columnComment
}));
if (dbColumnList.value.length > 0) {
if (dbColumnList.value.length > 0 && !isInit) {
middleDate.value.dataSource.label = dbColumnList.value[0].columnName
middleDate.value.dataSource.value = dbColumnList.value[0].columnName
}
@@ -486,7 +486,7 @@ defineExpose({ fieldDialogForm })
onMounted(()=>{
getDbFunc()
if(middleDate.value.dataSource.table){
selectDB(middleDate.value.dataSource.table)
selectDB(middleDate.value.dataSource.table,true)
}
})
</script>