当前位置: 首页 > news >正文

elementUI中的 “this.$confirm“ 基本用法,“this.$confirm“ 调换 “确认“、“取消“ 按钮的位置

文章目录

  • 前言
  • 具体操作
  • 总结


前言

elementUI中的 "this.$confirm" 基本用法,"this.$confirm" 调换 "确认"、"取消" 按钮的位置


具体操作

基本用法

<script>
this.$confirm('这是数据(res.data)', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',cancelButtonClass: 'custom-cancel-button',//添加样式,将确认与取消按钮调换位置type: 'warning',//设置弹框类型showCancelButton: false,  //是否显示取消按钮showClose: false, //是否显示右上角的xcloseOnClickModal: true, //是否可以点击空白处关闭弹窗}).then(() => {// this.$message({//   type: 'success',//   message: '删除成功!'// });}).catch(() => {// this.$message({//   type: 'info',//   message: '已取消删除'// });});
</script><style>
.el-message-box__btns {display: flex;flex-direction: row-reverse;
}
.custom-cancel-button {margin-left: 10px;
}
</style>

将确认与取消进行交换位置,添加css样式

在这里插入图片描述

CSS代码:

.el-message-box__btns {display: flex;flex-direction: row-reverse;
}
.custom-cancel-button {margin-left: 10px;
}

总结

elementUI中的 "this.$confirm" 基本用法,"this.$confirm" 调换 "确认"、"取消" 按钮的位置,添加一个类和css代码


http://www.lryc.cn/news/260591.html

相关文章:

  • K8S 常用命令
  • 12.使用 Redis 优化登陆模块
  • Nacos-NacosRule 负载均衡—设置集群使本地服务优先访问
  • 软件设计师——信息安全(二)
  • Unity中实现ShaderToy卡通火(原理实现篇)
  • 引迈信息-JNPF平台怎么样?值得入手吗?
  • 大数据云计算——使用Prometheus-Operator进行K8s集群监控
  • [蓝桥杯刷题]合并区间、最长不连续子序列、最长不重复数组长度
  • Hazel引擎学习(十二)
  • 中文字符串逆序输出
  • MySQL BinLog 数据还原恢复
  • 理想汽车校招内推--大量hc等你来
  • RabbitMQ死信队列详解
  • 计算机网络:物理层(编码与调制)
  • 嵌入式开发板qt gdb调试
  • 基于python实现原神那维莱特开转脚本
  • C# 实现Lru缓存
  • 牛客网BC107矩阵转置
  • 协作办公原来如此简单?详解 ONLYOFFICE 协作空间 2.0 更新
  • 2023年国赛高教杯数学建模A题定日镜场的优化设计解题全过程文档及程序
  • c/c++ 结构体、联合体、枚举
  • stl模板库成员函数重载类型混肴编译不通过解决方法
  • MySQL——表的约束
  • cordic 算法学习记录
  • 【STM32】电机驱动
  • csp 如此编码 C语言(回归唠嗑版)
  • 或许是全网最全的延迟队列
  • C语言结构体小项目之通讯录代码实现+代码分析
  • tp5 rewrite nginx重写
  • .NET 反射优化的经验分享