This commit is contained in:
pengxiaolong
2025-05-13 19:39:53 +08:00
parent 37da6765b8
commit c006a8e63d
1232 changed files with 96963 additions and 883 deletions

View File

@@ -0,0 +1,29 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const TUIKit_components_common_Toast_type = require("./type.js");
const Toast = (options) => {
common_vendor.i.showToast({
title: options.message || "Toast",
duration: options.duration || 1500,
icon: handleIconType(options.type)
});
};
const handleIconType = (type) => {
if (!type) {
return "none";
}
switch (type) {
case TUIKit_components_common_Toast_type.TOAST_TYPE.ERROR:
return "none";
case TUIKit_components_common_Toast_type.TOAST_TYPE.WARNING:
return "none";
case TUIKit_components_common_Toast_type.TOAST_TYPE.SUCCESS:
return "success";
case TUIKit_components_common_Toast_type.TOAST_TYPE.NORMAL:
return "none";
default:
return "none";
}
};
exports.Toast = Toast;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/common/Toast/index.js.map

View File

@@ -0,0 +1,9 @@
"use strict";
const TOAST_TYPE = {
SUCCESS: "success",
WARNING: "warning",
ERROR: "error",
NORMAL: "normal"
};
exports.TOAST_TYPE = TOAST_TYPE;
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/TUIKit/components/common/Toast/type.js.map