💄 修改滚动条样式.
This commit is contained in:
@@ -18,9 +18,10 @@
|
||||
<a-empty description="无执行记录" />
|
||||
</div>
|
||||
<!-- 批量执行日志 -->
|
||||
<div v-else class="exec-history-rows">
|
||||
<div v-for="record in historyLogs"
|
||||
<a-scrollbar v-else>
|
||||
<div v-for="(record, index) in historyLogs"
|
||||
:key="record.id"
|
||||
:style="{ marginBottom: index === historyLogs.length -1 ? 0 : '8px' }"
|
||||
class="exec-history"
|
||||
@click="emits('selected', record)">
|
||||
<!-- 机器数量 -->
|
||||
@@ -32,7 +33,7 @@
|
||||
{{ record.description }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</a-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -110,14 +111,16 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.exec-history-rows {
|
||||
position: absolute;
|
||||
width: calc(100% - 32px);
|
||||
height: calc(100% - 64px);
|
||||
overflow: auto;
|
||||
.container {
|
||||
:deep(.arco-scrollbar) {
|
||||
position: absolute;
|
||||
width: calc(100% - 32px);
|
||||
height: calc(100% - 64px);
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
display: none;
|
||||
&-container {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +130,6 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
background: var(--color-fill-2);
|
||||
transition: all .2s;
|
||||
user-select: none;
|
||||
|
||||
@@ -320,6 +320,18 @@
|
||||
height: calc(100% - 56px);
|
||||
overflow: auto;
|
||||
padding-bottom: 4px;
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:hover::-webkit-scrollbar-thumb {
|
||||
background: var(--color-fill-4);
|
||||
}
|
||||
}
|
||||
|
||||
.loading-skeleton {
|
||||
|
||||
@@ -75,9 +75,8 @@
|
||||
import type { HostQueryResponse } from '@/api/asset/host';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { useTerminalStore } from '@/store';
|
||||
import { PanelSessionType, TerminalTabs } from '../../types/const';
|
||||
import { PanelSessionType, TerminalTabs, emptyRecommendCount } from '../../types/const';
|
||||
|
||||
const totalCount = 7;
|
||||
const { tabManager, hosts, openSession } = useTerminalStore();
|
||||
|
||||
const combinedHandlers = ref<Array<CombinedHandlerItem>>([{
|
||||
@@ -103,7 +102,7 @@
|
||||
...hosts.hostList.filter(s => s.favorite).map(s => s.id),
|
||||
...hosts.hostList.map(s => s.id)
|
||||
])
|
||||
].slice(0, totalCount - 1)
|
||||
].slice(0, emptyRecommendCount - 1)
|
||||
.map(s => hosts.hostList.find(t => t.id === s) as HostQueryResponse)
|
||||
.filter(Boolean)
|
||||
.map(s => {
|
||||
@@ -116,10 +115,10 @@
|
||||
// 插入主机列表
|
||||
combinedHandlers.value.push(...combinedHosts);
|
||||
// 不足显示的行数用设置补充
|
||||
if (totalCount - 1 - combinedHosts.length > 0) {
|
||||
if (emptyRecommendCount - 1 - combinedHosts.length > 0) {
|
||||
const fillTabs = Object.values(TerminalTabs)
|
||||
.filter(s => s.key !== TerminalTabs.NEW_CONNECTION.key)
|
||||
.slice(0, totalCount - 1 - combinedHosts.length)
|
||||
.slice(0, emptyRecommendCount - 1 - combinedHosts.length)
|
||||
.map(s => {
|
||||
return {
|
||||
title: s.title,
|
||||
@@ -147,23 +146,19 @@
|
||||
|
||||
.combined-container {
|
||||
padding: 12px;
|
||||
margin: 64px auto 0 auto;
|
||||
margin: 32px auto 0 auto;
|
||||
width: @container-width;
|
||||
height: @container-height;
|
||||
max-height: @container-height;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: content-box;
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.combined-handler {
|
||||
width: @container-width - @transform-x;
|
||||
height: @handler-height;
|
||||
max-height: @handler-height;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 6px;
|
||||
color: var(--color-content-text-1);
|
||||
|
||||
@@ -134,10 +134,4 @@
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.list-view-container {
|
||||
max-height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -320,6 +320,18 @@
|
||||
height: calc(100% - 56px);
|
||||
overflow: auto;
|
||||
padding-bottom: 4px;
|
||||
|
||||
&::-webkit-scrollbar-track {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:hover::-webkit-scrollbar-thumb {
|
||||
background: var(--color-fill-4);
|
||||
}
|
||||
}
|
||||
|
||||
.loading-skeleton {
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
width: 100%;
|
||||
height: calc(100% - @ssh-header-height);
|
||||
position: relative;
|
||||
padding: 6px 0 0 6px;
|
||||
padding: 8px;
|
||||
|
||||
.ssh-inst {
|
||||
width: 100%;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import type { ShortcutKeyItem } from './define';
|
||||
|
||||
// 首页推荐数量
|
||||
export const emptyRecommendCount = 7;
|
||||
|
||||
// 终端 tab
|
||||
export const TerminalTabs = {
|
||||
NEW_CONNECTION: {
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
|
||||
.command-editor {
|
||||
width: 100%;
|
||||
height: calc(100vh - 318px);
|
||||
height: calc(100vh - 324px);
|
||||
}
|
||||
|
||||
:deep(.arco-input-append) {
|
||||
|
||||
Reference in New Issue
Block a user