Bläddra i källkod

添加scrollIntoView({behavior: "smooth",block:'end'})的block属性,放置页面顶部对齐,按钮位置变化

luolei 5 år sedan
förälder
incheckning
5828a4f876

+ 1 - 1
src/common/ComTextArea.vue

@@ -61,7 +61,7 @@ export default {
       this.$emit("updata",newData);
     },
     blur(){
-      document.activeElement.scrollIntoView({behavior: "smooth"})
+      document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
       $(".foot").css({'display':'block'})
       // document.activeElement.scrollIntoViewIfNeeded(true);
       // $(".foot").css({'display':'block'})

+ 1 - 1
src/common/Input.vue

@@ -58,7 +58,7 @@
       blur(){
         // $(".btscroll").css({'position':'fixed'})
         $(".foot").css({'display':'block'})
-        document.activeElement.scrollIntoView({behavior: "smooth"})
+        document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
         // document.activeElement.scrollIntoViewIfNeeded(true);
         // setTimeout(()=>{
         //   document.activeElement.scrollIntoViewIfNeeded(true);

+ 1 - 1
src/common/MultiLineInput.vue

@@ -93,7 +93,7 @@ export default {
       // 如果该项未选中,则不存值
       // $(".btscroll").css({'position':'fixed'})
       $(".foot").css({'display':'block'})
-      document.activeElement.scrollIntoView({behavior: "smooth"})
+      document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
       // document.activeElement.scrollIntoViewIfNeeded(true);
       // setTimeout(()=>{
       //   document.activeElement.scrollIntoViewIfNeeded(true);

+ 1 - 1
src/common/OptionInp.vue

@@ -50,7 +50,7 @@ import $ from 'jquery';
       handleBlur(){
           // $(".btscroll").css({'position':'fixed'})
         $(".foot").css({'display':'block'})
-        document.activeElement.scrollIntoView({behavior: "smooth"})
+        document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
         // document.activeElement.scrollIntoViewIfNeeded(true);
         // setTimeout(()=>{
         //   document.activeElement.scrollIntoViewIfNeeded(true);

+ 1 - 1
src/components/Login.vue

@@ -106,7 +106,7 @@ export default {
       // if(MobileDevice.getModels().join(' or ').indexOf('6') == -1){
       //   document.activeElement.scrollIntoViewIfNeeded(true);      
       //   setTimeout(() => {
-          document.activeElement.scrollIntoView({behavior: "smooth"})
+          document.activeElement.scrollIntoView({behavior: "smooth",block:'end'})
       //     document.activeElement.scrollIntoViewIfNeeded(true);
       //   }, 300);
       // }