Browse Source

openTab方法完善

zhuth 7 years ago
parent
commit
cc8d6355da

+ 7 - 3
frontend/saas-web/app/view/core/tab/Controller.js

@@ -5,11 +5,15 @@ Ext.define('saas.view.core.tab.Controller', {
     init: function() {
         var me = this,
         tab = me.getView(),
-        viewType = tab.viewType;
+        viewType = tab.viewType,
+        viewConfig = tab.viewConfig;
 
-        tab.add({
+        var view = {
             xtype: viewType
-        });
+        };
+        Ext.apply(view, viewConfig);
+
+        tab.add(view);
     },
 
 });

+ 2 - 3
frontend/saas-web/overrides/i18n.js

@@ -7,11 +7,10 @@ function openTab(xtype, title, id, config) {
         panel = Ext.create('saas.view.core.tab.Panel', {
             id: id,
             title: title,
-            viewType: xtype
+            viewType: xtype,
+            viewConfig: config
         });
 
-        Ext.apply(panel, config);
-
         Ext.suspendLayouts();
         mainTab.setActiveTab(mainTab.add(panel));
         Ext.resumeLayouts(true);