zengh
2022-05-16 63ad2c3598400370dd7da5534659fd7e768a0a4a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <span id="l-legendOur">
    <span v-for="(value,index) in datas" :key="index" class="l-l-o">
      <span class="l-l-Img" :style="{backgroundColor: value.color}"></span>
      <span class="l-l-Text">{{value.text}}</span>
    </span>
  </span>
</template>
<script>
import { color } from "echarts"
 
 
export default ({
    props:['datas'],
    data(){
        return{
            datalist:[//示例数据格式
                {
                    color: 'rgb(236, 83, 37)',
                    text: '掉线'
                },
                {
                    color: 'rgb(49, 49, 49)',
                    text: '在线'
                }
            ]
        }
    }
})
</script>
 
<style lang="scss" >
#l-legendOur{
    position: absolute;
    right: 0;
    .l-l-o{
        color: rgba($color: #000000, $alpha: .8);
        color: rgb(49, 49, 49);
        position: relative;
        right: 150px;
        margin-left: 10px;
        font-size: 14px;
        font-weight: 500;
        font-family: 'Chinese Quote,-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol';
    }
    .l-l-Img{
        display: inline-block;
        width: 10px;
        height: 10px;
        // border: 1px solid rgb(17, 198, 253);
        border-radius: 3px;
        margin-right: 8px;
    }
}
</style>