认证页增加双击不放大功能,滚动条丝滑滚动优化
This commit is contained in:
@ -92,7 +92,17 @@
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.show = true
|
||||
// 禁止双击放大
|
||||
let lastTouchEnd = 0;
|
||||
document.addEventListener('touchend', (event) => {
|
||||
const now = Date.now();
|
||||
if (now - lastTouchEnd <= 300) {
|
||||
event.preventDefault(); // 阻止双击放大
|
||||
}
|
||||
lastTouchEnd = now;
|
||||
}, { passive: false });
|
||||
|
||||
this.show = true
|
||||
if( this.show ) {
|
||||
await this.getDetail()
|
||||
}
|
||||
@ -255,5 +265,7 @@
|
||||
padding-bottom: 86px;
|
||||
height: 90%;
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
|
||||
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user