perf: 滚动条替换和toTop替换
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user