重构代码.

This commit is contained in:
lijiahangmax
2023-09-24 23:28:02 +08:00
parent 6fa57c616c
commit 024a8b4596
21 changed files with 48 additions and 38 deletions

View File

@@ -44,7 +44,9 @@
const cacheStore = useCacheStore();
const record = ref();
const config = ref<Record<string, any>>({});
const config = ref<Record<string, any>>({
SSH: undefined
});
// 打开
const open = async (e: any) => {
@@ -58,6 +60,7 @@
config.value[s.type] = s;
});
} catch ({ message }) {
// FIXME
Message.error(`配置加载失败 ${message}`);
setVisible(false);
} finally {

View File

@@ -54,6 +54,7 @@
label="主机密码"
:rules="passwordRules"
label-col-flex="60px">
<!-- FIXME -->
<a-input-password v-model="formModel.password"
:disabled="!formModel.useNewPassword && formModel.hasPassword"
placeholder="主机密码" />

View File

@@ -74,7 +74,7 @@
:loading="loading"
:columns="columns"
:data="tableRenderData"
:pagination="pagination"
:pagination="pagination as PaginationProps"
@page-change="(page) => fetchTableData(page, pagination.pageSize)"
@page-size-change="(size) => fetchTableData(pagination.current, size)"
:bordered="false">

View File

@@ -30,4 +30,6 @@ export interface HostSshConfig {
charset?: string;
fileNameCharset?: string;
fileContentCharset?: string;
useNewPassword?: boolean;
hasPassword?: boolean;
}