This commit is contained in:
hzz 2023-05-22 18:33:55 +08:00
commit 7917cdd5f8
4 changed files with 9 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@ -18,7 +18,7 @@
</div>
<div v-if="tipList.length > 0" class="swiperbox">
<swiper-container :slides-per-view="per_view" :initialSlide="1" :loop="true" :space-between="spaceBetween"
:centered-slides="true" direction="vertical" :autoplay="{
direction="vertical" :autoplay="{
delay: 3000,
disableOnInteraction: false,
}" @progress="onProgress" @slidechange="onSlideChange">

View File

@ -13,7 +13,7 @@
<template v-slot>
<div class="box" ref="classBox1">
<div class="icontip">
<div v-for="items in value.data" style="margin: auto 5px;" v-show="(+items.val > +value.quota)&&item.status">
<div v-for="items in value.data" style="margin: auto 5px;" v-show="(+items.val > +value.quota)&&items.status">
<el-popover placement="bottom" :width="250" trigger="hover" effect="dark"
:popper-style="{ 'background-color': 'rgba(0,0,0,.8)' }">
<ul class="icontipBox">
@ -78,7 +78,6 @@ let item = computed(() => {
return value.data[i.value]||{"name":"","val":"0","type":"","field":"","ts":0,"status":false};
});
let iconcolor = computed(() => {
console.log(value.data[i.value]);
//
if (value.data[i.value]) {
return value.data[i.value].status ? +value.data[i.value].val > +value.quota ? "icon-red" : "icon-blue" : "icon-grey";

View File

@ -40,11 +40,8 @@
</div>
<!-- <h2>{{ `${t(item.i18n[0])}${t(item.i18n[1])}`}}</h2> -->
<h2>{{ item.name}}</h2>
<i :class="+item.val > +limit
? 'iconfont ' + icon + ' icon-red iconbig-size'
: 'iconfont ' + icon + ' icon-blue iconbig-size'
"></i>
<p class="unit" v-if="unit">
<i :class="['iconfont',icon,iconcolor,'iconbig-size']"></i>
<p class="unit" v-if="unit&&item.status">
<p class="num">{{item.val}}</p>
<span>{{ unit }}</span>
</p>
@ -70,6 +67,11 @@ let timer = null;
let item = computed(() => {
return props.value[i.value];
});
let iconcolor = computed(() => {
console.log(props);
return props.value[i.value].status?props.value[i.value].val > props.limit ? "icon-red" : "icon-blue":"icon-grey";
});
let props = defineProps<{
title: string;
icon: string;