vue mint-ui 弹出框

function toast(title){  //提示
	vm.$toast({
	  message: title,
	  position: 'middle',
	  duration: 3000
	});
}

效果如下
在这里插入图片描述

function toastSuccess(title){ //成功提示
	vm.$toast({
	  message: title,
	  iconClass: 'icon icon-success' // (图标需自行准备)
	});
}	

效果如下
在这里插入图片描述

function loading(){ //加载中
	vm.$indicator.open({
		text: '加载中...',
  		spinnerType: 'fading-circle'
  	});
}
function loading(msg){ //加载中
	vm.$indicator.open({
		text: msg,
  		spinnerType: 'fading-circle'
  	});
}
function closeLoad(){ //关闭加载动画
	vm.$indicator.close();
}

效果如下
在这里插入图片描述

function alert(title){
	vm.$messagebox('提示', title);
}

效果如下
在这里插入图片描述
二次确定


function confirm(title){
	vm.$messagebox({
	  title: '提示',
	  message: title,
	  showCancelButton: true
	});
}
function confirm(title,succCallback){
	vm.$messagebox({
	  title: '提示',
	  message: title,
	  showCancelButton: true
	}).then(action => { 
	 if (action == 'confirm') {     //确认的回调
	 	succCallback();
	 }
 	});
}

效果如下:
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43248623/article/details/107280750