feat:explore添加unit配置

This commit is contained in:
wangwenrui
2020-04-28 19:23:48 +08:00
parent 78c30487a5
commit d6fbf428f0
4 changed files with 86 additions and 17 deletions

View File

@@ -0,0 +1,52 @@
<template>
<el-cascader filterable placeholder="" popper-class="no-style-class unit-pop-class" size="mini"
:options="chartUnits"
class="chart-unit"
:props="{ expandTrigger: 'click' ,emitPath:false}"
:show-all-levels="false"
v-model="unit"
@change="unitSelected"
>
</el-cascader>
</template>
<script>
import chartDataFormat from "../charts/chartDataFormat";
export default {
name: "chartUnit",
model:{
event:'change',
prop:'postUnit'
},
props:{
postUnit:{}
},
data(){
return{
chartUnits:chartDataFormat.unitOptions(),
visibel:false,
unit:0,
}
},
created() {
this.unit=this.postUnit;
},
methods:{
unitSelected:function(value){
this.unit=value;
this.$emit('change',this.unit);
},
}
}
</script>
<style >
.chart-unit{
width: 100px;
margin: 0 20px 0 0;
}
.unit-pop-class .el-cascader-panel{
height: 200px;
background-color: #FFF;
}
</style>