Explorar el Código

feat: 回滚高度问题

zhangyuhan hace 3 años
padre
commit
38c164e3e2
Se han modificado 1 ficheros con 17 adiciones y 13 borrados
  1. 17 13
      src/web/staticres/common-module/collection/js/money-mobile.js

+ 17 - 13
src/web/staticres/common-module/collection/js/money-mobile.js

@@ -222,20 +222,24 @@ var moneyComponent = {
         }
       }
     },
-    changeViewForHeight () {
-      $(".app-layout-content-b").scrollTop(0)
-      $("#v-search-group .popup-content").scrollTop(0)
-      var minHeightList = [document.documentElement.clientHeight || 0, document.body.clientHeight || 0, $(".app-layout-content-b").height() || 0].sort()
-      $("#v-search-group .ent-search-pop").css({height: minHeightList[0] - 44})
-    },
     toggleInput (type) {
-     this.changeViewForHeight()
-      document.activeElement.scrollIntoViewIfNeeded();
-      var _this = this
-      setTimeout(function (){
-        _this.changeViewForHeight()
-        document.activeElement.scrollIntoViewIfNeeded();
-      }, 200)
+      var parentDom = $("#v-search-group .more-popup-content")
+      var childDom = $("#v-search-group .more-popup-content .select-more-tag-group")
+      if (type) {
+        parentDom.css({
+          height: childDom.height() + 20,
+          overflow: 'hidden',
+          position: 'fixed',
+          top: '120px'
+        })
+      } else {
+        parentDom.css({
+          height: 'auto',
+          overflow: 'unset',
+          position: 'unset',
+          top: 'unset'
+        })
+      }
     },
     selectInput (type) {
       if (this.radio) {