fix : 修复组件外点击问题 修改样式

This commit is contained in:
zhangxiaolong
2022-04-13 17:47:09 +08:00
parent 52fbff49e2
commit 8214300cb1
2 changed files with 13 additions and 1 deletions

View File

@@ -92,7 +92,7 @@
color: #60BEFF; color: #60BEFF;
font-size: 13px font-size: 13px
} }
.panel-dropdown-btn:hover { .panel-dropdown-btn:hover {
color: #409EFF; color: #409EFF;
} }
@@ -151,6 +151,11 @@
background: $--background-color-empty; background: $--background-color-empty;
} }
} }
&.el-button--mini{
color: $--color-text-label;
background-color: $--color-primary;
border-color: $--color-primary;
}
.nz-dashboard-dropdown { .nz-dashboard-dropdown {
height: 300px; height: 300px;

View File

@@ -3,6 +3,7 @@
id="panel-calender" id="panel-calender"
:class="{ 'calendar--small': size === 'small' }" :class="{ 'calendar--small': size === 'small' }"
class="calendar" class="calendar"
v-clickoutside="changeDropdownFlag"
> >
<div @click="showDropdown" class="date-range-text"> <div @click="showDropdown" class="date-range-text">
@@ -63,6 +64,7 @@
@click="timeRange(searchTime)" @click="timeRange(searchTime)"
type="primary" type="primary"
size="mini" size="mini"
class="time-range-button el-button--primary"
>Apply time range</el-button >Apply time range</el-button
> >
</div> </div>
@@ -248,6 +250,11 @@ export default {
console.log(this.sign) console.log(this.sign)
}, },
methods: { methods: {
changeDropdownFlag(){
if (this.dropdownFlag) {
this.dropdownFlag = false
}
},
getItem () { getItem () {
this.rangeHistory = localStorage.getItem('date-range-history' + this.sign) this.rangeHistory = localStorage.getItem('date-range-history' + this.sign)
? JSON.parse(localStorage.getItem('date-range-history' + this.sign)) ? JSON.parse(localStorage.getItem('date-range-history' + this.sign))