feat: panel布局、单值图、line图等
This commit is contained in:
49
src/components/charts/ChartSingleValue.vue
Normal file
49
src/components/charts/ChartSingleValue.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="cn-chart cn-chart__single-value" :class="singleValueClass(type)">
|
||||
<div class="single-value__icon"><i class="el-icon-apple"></i></div>
|
||||
<div class="single-value__content" v-if="type === 51">
|
||||
<div class="content__data">11112</div>
|
||||
<div class="content__title">嘻嘻</div>
|
||||
</div>
|
||||
<div class="single-value__content" v-if="type === 53">
|
||||
<div class="content__title">嘻嘻</div>
|
||||
<div class="content__data">11112</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ChartSingleValue',
|
||||
props: {
|
||||
type: Number
|
||||
},
|
||||
computed: {
|
||||
singleValueClass () {
|
||||
return function (type) {
|
||||
let c
|
||||
switch (type) {
|
||||
case 51: {
|
||||
c = 'cn-chart__single-value--icon-left'
|
||||
break
|
||||
}
|
||||
case 52: {
|
||||
c = 'cn-chart__single-value--chart'
|
||||
break
|
||||
}
|
||||
case 53: {
|
||||
c = 'cn-chart__single-value--icon-right'
|
||||
break
|
||||
}
|
||||
default: break
|
||||
}
|
||||
return c
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user