预警表格样式修改
This commit is contained in:
@@ -1,64 +1,64 @@
|
||||
<template>
|
||||
<div class="terminal-container">
|
||||
<public-title title="睡眠">
|
||||
<template #right>平均睡眠时长:6小时30分</template>
|
||||
</public-title>
|
||||
<div class="inner">
|
||||
<div class="title">
|
||||
<span class="count">6.5h</span>
|
||||
<span class="lightSleep">深睡2.4小时 浅睡4.1小时</span>
|
||||
</div>
|
||||
<div class="sleepChart" ref="sleepChart"></div>
|
||||
<div class="terminal-container">
|
||||
<public-title title="睡眠">
|
||||
<template #right>平均睡眠时长:6小时30分</template>
|
||||
</public-title>
|
||||
<div class="inner">
|
||||
<div class="title">
|
||||
<span class="count">6.5h</span>
|
||||
<span class="lightSleep">深睡2.4小时 浅睡4.1小时</span>
|
||||
</div>
|
||||
<div class="sleepChart" ref="sleepChart"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import * as echarts from 'echarts';
|
||||
import {ringOption, useHealth} from '/@/components/body-d-right/bodyRightHooks';
|
||||
import {ref, onMounted, unref} from 'vue';
|
||||
import {sleepCharts} from '/@/components/secondaryScreen/screen-right/screenRightHooks';
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import * as echarts from 'echarts';
|
||||
import { ringOption, useHealth } from '/@/components/body-d-right/bodyRightHooks';
|
||||
import { ref, onMounted, unref } from 'vue';
|
||||
import { sleepCharts } from '/@/components/secondaryScreen/screen-right/screenRightHooks';
|
||||
|
||||
const sleepChart = ref<HTMLElement>();
|
||||
onMounted(() => {
|
||||
init();
|
||||
});
|
||||
const {healthData, getValue, setHealth} = useHealth();
|
||||
const sleepChart = ref<HTMLElement>();
|
||||
onMounted(() => {
|
||||
init();
|
||||
});
|
||||
const { healthData, getValue, setHealth } = useHealth();
|
||||
|
||||
function init() {
|
||||
initChart();
|
||||
}
|
||||
function init() {
|
||||
initChart();
|
||||
}
|
||||
|
||||
function initChart() {
|
||||
let myChart = echarts.init(sleepChart.value);
|
||||
let options = sleepCharts();
|
||||
myChart.setOption(options);
|
||||
window.addEventListener('resize', () => {
|
||||
myChart.resize();
|
||||
});
|
||||
}
|
||||
function initChart() {
|
||||
let myChart = echarts.init(sleepChart.value);
|
||||
let options = sleepCharts();
|
||||
myChart.setOption(options);
|
||||
window.addEventListener('resize', () => {
|
||||
myChart.resize();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.inner {
|
||||
height: calc(100% - 40px);
|
||||
.inner {
|
||||
height: calc(100% - 40px);
|
||||
|
||||
.title {
|
||||
color: #cfcfcf;
|
||||
text-align: left;
|
||||
padding: 1% 6%;
|
||||
.title {
|
||||
color: #cfcfcf;
|
||||
text-align: left;
|
||||
padding: 1% 6%;
|
||||
|
||||
.count {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
.count {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.lightSleep {
|
||||
padding-left: 2%;
|
||||
}
|
||||
}
|
||||
|
||||
.sleepChart {
|
||||
height: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.lightSleep {
|
||||
padding-left: 2%;
|
||||
}
|
||||
}
|
||||
|
||||
.sleepChart {
|
||||
height: 80%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user