liyongli 2 anos atrás
pai
commit
843b18ed11
1 arquivos alterados com 6 adições e 3 exclusões
  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">