认证页增加双击不放大功能,滚动条丝滑滚动优化

This commit is contained in:
2025-09-11 17:30:47 +08:00
parent fe5e85b8d5
commit 6bc78f76ad
5 changed files with 63 additions and 2 deletions

View File

@ -74,6 +74,16 @@
// }, // },
async mounted() { async mounted() {
// await this.$onLaunched; // await this.$onLaunched;
// 禁止双击放大
let lastTouchEnd = 0;
document.addEventListener('touchend', (event) => {
const now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault(); // 阻止双击放大
}
lastTouchEnd = now;
}, { passive: false });
await this.refresh() await this.refresh()
}, },
methods: { methods: {
@ -130,6 +140,8 @@
padding-bottom: 80px; padding-bottom: 80px;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
} }
.audit_list { .audit_list {
padding: 20px 30px; padding: 20px 30px;

View File

@ -67,6 +67,16 @@
} }
}, },
async mounted() { async mounted() {
// 禁止双击放大
let lastTouchEnd = 0;
document.addEventListener('touchend', (event) => {
const now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault(); // 阻止双击放大
}
lastTouchEnd = now;
}, { passive: false });
// if(options?.show) { // if(options?.show) {
this.show = true this.show = true
// } // }
@ -140,6 +150,8 @@
.content{ .content{
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
} }
.navBar{ .navBar{
margin-bottom: 46px; margin-bottom: 46px;

View File

@ -101,6 +101,16 @@
} }
}, },
async mounted() { async mounted() {
// 禁止双击放大
let lastTouchEnd = 0;
document.addEventListener('touchend', (event) => {
const now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault(); // 阻止双击放大
}
lastTouchEnd = now;
}, { passive: false });
// if(options?.show) { // if(options?.show) {
this.show = true this.show = true
// } // }
@ -198,8 +208,11 @@
background: #F4F5F7; background: #F4F5F7;
} }
.content{ .content{
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
} }
.navBar{ .navBar{
margin-bottom: 46px; margin-bottom: 46px;

View File

@ -195,6 +195,16 @@
} }
}, },
async mounted() { async mounted() {
// 禁止双击放大
let lastTouchEnd = 0;
document.addEventListener('touchend', (event) => {
const now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault(); // 阻止双击放大
}
lastTouchEnd = now;
}, { passive: false });
// if(options?.show) { // if(options?.show) {
this.show = true this.show = true
// } // }
@ -384,9 +394,11 @@
margin-bottom: 46px; margin-bottom: 46px;
} }
.content { .content {
/*padding-bottom: 86px;*/ padding-bottom: 86px;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
} }
.carInfo .title { .carInfo .title {
width: 100% !important; width: 100% !important;

View File

@ -92,6 +92,16 @@
} }
}, },
async mounted() { async mounted() {
// 禁止双击放大
let lastTouchEnd = 0;
document.addEventListener('touchend', (event) => {
const now = Date.now();
if (now - lastTouchEnd <= 300) {
event.preventDefault(); // 阻止双击放大
}
lastTouchEnd = now;
}, { passive: false });
this.show = true this.show = true
if( this.show ) { if( this.show ) {
await this.getDetail() await this.getDetail()
@ -255,5 +265,7 @@
padding-bottom: 86px; padding-bottom: 86px;
height: 90%; height: 90%;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; /* 启用iOS惯性滚动 */
scroll-behavior: smooth; /* 平滑滚动(部分浏览器支持) */
} }
</style> </style>