Because the writing is very ordinary, so write together, this passed this
//Pop-up message
function alertMessage(th,action,a){
var msg,type;
switch(a){
case '1':
type='success';
msg = action+'success';
break;
case '2':
type='warning';
msg = action;
break;
case '3':
type='info';
msg = 'cancel'+action;
break;
case '4':
type='error';
msg = action+'fail';
break;
default:
break;
}
th.$message({
message: msg,
type: type,
});
}
Simplified, the message content is more free, but it will be more written when used
//Pop-up message
alertMessage(th,action,msg){
this.$message({
message: msg,
type: action,
});
},
Read More:
- Springmvc response. Senderror() custom message prompt
- Git prompt this. $message is not a function?
- How to Debug ‘The System cannot Execute the specified program’ message.
- Solution to Vue cli · failed to download repo vuejs templates/webpack: connect etimeout followed by an IP digital error message
- Solution of “serve with message ‘spawn Vue cli service enoent”
- How to solve the problem of “please enter a commit message to explain why this merge is necessary” when git merges branches?
- The Vue mobile terminal cannot use string.replaceall, and the error message is blank
- IT Skill: How to Recall Email Message in Outlook 2007
- Vue Error-Error message: Syntax Error: Assigning to rvalue.
- How to remove the message “Membership credential verification failed.” displayed in the Event Log
- How to Fix Gtk-Message: Failed to load module “canberra-gtk-module”
- How to Solve Vue Command Not Work Issue in win7_64
- How to Fix “the data of store is lost after Vue refreshes the page”
- Command prompt window prompt system error 5, access denied?
- How to solve the cross domain problem of Axios in Vue project
- New user’s shell, delete prompt ^ H, up and down prompt ^ A ^ B, tab key is useless
- Zend studio HTML error prompt close, PHP “error prompt” open and close the correct way
- Message: failed to decode response from marionette
- [Solved] Logon failed, use ctrl+c to cancel basic credential prompt. unable to access
- Sys.webforms.pagerequestmanagerparsererrorexception: unable to parse message received from server