Jelajahi Sumber

添加ai对话框

xiaoguang_li 1 bulan lalu
induk
melakukan
46fac58b67
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      desktop/core/src/desktop/templates/assist.mako

+ 4 - 2
desktop/core/src/desktop/templates/assist.mako

@@ -2820,8 +2820,10 @@ from desktop.views import _ko
         self.query.subscribe(function (newValue, oldValue) {
             let inputTextArea = $('.user-input')[0]
             if (inputTextArea) {
-                console.log(new Date() + "  old:" + oldValue +" -> new:" +newValue )
-                self.autoResize(null, { target: inputTextArea } );
+                console.log(new Date() + "  change old:" + oldValue +" -> new:" +newValue )
+                ko.tasks.schedule(function() {
+                  self.autoResize(null, { target: inputTextArea });
+                });
             }
         });
         self.availableTypes().forEach(function (type) {