perf: omit config file keys for different connection networks

This commit is contained in:
Lykin 2024-02-18 14:54:46 +08:00
parent 32f1b71073
commit df71ac7049
1 changed files with 10 additions and 0 deletions

View File

@ -164,6 +164,16 @@ const onSaveConnection = async () => {
}
})
// trim addr by network type
if (get(generalForm.value, 'network', 'tcp') === 'unix') {
generalForm.value.network = 'unix'
generalForm.value.addr = ''
generalForm.value.port = 0
} else {
generalForm.value.network = ''
generalForm.value.sock = ''
}
// trim advance data
if (get(generalForm.value, 'dbFilterType', 'none') === 'none') {
generalForm.value.dbFilterList = []