Browse Source

title bind 的翻译问题

yuliang 2 years ago
parent
commit
a698945c30
2 changed files with 16 additions and 2 deletions
  1. 15 1
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 15 - 1
dist/yvan-ext.js

@@ -22426,7 +22426,7 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
         var ct = Ext.Component.prototype.constructor;
         Ext.Component.override({
             constructor: function (config) {
-                var _a;
+                var _a, _b;
                 if (!isDesignMode(this, config)) {
                     var me_1 = this;
                     // 任意组件 Ext.Component 构造时调用的方法, 可以用来在渲染之前加工处理 VJSON
@@ -22438,6 +22438,20 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
                     if (!config.i18nPath && ((_a = config.$initParent) === null || _a === void 0 ? void 0 : _a.i18nPath)) {
                         config.i18nPath = config.$initParent.i18nPath;
                     }
+                    if ((_b = config.$initParent) === null || _b === void 0 ? void 0 : _b.setTitle) {
+                        var setTitle_1 = config.$initParent.setTitle;
+                        var handel_1 = config.$initParent;
+                        config.$initParent.setTitle = function (title) {
+                            var t = { title: title };
+                            var WMSTranslate = window["WMSTranslate"];
+                            if (WMSTranslate) {
+                                if (typeof window['viewTranslate'] === 'function') {
+                                    window['viewTranslate'](t, title, "title");
+                                }
+                            }
+                            setTitle_1.call(handel_1, t.title);
+                        }.bind(config.$initParent);
+                    }
                     var WMSTranslate = window["WMSTranslate"];
                     if (WMSTranslate) {
                         if (typeof window['viewTranslate'] === 'function') {

File diff suppressed because it is too large
+ 1 - 1
dist/yvan-ext.js.map