소스 검색

fix: 修复审核弹窗部分情况下无法自动滚动到底部的bug

lanjianrong 4 년 전
부모
커밋
6fbd0a75ce
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      app/view/change/info_modal.ejs
  2. 1 1
      app/view/material/audit_modal.ejs
  3. 1 1
      app/view/stage/audit_modal.ejs

+ 1 - 1
app/view/change/info_modal.ejs

@@ -792,7 +792,7 @@
 <script>
     $('.modal').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight
-        const scrollBox = $('div[class="col-8 modal-height-500"]')
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
         // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
         if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
             scrollBox.scrollTop(height);

+ 1 - 1
app/view/material/audit_modal.ejs

@@ -869,7 +869,7 @@
 <script>
     $('.modal').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight
-        const scrollBox = $('div[class="col-8 modal-height-500"]')
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
         // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
         if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
             scrollBox.scrollTop(height);

+ 1 - 1
app/view/stage/audit_modal.ejs

@@ -1565,7 +1565,7 @@
     });
     $('.modal').on('shown.bs.modal', function () {
         const height = $(this)[0].scrollHeight
-        const scrollBox = $('div[class="col-8 modal-height-500"]')
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
         // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
         if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
             scrollBox.scrollTop(height);