Browse Source

fix: 优化首页样式 (#1709)

pull/1711/head
ssongliu 1 year ago committed by GitHub
parent
commit
1fd31fffd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      frontend/src/views/home/app/index.vue
  2. 106
      frontend/src/views/home/index.vue

5
frontend/src/views/home/app/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-scrollbar height="500px" class="moz-height"> <el-scrollbar height="525px" class="moz-height">
<div class="h-app-card" v-for="(app, index) in apps" :key="index"> <div class="h-app-card" v-for="(app, index) in apps" :key="index">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="5"> <el-col :span="5">
@ -88,6 +88,7 @@ defineExpose({
cursor: pointer; cursor: pointer;
padding: 10px 15px; padding: 10px 15px;
margin-right: 10px; margin-right: 10px;
line-height: 18px;
.h-app-content { .h-app-content {
padding-left: 15px; padding-left: 15px;
@ -122,7 +123,7 @@ defineExpose({
/* FOR MOZILLA */ /* FOR MOZILLA */
@-moz-document url-prefix() { @-moz-document url-prefix() {
.moz-height { .moz-height {
height: 499px; height: 524px;
} }
} }
</style> </style>

106
frontend/src/views/home/index.vue

@ -126,7 +126,7 @@
<div v-if="chartOption === 'io'" style="margin-top: 40px" class="mobile-monitor-chart"> <div v-if="chartOption === 'io'" style="margin-top: 40px" class="mobile-monitor-chart">
<v-charts <v-charts
height="358px" height="383px"
id="ioChart" id="ioChart"
type="line" type="line"
:option="chartsOption['ioChart']" :option="chartsOption['ioChart']"
@ -136,7 +136,7 @@
</div> </div>
<div v-if="chartOption === 'network'" style="margin-top: 40px" class="mobile-monitor-chart"> <div v-if="chartOption === 'network'" style="margin-top: 40px" class="mobile-monitor-chart">
<v-charts <v-charts
height="358px" height="383px"
id="networkChart" id="networkChart"
type="line" type="line"
:option="chartsOption['networkChart']" :option="chartsOption['networkChart']"
@ -151,56 +151,58 @@
<el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8"> <el-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
<CardWithHeader :header="$t('home.systemInfo')"> <CardWithHeader :header="$t('home.systemInfo')">
<template #body> <template #body>
<el-descriptions :column="1" class="h-systemInfo"> <el-scrollbar>
<el-descriptions-item class-name="system-content"> <el-descriptions :column="1" class="h-systemInfo">
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.hostname') }} <span class="system-label">
</span> {{ $t('home.hostname') }}
</template> </span>
{{ baseInfo.hostname }} </template>
</el-descriptions-item> {{ baseInfo.hostname }}
<el-descriptions-item class-name="system-content"> </el-descriptions-item>
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.platformVersion') }} <span class="system-label">
</span> {{ $t('home.platformVersion') }}
</template> </span>
{{ baseInfo.platform }}-{{ baseInfo.platformVersion }} </template>
</el-descriptions-item> {{ baseInfo.platform }}-{{ baseInfo.platformVersion }}
<el-descriptions-item class-name="system-content"> </el-descriptions-item>
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.kernelVersion') }} <span class="system-label">
</span> {{ $t('home.kernelVersion') }}
</template> </span>
{{ baseInfo.kernelVersion }} </template>
</el-descriptions-item> {{ baseInfo.kernelVersion }}
<el-descriptions-item class-name="system-content"> </el-descriptions-item>
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.kernelArch') }} <span class="system-label">
</span> {{ $t('home.kernelArch') }}
</template> </span>
{{ baseInfo.kernelArch }} </template>
</el-descriptions-item> {{ baseInfo.kernelArch }}
<el-descriptions-item class-name="system-content"> </el-descriptions-item>
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.uptime') }} <span class="system-label">
</span> {{ $t('home.uptime') }}
</template> </span>
{{ currentInfo.timeSinceUptime }} </template>
</el-descriptions-item> {{ currentInfo.timeSinceUptime }}
<el-descriptions-item class-name="system-content"> </el-descriptions-item>
<template #label> <el-descriptions-item class-name="system-content">
<span class="system-label"> <template #label>
{{ $t('home.runningTime') }} <span class="system-label">
</span> {{ $t('home.runningTime') }}
</template> </span>
{{ loadUpTime(currentInfo.uptime) }} </template>
</el-descriptions-item> {{ loadUpTime(currentInfo.uptime) }}
</el-descriptions> </el-descriptions-item>
</el-descriptions>
</el-scrollbar>
</template> </template>
</CardWithHeader> </CardWithHeader>

Loading…
Cancel
Save