Skip to content

Commit

Permalink
前端样式修复
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoZuohong committed Dec 22, 2023
1 parent 30d33df commit 1c66687
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 7 deletions.
11 changes: 11 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dependencies": {
"@vicons/carbon": "^0.12.0",
"@vicons/fa": "^0.12.0",
"@vicons/fluent": "^0.12.0",
"@vicons/ionicons4": "^0.12.0",
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
Expand Down
6 changes: 3 additions & 3 deletions ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</n-layout-content>
<n-layout-footer v-if="mobile">
<n-tabs type="line" justify-content="space-evenly" size="small">
<n-tab name="日志" @click="$router.push('/log')">
<n-tab name="日志" @click="$router.push('/')">
<div style="display: flex; flex-direction: column; align-items: center">
<n-icon size="20" style="margin-bottom: -1px" :component="BookOutline" />
日志
Expand Down Expand Up @@ -104,7 +104,7 @@
帮助
</div>
</n-tab>
<n-tab name="资源" @click="$router.push('/')">
<n-tab name="资源" @click="$router.push('/readme')">
<div style="display: flex; flex-direction: column; align-items: center">
<n-icon size="20" style="margin-bottom: -1px" :component="Bag" />
资源
Expand Down Expand Up @@ -411,7 +411,7 @@ td {
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 12px;
gap: 8px;
width: calc(100% - 24px);
height: calc(100% - 24px);
}
Expand Down
34 changes: 31 additions & 3 deletions ui/src/pages/Log.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ function refresh() {
import PlayIcon from '@vicons/ionicons5/Play'
import StopIcon from '@vicons/ionicons5/Stop'
import ReloadIcon from '@vicons/ionicons5/Reload'
import CollapseIcon from '@vicons/fluent/PanelTopContract20Regular'
import ExpandIcon from '@vicons/fluent/PanelTopExpand20Regular'
const show_task_table = ref(true)
</script>
<template>
Expand All @@ -61,7 +65,7 @@ import ReloadIcon from '@vicons/ionicons5/Reload'
<th>任务</th>
</tr>
</thead>
<tbody>
<tbody v-show="show_task_table">
<template v-for="task in task_list">
<tr>
<td :rowspan="task.task.length">{{ task.time }}</td>
Expand Down Expand Up @@ -105,25 +109,43 @@ import ReloadIcon from '@vicons/ionicons5/Reload'
<span class="scroll-label">自动滚动</span>
</div>
</div>
<n-button
class="toggle-table-collapse-btn"
size="small"
@click="show_task_table = !show_task_table"
:focusable="false"
>
<template #icon>
<n-icon>
<collapse-icon v-if="show_task_table" />
<expand-icon v-else />
</n-icon>
</template>
</n-button>
</div>
</template>
<style scoped lang="scss">
.log {
flex-grow: 1;
overflow: hidden;
flex: 1;
}
.task-table {
max-width: 600px;
th {
padding: 2px 16px;
&:first-child {
box-sizing: border-box;
width: 74px;
}
}
td {
height: 24px;
padding: 0 16px;
padding: 2px 8px;
}
}
Expand All @@ -142,6 +164,12 @@ import ReloadIcon from '@vicons/ionicons5/Reload'
.expand {
flex-grow: 1;
}
.toggle-table-collapse-btn {
position: absolute;
top: 12px;
right: 12px;
}
</style>
<style>
Expand Down
9 changes: 8 additions & 1 deletion ui/src/pages/readme.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="home-container" style="width: auto; align-content: center">
<div class="home-container readme">
<!-- <h2>更新日志</h2> -->
<h1 id="资源合集">资源合集</h1>
<div>
Expand Down Expand Up @@ -154,3 +154,10 @@
</div>
</div>
</template>

<style scoped>
.readme {
word-break: break-all;
max-width: 800px;
}
</style>

0 comments on commit 1c66687

Please sign in to comment.