feat:explore添加unit配置
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="interval-refresh ">
|
||||
<time-picker ref="timePicker" class="time-picker" @change="dateChange"></time-picker>
|
||||
<chart-unit v-model="unit" ></chart-unit>
|
||||
<div class="nz-btn-group nz-btn-group-size-normal nz-btn-group-light margin-r-20" v-show="useRefresh" style="height: 24px;line-height: 24px;vertical-align: middle;">
|
||||
<button style="border-right: 1px solid rgba(162,162,162,0.50);" type="button" class="nz-btn nz-btn-size-normal nz-btn-style-light" @click="refreshDataFunc">
|
||||
<i style="font-size: 12px" class="global-active-color nz-icon nz-icon-refresh"></i>
|
||||
@@ -23,10 +24,12 @@
|
||||
<script>
|
||||
import bus from "../../libs/bus";
|
||||
import timePicker from "./timePicker";
|
||||
import chartUnit from "./chartUnit";
|
||||
export default {
|
||||
name: "intervalRefresh",
|
||||
components:{
|
||||
'time-picker':timePicker,
|
||||
'chart-unit':chartUnit,
|
||||
},
|
||||
model:{
|
||||
event:'change',
|
||||
@@ -44,6 +47,10 @@
|
||||
useRefresh:{
|
||||
type:Boolean,
|
||||
default:true,
|
||||
},
|
||||
useChartUnit:{
|
||||
type:Boolean,
|
||||
default:true,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
@@ -71,6 +78,7 @@
|
||||
name: '30m',
|
||||
}],
|
||||
interval: -1,
|
||||
unit:2,
|
||||
}
|
||||
},
|
||||
created(){
|
||||
@@ -116,6 +124,14 @@
|
||||
this.$emit('change',this.searchTime)
|
||||
this.refreshDataFunc();
|
||||
},
|
||||
},
|
||||
watch:{
|
||||
unit:{
|
||||
immediate:true,
|
||||
handler(n,o){
|
||||
this.$emit('unitChange',n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user