|
@@ -1,7 +1,3 @@
|
|
-require('./../images/toast-1.png').replace(/^undefined/g, '')
|
|
|
|
-require('./../images/toast-2.png').replace(/^undefined/g, '')
|
|
|
|
-require('./../images/toast-3.png').replace(/^undefined/g, '')
|
|
|
|
-require('./../images/toast-4.png').replace(/^undefined/g, '')
|
|
|
|
const transConf = function (arr) {
|
|
const transConf = function (arr) {
|
|
window.arr = arr;
|
|
window.arr = arr;
|
|
// var arr = [
|
|
// var arr = [
|
|
@@ -73,17 +69,19 @@ function toggleWarnBox(text) {
|
|
"toast": function (type, text, time = 3000, name, i) {
|
|
"toast": function (type, text, time = 3000, name, i) {
|
|
if ($('#toast:visible').length) {
|
|
if ($('#toast:visible').length) {
|
|
$("#toast").remove()
|
|
$("#toast").remove()
|
|
|
|
+ }
|
|
|
|
+ var typeClass = {
|
|
|
|
+ toast1: require('./../images/toast-1.png').replace(/^undefined/g, ''),
|
|
|
|
+ toast2: require('./../images/toast-2.png').replace(/^undefined/g, ''),
|
|
|
|
+ toast3: require('./../images/toast-3.png').replace(/^undefined/g, ''),
|
|
|
|
+ toast4: require('./../images/toast-4.png').replace(/^undefined/g, ''),
|
|
};
|
|
};
|
|
- const toast1 = require('./../images/toast-1.png').replace(/^undefined/g, '');
|
|
|
|
- const toast2 = require('./../images/toast-2.png').replace(/^undefined/g, '');
|
|
|
|
- const toast3 = require('./../images/toast-3.png').replace(/^undefined/g, '');
|
|
|
|
- const toast4 = require('./../images/toast-4.png').replace(/^undefined/g, '');
|
|
|
|
if (type == 'toast1' || type == 'toast2') {
|
|
if (type == 'toast1' || type == 'toast2') {
|
|
- $(name).find(".box[data-index=" + i + "] ").find(".moduleCenter").append(`<img id="toast" class="toast" src=${toast1}/>`)
|
|
|
|
|
|
+ $(name).find(".box[data-index=" + i + "] ").find(".moduleCenter").append(`<img id="toast" class="toast" src=${typeClass[type]}/>`)
|
|
} else {
|
|
} else {
|
|
- $(name).find(".moduleBox ").find(".pushItemBox[data-index=" + i + "] ").append(`<img id="toast" class="toast" src=${toast1}/>`)
|
|
|
|
|
|
+ console.log(123);
|
|
|
|
+ $(name).find(".moduleBox ").find(".pushItemBox[data-index=" + i + "] ").append(`<img id="toast" class="toast" src=${typeClass[type]}/>`)
|
|
}
|
|
}
|
|
-
|
|
|
|
$("#toast").fadeOut(time, function () {
|
|
$("#toast").fadeOut(time, function () {
|
|
$("#toast").remove()
|
|
$("#toast").remove()
|
|
});
|
|
});
|