perf: 滚动条替换和toTop替换

This commit is contained in:
陈劲松
2020-12-14 20:25:24 +08:00
committed by chenjinsong
parent 2ea0b88989
commit 0764dcdd56
76 changed files with 480 additions and 1368 deletions

View File

@@ -46,7 +46,6 @@
v-loading="tools.loading"
class="nz-table endpoint-table"
:height="$tableHeight.noPagination"
v-scrollBar:el-table="'large'"
:cell-class-name="messageStyle"
ref="endpointTable"
style="width: 100%;"
@@ -514,25 +513,6 @@
? JSON.parse(localStorage.getItem("nz-tableTitle-" + localStorage.getItem("nz-username") + "-/projectBottom"))
: this.tableTitle;
this.$nextTick(() => {
//绑定滚动条事件控制top按钮
let el = this.$refs.endpointTable.$el.querySelector(".el-table__body-wrapper");
if (el._ps_) {
el.addEventListener("ps-scroll-y", () => {
if (el._ps_.scrollbarYTop > 50) {
this.tools.showTopBtn = true;
} else {
this.tools.showTopBtn = false;
}
});
el.addEventListener("mouseenter", () => {
this.tools.tableHover = true;
});
el.addEventListener("mouseleave", () => {
this.tools.tableHover = false;
});
}
});
this.initEvent();
},
beforeDestroy(){