Browse Source

combo 支持 dict

luoyifan 2 năm trước cách đây
mục cha
commit
34330b3ae2
2 tập tin đã thay đổi với 14 bổ sung4 xóa
  1. 13 3
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 13 - 3
dist/yvan-ext.js

@@ -61432,6 +61432,7 @@ define(['exports', 'sql-formatter'], function (exports, sqlFormatter) { 'use str
         }
         return;
     }
+    //# sourceMappingURL=lib.js.map
 
     /**
      * 全局 ajax 方法
@@ -131242,13 +131243,16 @@ define(['exports', 'sql-formatter'], function (exports, sqlFormatter) { 'use str
 
     function initCombo () {
         var cc = Ext.form.field.ComboBox.prototype.constructor;
-        var _a = Ext.form.field.ComboBox.prototype, initComponent = _a.initComponent, setData = _a.setData;
+        var _a = Ext.form.field.ComboBox.prototype, initComponent = _a.initComponent, setData = _a.setData, setStore = _a.setStore;
         Ext.form.field.ComboBox.override({
             constructor: function (config) {
                 var newConfig = lodash.defaultsDeep({
                 // 强制性属性
                 }, baseConfig(config, 'col-item'), config, combo);
-                if (typeof newConfig.store == 'undefined') {
+                if (typeof config.dict === 'string') {
+                    window['yvanLib'].system.getDict(config.dict)(this, newConfig);
+                }
+                else if (typeof newConfig.store == 'undefined') {
                     if (lodash.isArray(newConfig.data)) {
                         // ExtJS 无法直接接受数组模式
                         newConfig.store = {
@@ -131267,6 +131271,13 @@ define(['exports', 'sql-formatter'], function (exports, sqlFormatter) { 'use str
                 }
                 cc.call(this, newConfig);
             },
+            setDict: function (bizKey) {
+                window['yvanLib'].system.getDict(bizKey)(this, this.config);
+                this.dict = bizKey;
+            },
+            getDict: function () {
+                return this.dict;
+            },
             setData: function (value) {
                 if (!value) {
                     return;
@@ -131372,7 +131383,6 @@ define(['exports', 'sql-formatter'], function (exports, sqlFormatter) { 'use str
             }
         });
     }
-    //# sourceMappingURL=combo.js.map
 
     function initComboGridMulti () {
         Ext.define('Yvan.LocalComboGrid', {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
dist/yvan-ext.js.map