重构代码.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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="主机密码" />
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -30,4 +30,6 @@ export interface HostSshConfig {
|
||||
charset?: string;
|
||||
fileNameCharset?: string;
|
||||
fileContentCharset?: string;
|
||||
useNewPassword?: boolean;
|
||||
hasPassword?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user