Преглед изворни кода

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

lanjianrong пре 4 година
родитељ
комит
6fbd0a75ce

+ 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);