Skip to content

Commit

Permalink
feat(Log): 日志列表增加下拉查看最新提示 (#229)
Browse files Browse the repository at this point in the history
* feat(Log): 日志列表增加下拉查看最新提示

* feat(Log): 下拉查看最新提示增加点击文字跳转到最下
  • Loading branch information
JustAnotherID authored Jul 30, 2024
1 parent 734dbd2 commit ad02484
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/PageHome.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Teleport v-if="store.curDice.logs.length" to="#root">
<el-button type="default" class="btn-scrolldown" :icon="CaretBottom" circle @click="scrollDown"></el-button>
<el-button type="default" class="btn-scrolldown" :icon="CaretBottom" circle @click="scrollDown" content="最新日志"></el-button>
</Teleport>

<div style="display: flex; justify-content: flex-end; align-items: center">
Expand Down Expand Up @@ -59,6 +59,10 @@
<el-checkbox v-model="autoRefresh">保持刷新</el-checkbox>
</div>

<el-divider class="latest-log-warn">
<el-text type="warning" size="small" class="hover:cursor-pointer" @click="scrollDown">点击下拉到底查看最新日志</el-text>
</el-divider>

<div class="hidden md:block p-0 logs">
<el-table :data="store.curDice.logs"
:row-class-name="getLogRowClassName" :header-cell-style="{backgroundColor: '#f3f5f7'}">
Expand Down Expand Up @@ -279,10 +283,19 @@ onBeforeUnmount(() => {
z-index: 5;
opacity: .4;
}
.btn-scrolldown:hover {
transition: all .3s;
opacity: 1;
}
.latest-log-warn {
margin-top: 0;
margin-bottom: 1rem;
:deep(.el-divider__text) {
background: #f3f4f6;
}
}
</style>

<style lang="css">
Expand Down

0 comments on commit ad02484

Please sign in to comment.