转换为elementUI提示方法为uni-app的showToast提示

 

// 转换为elementUI提示方法为uni-app的showToast提示----------------------------------------
// 一般提示
Vue.prototype.$message = function(title) {
	title && uni.showToast({
		icon: `none`,
		title
	});
};
// 成功提示
Vue.prototype.$message.success = (title) => {
	title && uni.showToast({
		title
	});
};
// 失败提示
Vue.prototype.$message.error = (title) => {
	title && uni.showToast({
		icon: `error`,
		title
	});
};
// 警告提示
Vue.prototype.$message.warning = (title) => {
	title && uni.showToast({
		icon: `exception`,
		title
	});
};

MessageBox 弹框 全局方法$msgbox, $alert, $confirm 和 $prompt常用代码片段_setup使用$msgbox-CSDN博客文章浏览阅读302次。【代码】MessageBox 弹框 全局方法$msgbox, $alert, $confirm 和 $prompt常用代码片段。_setup使用$msgboxhttps://blog.csdn.net/qq_37860634/article/details/137027367

最近更新

  1. TCP协议是安全的吗?

    2024-04-20 15:32:06       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-20 15:32:06       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-20 15:32:06       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-20 15:32:06       20 阅读

热门阅读

  1. 带你认识Selenium函数

    2024-04-20 15:32:06       13 阅读
  2. 华为配置 dhcp snooping

    2024-04-20 15:32:06       14 阅读
  3. Yarn--npm Windows安装使用

    2024-04-20 15:32:06       15 阅读
  4. 探索人工智能:AI如何改变我们的工作和生活

    2024-04-20 15:32:06       13 阅读
  5. 应急响应流程

    2024-04-20 15:32:06       15 阅读
  6. 安卓手机APP开发__媒体开发部分__直播流

    2024-04-20 15:32:06       17 阅读
  7. web server apache tomcat11-02-setup 启动

    2024-04-20 15:32:06       12 阅读
  8. 基于python的pdf版本的PPT转换为office PPT

    2024-04-20 15:32:06       13 阅读
  9. mariadb 添加新用户,并给新用户对应权限

    2024-04-20 15:32:06       19 阅读