|
|
|
@ -478,6 +478,15 @@ |
|
|
|
box-shadow: none; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
-webkit-overflow-scrolling: touch; |
|
|
|
overscroll-behavior: contain; |
|
|
|
} |
|
|
|
|
|
|
|
.modal-body { |
|
|
|
flex: 1; |
|
|
|
overflow-y: auto; |
|
|
|
-webkit-overflow-scrolling: touch; |
|
|
|
overscroll-behavior: contain; |
|
|
|
} |
|
|
|
|
|
|
|
.modal-header { |
|
|
|
@ -5791,6 +5800,31 @@ |
|
|
|
// 防止iOS上的页面拖动 |
|
|
|
preventiOSScrolling(); |
|
|
|
|
|
|
|
// 为模态框内容添加滚动处理 |
|
|
|
const modalContent = document.querySelector('#createSupplyModal .modal-content'); |
|
|
|
if (modalContent) { |
|
|
|
// 确保模态框内容可以滚动 |
|
|
|
modalContent.style.overflowY = 'auto'; |
|
|
|
modalContent.style.webkitOverflowScrolling = 'touch'; |
|
|
|
|
|
|
|
// 添加触摸事件监听器,允许模态框内的滚动 |
|
|
|
modalContent.addEventListener('touchstart', function(e) { |
|
|
|
this.allowUp = (this.scrollTop > 0); |
|
|
|
this.allowDown = (this.scrollTop < this.scrollHeight - this.clientHeight); |
|
|
|
this.prevTop = null; |
|
|
|
this.prevBottom = null; |
|
|
|
}, { passive: true }); |
|
|
|
|
|
|
|
modalContent.addEventListener('touchmove', function(e) { |
|
|
|
if ((this.allowUp && e.touches[0].pageY < e.changedTouches[0].pageY) || |
|
|
|
(this.allowDown && e.touches[0].pageY > e.changedTouches[0].pageY)) { |
|
|
|
e.stopPropagation(); |
|
|
|
} else { |
|
|
|
e.preventDefault(); |
|
|
|
} |
|
|
|
}, { passive: false }); |
|
|
|
} |
|
|
|
|
|
|
|
// 重新加载联系人数据,确保最新 |
|
|
|
loadContacts(); |
|
|
|
|
|
|
|
|