03 2023 档案
摘要:设置dom元素的scrollTop属性为0 直接设(可能存在闪动,看需求): document.querySelector('.xxx').scrollTop = 0 动画平滑滚动: toTop () { let timer = null timer = requestAnimationFrame(
阅读全文
摘要:/** * 关闭子页面 * @param {*} reflash 是否刷新父页面 */ export function closeChildPage(reflash) { if (reflash) window.opener.parent.location.reload() // 刷新父页面 win
阅读全文