当前位置:   article > 正文

全局修改element默认配置_element ui 全局配置

element ui 全局配置

在main.js中全局修改element默认配置

main.js

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 全局修改element默认配置
// el-form 表单
// clearable 可清除 默认显示小叉号
ElementUI.Input.props.clearable = {type: Boolean, default: true}
ElementUI.Select.props.clearable = {type: Boolean, default: true}
ElementUI.Cascader.props.clearable = {type: Boolean, default: true}
// placeholder 默认空
ElementUI.Select.props.placeholder = {type: String, default: ''}
ElementUI.Cascader.props.placeholder = {type: String, default: ''}
// el-table 表格
// min-width 默认最小列宽 120px
ElementUI.TableColumn.props.minWidth = {type: String, default: '120'}
// show-overflow-tooltip 默认 true
ElementUI.TableColumn.props.showOverflowTooltip = {type: Boolean, default: true}
// 解决弹窗导致的页面抖动问题
ElementUI.Dialog.props.lockScroll.default = false;
Vue.use(ElementUI)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/332366
推荐阅读