Explorar o código

textfield scancode 事件

luoyifan %!s(int64=3) %!d(string=hai) anos
pai
achega
ed63df9232
Modificáronse 2 ficheiros con 35 adicións e 21 borrados
  1. 34 20
      dist/yvan-ext-mobile.js
  2. 1 1
      dist/yvan-ext-mobile.js.map

+ 34 - 20
dist/yvan-ext-mobile.js

@@ -37747,7 +37747,6 @@ define(['exports'], function (exports) { 'use strict';
           }
       });
   }
-  //# sourceMappingURL=lib.js.map
 
   var Scope = /** @class */ (function () {
       function Scope(_a) {
@@ -38157,7 +38156,6 @@ define(['exports'], function (exports) { 'use strict';
       Scope.SHOW_PAGE_STACK = [];
       return Scope;
   }());
-  //# sourceMappingURL=Scope.js.map
 
   /**
    * 全局 ajax 方法
@@ -38255,7 +38253,6 @@ define(['exports'], function (exports) { 'use strict';
       });
       return found >= ws.length;
   }
-  //# sourceMappingURL=config.js.map
 
   function initComponent () {
       var ct = Ext.Component.prototype.constructor;
@@ -38272,7 +38269,6 @@ define(['exports'], function (exports) { 'use strict';
           }
       });
   }
-  //# sourceMappingURL=component.js.map
 
   var labelWidth = 80;
   var date = {
@@ -38336,6 +38332,11 @@ define(['exports'], function (exports) { 'use strict';
       exportExcelCurrentPage: 1,
       exportExcelTotal: 0,
   };
+  var text = {
+      labelTextAlign: 'right',
+      labelWidth: labelWidth,
+      msgTarget: 'qtip',
+  };
   var storeAjax = {
       timeout: 60000
   };
@@ -38371,7 +38372,6 @@ define(['exports'], function (exports) { 'use strict';
           flex: 1
       },
   };
-  //# sourceMappingURL=Defaults.js.map
 
   /**
    * 创建一个 Ajax 客户端
@@ -38544,7 +38544,6 @@ define(['exports'], function (exports) { 'use strict';
       };
       xhr.send(formData);
   }
-  //# sourceMappingURL=ajax.js.map
 
   function prompt(message, multiLine, value) {
       if (value === void 0) { value = ''; }
@@ -38650,7 +38649,6 @@ define(['exports'], function (exports) { 'use strict';
           $w.remove();
       }, 3000);
   }
-  //# sourceMappingURL=message.js.map
 
   var SIMPLE_RE = /^(?:\{(?:(\d+)|([a-z_][\w\.]*))\})$/i;
   /**
@@ -39826,7 +39824,6 @@ define(['exports'], function (exports) { 'use strict';
           err: err
       };
   }
-  //# sourceMappingURL=systemLib.js.map
 
   var SystemLib = /*#__PURE__*/Object.freeze({
     __proto__: null,
@@ -39870,7 +39867,6 @@ define(['exports'], function (exports) { 'use strict';
       }
       return date;
   }
-  //# sourceMappingURL=utils.js.map
 
   function initDate () {
       var cc = Ext.field.Date.prototype.constructor;
@@ -39939,6 +39935,34 @@ define(['exports'], function (exports) { 'use strict';
       });
   }
 
+  function initText () {
+      var cc = Ext.field.Text.prototype.constructor;
+      var _a = Ext.field.Text.prototype, initialize = _a.initialize, getValue = _a.getValue, valueToRaw = _a.valueToRaw, onPickerChange = _a.onPickerChange;
+      Ext.field.Text.override({
+          constructor: function (config) {
+              var newConfig = lodash.defaultsDeep({
+              // 强制属性
+              }, text, config);
+              cc.call(this, newConfig);
+          },
+          initialize: function () {
+              var that = this;
+              this.on({
+                  initialize: function () {
+                      $(this.el.dom).on('keyup', function (e) {
+                          if ([10, 13, 20].includes(e.keyCode)) {
+                              // const value = sender.getRawValue()
+                              // console.log('keyup2', value)
+                              that.fireEvent('scancode', that, e.target.value);
+                          }
+                      });
+                  }
+              });
+              initialize.call(this);
+          },
+      });
+  }
+
   /**
    * 构建所有组件的公共属性
    * @param config 原始config
@@ -39984,7 +40008,6 @@ define(['exports'], function (exports) { 'use strict';
       }
       return config;
   }
-  //# sourceMappingURL=base.js.map
 
   /**
    * 构建一个 grid 支持的 dataSource
@@ -40123,7 +40146,6 @@ define(['exports'], function (exports) { 'use strict';
           }
       });
   }
-  //# sourceMappingURL=stores.js.map
 
   function initList () {
       Ext.define('Yvan.List', {
@@ -40267,7 +40289,6 @@ define(['exports'], function (exports) { 'use strict';
       }
       // throw new TypeError('无法识别的调用方法')
   }
-  //# sourceMappingURL=list.js.map
 
   function initCols () {
       Ext.define('Yvan.Cols', {
@@ -40284,7 +40305,6 @@ define(['exports'], function (exports) { 'use strict';
           },
       });
   }
-  //# sourceMappingURL=cols.js.map
 
   var PropertyDescription = /** @class */ (function () {
       function PropertyDescription() {
@@ -40326,7 +40346,6 @@ define(['exports'], function (exports) { 'use strict';
       };
       return PropertyDescription;
   }());
-  //# sourceMappingURL=PropertyDescription.js.map
 
   var PropertyDescriptionTable = new Map();
   PropertyDescriptionTable.set('tabCell', new PropertyDescription({
@@ -40658,7 +40677,6 @@ define(['exports'], function (exports) { 'use strict';
           width, height
       ]
   }));
-  //# sourceMappingURL=PropertyDescriptionTable.js.map
 
   function initGrid () {
       Ext.define('Yvan.Grid', {
@@ -41141,7 +41159,6 @@ define(['exports'], function (exports) { 'use strict';
       }
       // throw new TypeError('无法识别的调用方法')
   }
-  //# sourceMappingURL=grid.js.map
 
   function initGridColumn () {
       var ct = Ext.grid.column.Column.prototype.constructor;
@@ -41174,7 +41191,6 @@ define(['exports'], function (exports) { 'use strict';
       //     }
       // });
   }
-  //# sourceMappingURL=gridcolumn.js.map
 
   function initLocale() {
       Ext.define('Ext.locale.zh_CN.Panel', {
@@ -41218,7 +41234,6 @@ define(['exports'], function (exports) { 'use strict';
       //     }
       // });
   }
-  //# sourceMappingURL=locale-zh_CN.js.map
 
   var FixClass = /** @class */ (function () {
       function FixClass() {
@@ -41265,7 +41280,6 @@ define(['exports'], function (exports) { 'use strict';
       ], FixClass.prototype, "fix", null);
       return FixClass;
   }());
-  //# sourceMappingURL=fix.js.map
 
   function init() {
       Ext.util.Format.defaultDateFormat = 'Y-m-d';
@@ -41337,6 +41351,7 @@ define(['exports'], function (exports) { 'use strict';
       lodash.extend(window['system'], SystemLib);
       initComponent();
       initDate();
+      initText();
       initList();
       initCols();
       initLocale();
@@ -41344,7 +41359,6 @@ define(['exports'], function (exports) { 'use strict';
       initGrid();
       initStores();
   }
-  //# sourceMappingURL=init.js.map
 
   exports.Lib = Lib;
   exports.LibParam = LibParam;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 1 - 1
dist/yvan-ext-mobile.js.map