菜单动态路由及头部角色切换修改

This commit is contained in:
duyufeng
2024-08-30 10:25:42 +08:00
parent c76dcaa7c5
commit 699754c902
10 changed files with 262 additions and 41 deletions

View File

@@ -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;
}
}
}
}
});
},