style: 终端页面样式调整标注释
This commit is contained in:
@@ -27,6 +27,7 @@ type HostStateType = {
|
|||||||
total: number;
|
total: number;
|
||||||
data: Record<string, any>[];
|
data: Record<string, any>[];
|
||||||
};
|
};
|
||||||
|
|
||||||
/**主机对象信息状态 */
|
/**主机对象信息状态 */
|
||||||
const hostState: HostStateType = reactive({
|
const hostState: HostStateType = reactive({
|
||||||
show: false,
|
show: false,
|
||||||
@@ -248,7 +249,8 @@ function fnTabClose(id: string) {
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div style="height: 650px">
|
<div class="pane-box">
|
||||||
|
<!-- 非开始页的ssh主机 -->
|
||||||
<TerminalSSH
|
<TerminalSSH
|
||||||
v-if="pane.id !== '0' && pane.host.hostType === 'ssh'"
|
v-if="pane.id !== '0' && pane.host.hostType === 'ssh'"
|
||||||
:id="pane.id"
|
:id="pane.id"
|
||||||
@@ -258,6 +260,7 @@ function fnTabClose(id: string) {
|
|||||||
>
|
>
|
||||||
</TerminalSSH>
|
</TerminalSSH>
|
||||||
|
|
||||||
|
<!-- 非开始页的telnet主机 -->
|
||||||
<TerminalTelnet
|
<TerminalTelnet
|
||||||
v-if="pane.id !== '0' && pane.host.hostType === 'telnet'"
|
v-if="pane.id !== '0' && pane.host.hostType === 'telnet'"
|
||||||
:id="pane.id"
|
:id="pane.id"
|
||||||
@@ -268,23 +271,35 @@ function fnTabClose(id: string) {
|
|||||||
>
|
>
|
||||||
</TerminalTelnet>
|
</TerminalTelnet>
|
||||||
|
|
||||||
|
<!-- 开始页 -->
|
||||||
<div v-if="pane.id === '0'">
|
<div v-if="pane.id === '0'">
|
||||||
|
<!-- 提示选择主机 -->
|
||||||
|
<a-result
|
||||||
|
:title="t('views.tool.terminal.hostSelectTitle')"
|
||||||
|
v-show="tabState.activeKey === '0' && !hostState.show"
|
||||||
|
>
|
||||||
|
<template #extra>
|
||||||
|
<a-button
|
||||||
|
key="hostState"
|
||||||
|
type="primary"
|
||||||
|
@click="fnSelectHost()"
|
||||||
|
>
|
||||||
|
{{ t('views.tool.terminal.hostSelectShow') }}
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
</a-result>
|
||||||
|
|
||||||
|
<!-- 主机列表 -->
|
||||||
<a-list
|
<a-list
|
||||||
v-show="tabState.activeKey === '0' && hostState.show"
|
v-show="tabState.activeKey === '0' && hostState.show"
|
||||||
:header="t('views.tool.terminal.hostSelectHeader')"
|
:header="t('views.tool.terminal.hostSelectHeader')"
|
||||||
:grid="{ gutter: 16, column: 4 }"
|
:grid="{ gutter: 16, column: 4, lg: 4, md: 2, xs: 1 }"
|
||||||
:data-source="hostState.data"
|
:data-source="hostState.data"
|
||||||
style="height: 650px; overflow-x: hidden"
|
row-key="hostId"
|
||||||
>
|
>
|
||||||
|
<!-- 插槽-加载更多 -->
|
||||||
<template #loadMore>
|
<template #loadMore>
|
||||||
<div
|
<div style="text-align: center">
|
||||||
:style="{
|
|
||||||
textAlign: 'center',
|
|
||||||
marginTop: '12px',
|
|
||||||
height: '32px',
|
|
||||||
lineHeight: '32px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<a-button
|
<a-button
|
||||||
@click="fnGetHostList()"
|
@click="fnGetHostList()"
|
||||||
:loading="hostState.loading"
|
:loading="hostState.loading"
|
||||||
@@ -297,6 +312,7 @@ function fnTabClose(id: string) {
|
|||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 插槽-渲染项 -->
|
||||||
<template #renderItem="{ item }">
|
<template #renderItem="{ item }">
|
||||||
<a-list-item>
|
<a-list-item>
|
||||||
<a-card size="small" :title="item.title">
|
<a-card size="small" :title="item.title">
|
||||||
@@ -316,20 +332,6 @@ function fnTabClose(id: string) {
|
|||||||
</a-list-item>
|
</a-list-item>
|
||||||
</template>
|
</template>
|
||||||
</a-list>
|
</a-list>
|
||||||
<a-result
|
|
||||||
:title="t('views.tool.terminal.hostSelectTitle')"
|
|
||||||
v-show="tabState.activeKey === '0' && !hostState.show"
|
|
||||||
>
|
|
||||||
<template #extra>
|
|
||||||
<a-button
|
|
||||||
key="hostState"
|
|
||||||
type="primary"
|
|
||||||
@click="fnSelectHost()"
|
|
||||||
>
|
|
||||||
{{ t('views.tool.terminal.hostSelectShow') }}
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</a-result>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -344,6 +346,7 @@ function fnTabClose(id: string) {
|
|||||||
<template #icon><PlusOutlined /></template>
|
<template #icon><PlusOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
<!-- 非开始页的更多操作 -->
|
||||||
<div v-show="tabState.activeKey !== '0'">
|
<div v-show="tabState.activeKey !== '0'">
|
||||||
<a-tooltip placement="topRight">
|
<a-tooltip placement="topRight">
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -354,7 +357,7 @@ function fnTabClose(id: string) {
|
|||||||
placement="bottomRight"
|
placement="bottomRight"
|
||||||
>
|
>
|
||||||
<a-button type="ghost" shape="circle">
|
<a-button type="ghost" shape="circle">
|
||||||
<template #icon><DashOutlined /></template>
|
<template #icon><EllipsisOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
<a-menu @click="({ key }:any) => fnTabMenu(key)">
|
<a-menu @click="({ key }:any) => fnTabMenu(key)">
|
||||||
@@ -382,4 +385,10 @@ function fnTabClose(id: string) {
|
|||||||
</PageContainer>
|
</PageContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped></style>
|
<style lang="less" scoped>
|
||||||
|
.pane-box {
|
||||||
|
padding: 16px;
|
||||||
|
height: calc(100vh - 320px);
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user