liyongli 2 yıl önce
ebeveyn
işleme
3114ffbceb
1 değiştirilmiş dosya ile 3 ekleme ve 9 silme
  1. 3 9
      src/view/chatGptChatNew/index.vue

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

@@ -68,7 +68,7 @@ const userData = ref(window.$shanshipin || {});
 const chat = ref([]);
 const load = ref(false);
 const chatEle = ref(null);
-const inputText = ref(' ');
+const inputText = ref('');
 
 if (!userData.value.UserId) {
   chat.value.push(
@@ -134,14 +134,8 @@ function saveText() {
     });
 }
 function focus() {
-  let t = setTimeout(() => {
-    chatEle.value && (chatEle.value.scrollTop = chatEle.value.scrollHeight);
-    window.clearTimeout(t);
-    let ele = document.getElementById('van-field-6-input');
-    if (!ele) return;
-    ele.scrollIntoView(true);
-    ele.scrollIntoViewIfNeeded();
-  }, 500);
+  inputText.value = ' ';
+  
 }
 </script>
 <style lang="scss">