This commit is contained in:
2024-11-01 23:53:45 +08:00
parent e4fe97f5e5
commit 673a982014
26 changed files with 2639 additions and 27 deletions

View File

@@ -256,19 +256,19 @@ export class Message {
remove();
};
};
success = (message, timeout = 1000, onClose) => {
success = (message, timeout = 1000, onClose = () => {}) => {
return this.open(message, timeout, onClose, { type: 'success' });
};
info = (message, timeout = 1500, onClose) => {
info = (message, timeout = 1500, onClose = () => {}) => {
return this.open(message, timeout, onClose, { type: 'info' });
};
warning = (message, timeout = 3000, onClose) => {
warning = (message, timeout = 3000, onClose = () => {}) => {
return this.open(message, timeout, onClose, { type: 'warning' });
};
error = (message, timeout = 3000, onClose) => {
error = (message, timeout = 3000, onClose = () => {}) => {
return this.open(message, timeout, onClose, { type: 'error' });
};
loading = (message, timeout = 0, onClose) => {
loading = (message, timeout = 0, onClose = () => {}) => {
return this.open(message, timeout, onClose, { type: 'loading' });
};
}