فهرست منبع

maint: code maintaince

wangweimin 4 سال پیش
والد
کامیت
ec9712a40a
4فایلهای تغییر یافته به همراه1 افزوده شده و 8 حذف شده
  1. 1 1
      pywebio/input.py
  2. 0 1
      pywebio/platform/tornado.py
  3. 0 1
      webiojs/src/models/input/file.ts
  4. 0 5
      webiojs/src/models/input/textarea.ts

+ 1 - 1
pywebio/input.py

@@ -393,7 +393,7 @@ def input_group(label='', inputs=None, valid_func=None, cancelable=False):
     item_valid_funcs = {}
     for single_input_return in inputs:
         try:
-            single_input_return.send(None)
+            single_input_return.send(None)  # 协程模式下,带有name参数的单项输入函数通过send(None)来获取协程参数
         except StopIteration as e:
             input_kwargs = e.args[0]
         except AttributeError:

+ 0 - 1
pywebio/platform/tornado.py

@@ -183,7 +183,6 @@ def start_server(applications, port=0, host='', debug=False,
        类型为列表时,函数名为任务名
 
        任务函数为协程函数时,使用 :ref:`基于协程的会话实现 <coroutine_based_session>` ;任务函数为普通函数时,使用基于线程的会话实现。
-    :param list allowed_origins: 除当前域名外,服务器还允许的请求的来源列表。
     :param int port: server bind port. set ``0`` to find a free port number to use
     :param str host: server bind host. ``host`` may be either an IP address or hostname.  If it's a hostname,
         the server will listen on all IP addresses associated with the name.

+ 0 - 1
webiojs/src/models/input/file.ts

@@ -55,7 +55,6 @@ export class File extends InputItem {
                     'filename': file.name,
                     'dataurl': fr.result as string
                 };
-                console.log(that.data_url_value);
             };
             fr.readAsDataURL(file);
         });

+ 0 - 5
webiojs/src/models/input/textarea.ts

@@ -65,11 +65,6 @@ export class Textarea extends InputItem {
                 CodeMirror.autoLoadMode(that.code_mirror, config.mode);
                 that.code_mirror.setSize(null, 20 * that.spec.rows);
             }, 100);
-
-            setTimeout(function () {  // 需要等待当前表单显示后,重新计算表单高度
-                // 重新计算表单高度
-                that.element.parents('.card').height('auto');
-            }, state.ShowDuration+40);
         }
 
         return this.element;