perf: trim spaces of connection address(#281)

This commit is contained in:
Lykin 2024-06-11 11:47:52 +08:00
parent 88e2c6cb43
commit bf71c6db0e
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<script setup>
import { every, get, includes, isEmpty, map, reject, sortBy, toNumber } from 'lodash'
import { every, get, includes, isEmpty, map, reject, sortBy, toNumber, trim } from 'lodash'
import { computed, nextTick, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { ListSentinelMasters, TestConnection } from 'wailsjs/go/services/connectionService.js'
@ -169,9 +169,11 @@ const onSaveConnection = async () => {
generalForm.value.network = 'unix'
generalForm.value.addr = ''
generalForm.value.port = 0
generalForm.value.sock = trim(generalForm.value.sock)
} else {
generalForm.value.network = 'tcp'
generalForm.value.sock = ''
generalForm.value.addr = trim(generalForm.value.addr)
}
// trim advance data