Переглянути джерело

精简分页语言 / showDialog 设定 cw 变量 / isLoadFinish 变量

luoyifan 3 роки тому
батько
коміт
62e5400833
2 змінених файлів з 39 додано та 7 видалено
  1. 38 6
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 38 - 6
dist/yvan-ext.js

@@ -61444,6 +61444,10 @@ define(['exports'], function (exports) { 'use strict';
              * 业务模块的唯一编号
              */
             this.id = lodash.uniqueId('scope_');
+            /**
+             * onload 运行完成之后才会设置本标记为 true
+             */
+            this.isLoadFinish = false;
             this.model = model;
             this.originalVjson = lodash.cloneDeep(vjson);
             this.vjson = this.originalVjson; // this.buildVjson()
@@ -61549,11 +61553,12 @@ define(['exports'], function (exports) { 'use strict';
             win.addListener('afterrender', function (sender) {
                 // 调用onLoad回调
                 try {
-                    that.onLoad();
+                    that._onLoad();
                 }
                 catch (e) {
                     console.error('errorAt onLoad', e);
                 }
+                window['cw'] = that;
             });
             win.addListener('destroy', this._destroy.bind(this));
             win.show();
@@ -61593,7 +61598,7 @@ define(['exports'], function (exports) { 'use strict';
                 handle.addListener('afterrender', function (sender) {
                     // 调用onLoad回调
                     try {
-                        that.onLoad();
+                        that._onLoad();
                     }
                     catch (e) {
                         console.error('errorAt onLoad', e);
@@ -61634,7 +61639,7 @@ define(['exports'], function (exports) { 'use strict';
                         }
                         // 调用onLoad回调
                         try {
-                            that.onLoad();
+                            that._onLoad();
                         }
                         catch (e) {
                             console.error('errorAt onLoad', e);
@@ -61692,14 +61697,25 @@ define(['exports'], function (exports) { 'use strict';
             that.onDestroy();
             delete that._watchList;
             delete that._handle;
+            this.isLoadFinish = false;
         };
         /**
-         * 模块载入完成之后的回调
+         * 私有渲染完成后的回调
          */
-        Scope.prototype.onLoad = function () {
+        Scope.prototype._onLoad = function () {
+            var _this = this;
             if (exports.scopeOnLoad && typeof exports.scopeOnLoad === 'function') {
                 exports.scopeOnLoad(this);
             }
+            this.onLoad();
+            lodash.defer(function () {
+                _this.isLoadFinish = true;
+            });
+        };
+        /**
+         * 默认 渲染完成之后调用的函数
+         */
+        Scope.prototype.onLoad = function () {
         };
         /**
          * 组件卸载之后的回调
@@ -95691,6 +95707,7 @@ define(['exports'], function (exports) { 'use strict';
         }
         // throw new TypeError('无法识别的调用方法')
     }
+    //# sourceMappingURL=grid.js.map
 
     function initTextfield () {
         var cc = Ext.form.field.Text.prototype.constructor;
@@ -131524,6 +131541,22 @@ define(['exports'], function (exports) { 'use strict';
             override: "Ext.grid.filters.filter.Number",
             emptyText: "输入数字..."
         });
+        Ext.define("Ext.locale.zh_CN.toolbar.Paging", {
+            override: "Ext.PagingToolbar",
+            beforePageText: "第",
+            // update
+            afterPageText: "/{0}页",
+            // update
+            firstText: "第一页",
+            prevText: "上一页",
+            // update
+            nextText: "下一页",
+            lastText: "最后页",
+            refreshText: "刷新",
+            displayMsg: "总共 {2} 条",
+            // update
+            emptyMsg: '没有数据'
+        });
         /**
          * 改变事件的获取方式.
          * 具体见: ext-all-debug.js:23216 addListener
@@ -131588,7 +131621,6 @@ define(['exports'], function (exports) { 'use strict';
         initComboGridMulti();
         initIframe();
     }
-    //# sourceMappingURL=init.js.map
 
     exports.Defaults = Defaults;
     exports.ExcelImportDialog = ExcelImportDialog;

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
dist/yvan-ext.js.map