// pager-count 属性可以完美解决,以下不用看
// 手机端 elementui 分页组件过长,隐藏对应的4,5,6页码
const hidePagination = () => {
let timerId = setTimeout(() => {
// 存在 ... 分页
// 由于分页组件在获取表格数据total后才渲染,因此需要在每次请求表格数据后都定时调用隐藏页码的功能
let ODot = document.querySelector('.el-icon.more.btn-quicknext.el-icon-more')
if (ODot) {
for (let i = 0; i < 3; i++) {
ODot.previousElementSibling.style.display = 'none'
ODot = ODot.previousElementSibling
}
}
}, 0)
clearTimeout(timerId)
}
移动端常见问题
于 2023-03-17 17:46:45 首次发布