菜单动态路由及头部角色切换修改
This commit is contained in:
@@ -266,18 +266,18 @@
|
||||
resizeButtom() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.tags !== undefined) {
|
||||
const clientWidth = (this.$refs.tags as HTMLElement).clientWidth;
|
||||
if (this.currentPage === 0) {
|
||||
this.isdisabledl = this.tagList.length * 100 > clientWidth;
|
||||
} else {
|
||||
this.isdisabledl =
|
||||
(this.tagList.length - this.number * this.currentPage) * 100 > clientWidth;
|
||||
if (this.tagList.length * 100 < clientWidth) {
|
||||
(this.$refs.tags as HTMLElement).style.cssText = `transform: translateX(${0}px)`;
|
||||
this.isdisabledr = false;
|
||||
this.currentPage = 0;
|
||||
const clientWidth = (this.$refs.tags as HTMLElement).clientWidth;
|
||||
if (this.currentPage === 0) {
|
||||
this.isdisabledl = this.tagList.length * 100 > clientWidth;
|
||||
} else {
|
||||
this.isdisabledl =
|
||||
(this.tagList.length - this.number * this.currentPage) * 100 > clientWidth;
|
||||
if (this.tagList.length * 100 < clientWidth) {
|
||||
(this.$refs.tags as HTMLElement).style.cssText = `transform: translateX(${0}px)`;
|
||||
this.isdisabledr = false;
|
||||
this.currentPage = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user