🐛 修复终端配置自动连接
This commit is contained in:
parent
69dd8dcdeb
commit
b1532ca9da
@ -431,7 +431,7 @@ const handleSave = () => {
|
||||
}
|
||||
}
|
||||
visible.value = false
|
||||
emit('update-list')
|
||||
emit('update-list', { host: isBatchModify.value ? batchHosts.value : hostForm.value.host })
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
@ -188,13 +188,11 @@ onBeforeUnmount(() => {
|
||||
window.removeEventListener('resize', handleResizeTerminalSftp)
|
||||
})
|
||||
|
||||
const handleUpdateList = async ({ isConfig, host }) => {
|
||||
const handleUpdateList = async ({ host }) => {
|
||||
try {
|
||||
await $store.getHostList()
|
||||
if (isConfig) {
|
||||
let targetHost = hostList.value.find(item => item.host === host)
|
||||
if (targetHost !== -1) emit('add-host', targetHost)
|
||||
}
|
||||
let targetHost = hostList.value.find(item => item.host === host)
|
||||
if (targetHost) emit('add-host', targetHost)
|
||||
} catch (err) {
|
||||
$message.error('获取实例列表失败')
|
||||
console.error('获取实例列表失败: ', err)
|
||||
|
@ -60,8 +60,6 @@ import { randomStr } from '@utils/index.js'
|
||||
|
||||
const { proxy: { $store, $message } } = getCurrentInstance()
|
||||
|
||||
// const emit = defineEmits(['add-host',])
|
||||
|
||||
let terminalTabs = reactive([])
|
||||
let hostFormVisible = ref(false)
|
||||
let updateHostData = ref(null)
|
||||
@ -88,13 +86,11 @@ function handleRemoveTab(index) {
|
||||
terminalTabs.splice(index, 1)
|
||||
}
|
||||
|
||||
const handleUpdateList = async ({ isConfig, host }) => {
|
||||
const handleUpdateList = async ({ host }) => {
|
||||
try {
|
||||
await $store.getHostList()
|
||||
if (isConfig) {
|
||||
let targetHost = hostList.value.find(item => item.host === host)
|
||||
if (targetHost !== -1) linkTerminal(targetHost)
|
||||
}
|
||||
let targetHost = hostList.value.find(item => item.host === host)
|
||||
if (targetHost) linkTerminal(targetHost)
|
||||
} catch (err) {
|
||||
$message.error('获取实例列表失败')
|
||||
console.error('获取实例列表失败: ', err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user