NEZ-1079 perf: 将各处列表、dashboard等页面中多处下拉框的弹出触发方式统一为点击触发

This commit is contained in:
@changcode
2021-10-25 17:16:40 +08:00
parent f3896ff7b2
commit 9e82c52436
50 changed files with 73 additions and 75 deletions

View File

@@ -8,7 +8,7 @@
<i class="global-active-color nz-icon nz-icon-refresh" style="font-size: 14px"></i>&nbsp;
<span><slot name="added-text"></slot></span>
</button>
<button id="browser-go" class="top-tool-btn top-tool-btn--dropdown" @mouseenter="dropdownHandler(true)" @mouseleave="dropdownHandler(false)">
<button id="browser-go" class="top-tool-btn top-tool-btn--dropdown" @click="dropdownHandler(dropdownShow)">
<span class="select-refresh-time-label" v-if="interval !== -1">{{interLabel}}</span>
<i class="nz-icon nz-icon-arrow-down" style="font-size: 12px;"></i>
<transition name="el-zoom-in-top">
@@ -120,13 +120,10 @@ export default {
}
},
dropdownHandler (show) {
if (show) {
clearTimeout(timeout)
if (!show) {
this.dropdownShow = true
} else {
timeout = setTimeout(() => {
this.dropdownShow = false
}, 700)
this.dropdownShow = false
}
},
getIntervalData (interval) { // interval:结束时间到现在的秒数