Browse Source

showToast自定义属性

zhuth 7 years ago
parent
commit
de04f2be60
1 changed files with 6 additions and 6 deletions
  1. 6 6
      frontend/saas-web/app/util/BaseUtil.js

+ 6 - 6
frontend/saas-web/app/util/BaseUtil.js

@@ -54,8 +54,8 @@ Ext.define('saas.util.BaseUtil', {
          * @param title: 标题
          * @param title: 标题
          * 
          * 
          */
          */
-        showSuccessToast: function (content, title) {
-            Ext.toast({
+        showSuccessToast: function (content, title, configs) {
+            Ext.toast(Ext.Object.merge({
                 cls:'x-toast-success',
                 cls:'x-toast-success',
                 html: content,
                 html: content,
                 title: title,
                 title: title,
@@ -64,11 +64,11 @@ Ext.define('saas.util.BaseUtil', {
                 autoCloseDelay:3000,
                 autoCloseDelay:3000,
                 autoClose:true,
                 autoClose:true,
                 maxWidth: 400
                 maxWidth: 400
-            });
+            }, configs));
         },
         },
 
 
-        showErrorToast: function (content, title) {
-            Ext.toast({
+        showErrorToast: function (content, title, configs) {
+            Ext.toast(Ext.Object.merge({
                 cls:'x-toast-error',
                 cls:'x-toast-error',
                 html: content,
                 html: content,
                 title: title,
                 title: title,
@@ -77,7 +77,7 @@ Ext.define('saas.util.BaseUtil', {
                 autoCloseDelay:3000,
                 autoCloseDelay:3000,
                 autoClose:true,
                 autoClose:true,
                 maxWidth: 400
                 maxWidth: 400
-            });
+            }, configs));
         },
         },
 
 
         /**
         /**