首页 > 其他分享 >Element 关闭图标区分关闭、取消、ESC

Element 关闭图标区分关闭、取消、ESC

时间:2022-10-14 13:33:07浏览次数:48  
标签:distinguishCancelAndClose val Element ESC 关闭 close

  • 使用 distinguishCancelAndClose 属性

关闭:close

取消:cacel

ESC:close

      Element.MessageBox.confirm('是否要离开?', '提示', {
        confirmButtonText: '返回',
        cancelButtonText: '离开',
        distinguishCancelAndClose: true
      }).then(() => {
        store.commit('reloadMenu')
      }).catch((val) => {
        console.log(val, 'val')
        if (val === 'close') {

        } else {

        }
      })

标签:distinguishCancelAndClose,val,Element,ESC,关闭,close
From: https://www.cnblogs.com/DL-CODER/p/16791336.html

相关文章

  • js关闭二维码
    关闭二维码<style>.box{width:300px;height:100px;margin:100pxauto;position:relative;......
  • vue+elementui+axios环境搭建
    1.去官网下载安装node.js,安装后用命令检测版本信息node-vnpm-v2.安装vue环境#安装淘宝npmnpminstall-gcnpm--registry=https://registry.npm.......
  • Vue3+Element-plus 报错记录
    目录Vue3+Element-plus报错记录报错信息错误场景还原问题排查错误代码el-select多选Vue3+Element-plus报错记录报错信息TypeError:Cannotreadpropertiesofnull......
  • Gitlab关闭停用其他不需要的组件
    默认运行的组件[root@gitlabopt]#gitlab-ctlstatusrun:alertmanager:(pid3474)1289193s;run:log:(pid1915)1260609srun:gitaly:(pid3581)1289192s;ru......
  • 15、vue+elementUI
    设置动态路由导航栏点击高亮点击查看代码<template><el-containerstyle="height:500px;border:1pxsolid#eee"><el-asidewidth="200px"style="bac......
  • [Typescript] 46. Medium - PickByType
    From T,pickasetofpropertieswhosetypeareassignableto U.ForExampletypeOnlyBoolean=PickByType<{name:stringcount:numberisReadonly:bo......
  • [Typescript] 47. Medium- StartsWith
    Implement StartsWith<T,U> whichtakestwoexactstringtypesandreturnswhether T startswith UForexampletypea=StartsWith<'abc','ac'>//expected......
  • [Typescript] 48. Medium - EndsWith
    Implement EndsWith<T,U> whichtakestwoexactstringtypesandreturnswhether T endswith UForexample:typea=EndsWith<'abc','bc'>//expectedtob......
  • ElementUI
    目录引入Element完整引入按需引入全局配置Loading加载动画element-Ui级联选择器选项封装绑定数据封装API:https://elemefe.github.io/element-react/#/zh-CN/quick-sta......
  • [Typescript] Abstract Classes
    Youcannotcreateainstanceofabstractclass.Anabstractclassmeantobeextended.abstractclassSize{constructor(publicsizes:string[]){}......