| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /**
- * 打开/切换到新页签
- * @param xtype: view xtype
- * @param title: 标题
- * @param id: id
- * @param config: 绑定到view的其他配置
- */
- function openTab(xtype, title, id, config) {
- var mainTab = Ext.getCmp('main-tab-panel');
- var panel = Ext.getCmp(id);
- if(!panel) {
- panel = Ext.create('saas.view.core.tab.Panel', {
- id: id,
- title: title,
- viewType: xtype,
- viewConfig: config
- });
- Ext.suspendLayouts();
- mainTab.setActiveTab(mainTab.add(panel));
- Ext.resumeLayouts(true);
- }else {
- mainTab.setActiveTab(panel);
- }
- }
- /**
- * 显示toast提示
- * @param content: 内容
- * @param title: 标题
- *
- */
- function showToast(content, title) {
- Ext.toast({
- html: content,
- title: title,
- closable: false,
- align: 't',
- slideDUration: 400,
- maxWidth: 400
- });
- }
|