liyongli před 2 roky
rodič
revize
843b18ed11
1 změnil soubory, kde provedl 6 přidání a 3 odebrání
  1. 6 3
      src/view/chatGptChatNew/index.vue

+ 6 - 3
src/view/chatGptChatNew/index.vue

@@ -134,9 +134,12 @@ function saveText() {
     });
 }
 function focus() {
-//   chatEle.value.scrollTop = chatEle.value.scrollHeight;
-  document.getElementById('van-field-6-input') &&
-    document.getElementById('van-field-6-input').scrollIntoView();
+  //   chatEle.value.scrollTop = chatEle.value.scrollHeight;
+  let t = setTimeout(() => {
+    window.clearTimeout(t);
+    document.getElementById('van-field-6-input') &&
+      document.getElementById('van-field-6-input').scrollIntoView();
+  }, 500);
 }
 </script>
 <style lang="scss">