修改部分隐藏

This commit is contained in:
weidizhu_admin 2024-08-01 11:44:23 +08:00
parent 0a53f73553
commit 4c0cd58a13
8 changed files with 17 additions and 7 deletions

View File

@ -1,6 +1,14 @@
<template>
<view>
<canvas id="myCanvas" :canvas-id="canvasId" style="width: 100%; height: 60px;"></canvas>
<view class="" style="position: relative;">
<view :style="'position: absolute;width: 100%; height: 60px;background-color: #000;z-index: 1;display: '+zz">
<image src="../../static/image/1722482824117.jpg" style="width: 100%;" mode="widthFix"></image>
</view>
<view class="">
<canvas id="myCanvas" :canvas-id="canvasId" style="width: 100%; height: 60px;"></canvas>
</view>
</view>
</view>
</template>
@ -14,12 +22,15 @@
},
data() {
return {
zz:'block',
};
},
watch:{
dataList(newVal,oldVal){
if(newVal.length > 0){
this.zz = 'none'
const query = uni.createSelectorQuery().in(this);
query.select('#myCanvas').boundingClientRect(data => {
if (data) {
@ -36,7 +47,6 @@
},
methods:{
doDraw(canvasWidth){
console.log(canvasWidth)
const colorArr = [
'#e933dd',
'#6452da',
@ -51,7 +61,6 @@
let times = 0;
// 线
const oneLineWidth = (canvasWidth / this.dataList.length).toFixed(2)
console.log(oneLineWidth)
const ctx = uni.createCanvasContext(this.canvasId, this);
//
this.dataList.map((v,i) => {

View File

@ -77,7 +77,7 @@
</view>
</view>
</view>
<view class="radius_box" style="margin: 20rpx;padding-bottom: 20rpx;margin-top: 40rpx;">
<view class="radius_box" style="margin: 20rpx;padding-bottom: 20rpx;margin-top: 40rpx;" v-if="option.series[0].data.length > 0">
<view class="" style="font-size: 26rpx;margin-bottom: 30rpx;">
睡眠阶段
</view>
@ -174,6 +174,7 @@
},
series: [
{
data:[],
type: 'pie',
radius: ['70%', '90%'],
avoidLabelOverlap: false,

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>智能终端</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/watchapp/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/watchapp/static/js/chunk-vendors.a54e2e08.js></script><script src=/watchapp/static/js/index.82fb9260.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/watchapp/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/watchapp/static/js/chunk-vendors.a54e2e08.js></script><script src=/watchapp/static/js/index.04a36d69.js></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long