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