Explorar o código

添加ai对话框

xiaoguang_li hai 1 mes
pai
achega
276a704e77
Modificáronse 1 ficheiros con 6 adicións e 7 borrados
  1. 6 7
      desktop/core/src/desktop/templates/assist.mako

+ 6 - 7
desktop/core/src/desktop/templates/assist.mako

@@ -2849,13 +2849,6 @@ from desktop.views import _ko
         huePubSub.subscribeOnce('set.active.snippet.type', updateType);
         huePubSub.publish('get.active.snippet.type');
 
-        var autoResize = function (data, event) {
-          var inputArea = event.target;
-          inputArea.style.height = 'auto';
-          inputArea.style.height = inputArea.scrollHeight + 'px';
-        };
-
-        autoResize();
       }
 
       ChatPanel.prototype.dispose = function () {
@@ -2886,6 +2879,12 @@ from desktop.views import _ko
 
       };
 
+      ChatPanel.prototype.autoResize = function (data, event) {
+        let inputArea = event.target;
+        inputArea.style.height = 'auto';
+        inputArea.style.height = inputArea.scrollHeight + 'px';
+      };
+
       ko.components.register('chat-panel', {
         viewModel: ChatPanel,
         template: { element: 'chat-panel-template' }