首页 > 其他分享 >全局设置element-ui Dialog组件的close-on-click-modal属性为false

全局设置element-ui Dialog组件的close-on-click-modal属性为false

时间:2024-05-22 22:29:20浏览次数:16  
标签:false modal ElementUI element ui Dialog

前言

element组件库的Dialog对话框默认可以通过点击 modal 关闭 Dialog,即点击空白处弹框可关闭。

属性

 

 

复制代码
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css' // 默认主题
 
//全局修改默认配置,点击空白处不能关闭弹窗
ElementUI.Dialog.props.closeOnClickModal.default = false
console.log(ElementUI.Dialog)
Vue.use(ElementUI)
复制代码

 

标签:false,modal,ElementUI,element,ui,Dialog
From: https://www.cnblogs.com/chinasoft/p/18207279

相关文章

  • element ui 动态表头不刷新问题
    今天弄vue前端,动态表头出现如题问题。代码如下<el-table-columnv-for="(item,index)intableHeads":key="index"><templateslot="header">//处理表头业务逻辑……<div>{{item.num}}</div></template></el-table-column>......
  • 离线文档(vue/react/element/element-plus/ands vue等等)
    特殊环境需要离线状态文档的请参考这里 可以在你所想要的东西在github的官方项目上找一个名字包含‘gh-page’或者‘get-page’的分支下载下来然后本地win+Rcmd输入npminstallsgo-g全局下载sgo之后在你下载下来的文件夹根目录cmd打开终端输入sgo--fallindex.html......
  • WPF mvvm find element by name
    Copyfrom https://stackoverflow.com/questions/636383/how-can-i-find-wpf-controls-by-name-or-type //xaml<Windowx:Class="WpfApp102.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmln......
  • Vue+Element UI实现CRUD
    vue.config.js//导入defineConfig函数const{defineConfig}=require('@vue/cli-service')//将defineConfig函数的结果导出module.exports=defineConfig({//转译依赖项transpileDependencies:true,//开发服务器配置devServer:{//指定服务器端口p......
  • HTML 30 - Layout Elements
     TheLayoutElementsofHTMLInHTML,therearevarioussemanticelementsthatareusedtodefinedifferentpartsofawebpagemakingitvisuallyappealinganduser-friendly.Thesesemanticelementsarecollectivelytermedaslayoutelements.Eacheleme......
  • HTML 26 - Head Element
     TheHTMLheaderTheheaderpartofanHTMLdocumentisrepresentedbythe<head>tag.Itserveasacontainerofvariousotherimportanttagslike<title>,<meta>,<link>,<base>,<style>,<script>,and<nosc......
  • elementUI 使用 el-select 的远程搜索功能,导致数据无法回显怎么解决?
    问题:解决方法:在数据初始化的时候将获取到的数据做进一步的处理,进行本地select组件的一个添加constlabels=[];constvalues=[];res.data.rows.forEach((ele)=>{labels.push(ele.buildName);values.push(ele.buildCode)......
  • element-plus丑陋的使用
     所花时间(包括上课): 4 h代码量(行): 400   左右搏客量(篇):1了解到的知识点: element-plus的使用备注(其他): <template><div><el-form:model="form":rules="rules"ref="form"label-width="100px">......
  • element-plus table部分列根据接口返回key展示
    实现效果根据刷选年份返回对应年份作为部分列1.处理接口数据接口返回数据格式需要处理成 处理过程data.message&&data.message.forEach((item:any)=>{letobj={}for(varkeyinitem){if(Number(key)){......
  • vue3 elementplus样式
    科技感日期选择器样式.data_screen.el-picker-panel__footer{color:#87CEEB;background:#00122a;border-top:1pxsolid#274954;}.data_screen.el-picker-panel{color:#87CEEB;background:#00122a;border:1pxsolid#274954;}.data_screen.el-picker-pane......