|
@@ -27,7 +27,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
|
@@ -27,7 +27,7 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
27
|
minus = "";
|
27
|
minus = "";
|
28
|
}
|
28
|
}
|
29
|
|
29
|
|
30
|
- if ($('.ez_tips').size() == 0 || $('.ez_tips').size() < options.limit) {
|
30
|
+ if (($('.ez_tips').size() == 0 || $('.ez_tips').size() < options.limit) && (options.toastType!='faultinfo' && options.toastType!='faultprogress' && options.toastType!='faultover')) {
|
31
|
|
31
|
|
32
|
var container = "<div class='ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%)></div>"
|
32
|
var container = "<div class='ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%)></div>"
|
33
|
|
33
|
|
|
@@ -97,13 +97,16 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
|
@@ -97,13 +97,16 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
97
|
},1);
|
97
|
},1);
|
98
|
$(options.dom).append(newContainer);
|
98
|
$(options.dom).append(newContainer);
|
99
|
} else if(options.toastType=='faultinfo'||options.toastType=='faultprogress'||options.toastType=='faultover'){
|
99
|
} else if(options.toastType=='faultinfo'||options.toastType=='faultprogress'||options.toastType=='faultover'){
|
100
|
- var container = "<div class='fault_ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;bottom: 319px;transform:translateX("+minus+"110%);></div>"
|
|
|
101
|
|
100
|
|
102
|
- var head = "<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>";
|
101
|
+ var container = "<div class='fault_ez_tips "+options.toastType+"' style="+firstDirection+":"+options.margin+"px;transform:translateX("+minus+"110%);width: 226px;bottom: 8px !important; ></div>"
|
|
|
102
|
+
|
|
|
103
|
+ // var head = "<div class='faultTitle faultClearfix'><i class='faultTips_icon_l fl'></i><i class='FaultTips_icon_r close'></i></div>";
|
|
|
104
|
+ var head = "";
|
103
|
|
105
|
|
104
|
var content = "<div class='FaultTips-message' style='cursor: pointer; display: flex;justify-content: flex-end;'></div>"
|
106
|
var content = "<div class='FaultTips-message' style='cursor: pointer; display: flex;justify-content: flex-end;'></div>"
|
105
|
|
107
|
|
106
|
- var newHead = $(head).append(options.title);
|
108
|
+ // var newHead = $(head).append(options.title);
|
|
|
109
|
+ var newHead = "";
|
107
|
|
110
|
|
108
|
var newContent = $(content).append(options.message)
|
111
|
var newContent = $(content).append(options.message)
|
109
|
|
112
|
|
|
@@ -122,7 +125,9 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
|
@@ -122,7 +125,9 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
122
|
var times = Date.now();
|
125
|
var times = Date.now();
|
123
|
$(newContainer).css({
|
126
|
$(newContainer).css({
|
124
|
'transition-timing-function':options.timingFun,
|
127
|
'transition-timing-function':options.timingFun,
|
125
|
- 'width':options.width,
|
128
|
+ // 'width':options.width,
|
|
|
129
|
+ 'width':'226px',
|
|
|
130
|
+ 'bottom':'8px'
|
126
|
});
|
131
|
});
|
127
|
var height = $(newContainer).outerHeight(true);
|
132
|
var height = $(newContainer).outerHeight(true);
|
128
|
var len = $('.fault_ez_tips').size();
|
133
|
var len = $('.fault_ez_tips').size();
|
|
@@ -159,6 +164,13 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
|
@@ -159,6 +164,13 @@ layui.define(['layer', 'laytpl', 'form'], function (exports) { |
159
|
$(newContainer).remove();
|
164
|
$(newContainer).remove();
|
160
|
},700)
|
165
|
},700)
|
161
|
});
|
166
|
});
|
|
|
167
|
+ $(newContainer).find(".closeFault").click(function (event) {
|
|
|
168
|
+ event.stopPropagation();
|
|
|
169
|
+ $(newContainer).removeClass('active');
|
|
|
170
|
+ setTimeout(function () {
|
|
|
171
|
+ $(newContainer).remove();
|
|
|
172
|
+ },700)
|
|
|
173
|
+ })
|
162
|
if (options.action) {
|
174
|
if (options.action) {
|
163
|
$(newContent).css('cursor','pointer').on(options.type,options.action);
|
175
|
$(newContent).css('cursor','pointer').on(options.type,options.action);
|
164
|
}
|
176
|
}
|