瀏覽代碼

combogrid 允许自行输入

zhangzaipeng 3 年之前
父節點
當前提交
a429589741
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      src/controls/input/combogrid.js

+ 7 - 3
src/controls/input/combogrid.js

@@ -35,6 +35,7 @@ export default function () {
 
 
         editable: true,
         editable: true,
         _superBlur: false,
         _superBlur: false,
+        allowCustomInput: false,
 
 
         initComponent() {
         initComponent() {
             const that = this
             const that = this
@@ -87,8 +88,11 @@ export default function () {
                                 that.onTriggerClick(that, that.getPickerTrigger(), e);
                                 that.onTriggerClick(that, that.getPickerTrigger(), e);
                                 return
                                 return
                             }
                             }
-                            // 取消 keyup 事件,让 ext 不要吧当前输入的值记录到 value 中
-                            stopEvent(e)
+
+                            if(!that.allowCustomInput) {
+                                // 取消 keyup 事件,让 ext 不要吧当前输入的值记录到 value 中
+                                stopEvent(e)
+                            }
                         })
                         })
                         $dom.on('change', e => {
                         $dom.on('change', e => {
                             if (that.isExpanded) {
                             if (that.isExpanded) {
@@ -403,4 +407,4 @@ export default function () {
         }
         }
     });
     });
 
 
-}
+}