已解决
【Element UI】解决 el-dialog 弹框组件设置 custom-class 样式不生效问题
来自网友在路上 157857提问 提问时间:2023-10-07 17:55:22阅读次数: 57
最佳答案 问答题库578位专家为你答疑解惑
文章目录
- 问题描述
- 解决方法
问题描述
<template><el-dialog class="myDialog" v-model="show" title="弹窗" custom-class="customDialog"><div>弹窗内容</div></el-dialog>
</template>
<script>// 省略。。。。
</script>
<style lang="less" scoped>
/* 此次设置弹窗高度并不生效 */
.customDialog> .el-dialog__body {height: 85vh;
}
</style>
解决方法
- 去除
scoped
标识
<template><el-dialog class="myDialog" v-model="show" title="弹窗" custom-class="customDialog"><div>弹窗内容</div></el-dialog>
</template>
<script>// 省略。。。。
</script>
<style lang="less" scoped>
/* 此次设置弹窗高度并不生效 */
.customDialog> .el-dialog__body {height: 85vh;
}
</style>
<style lang="less">
/* 正常生效 */
.customDialog> .el-dialog__body {height: 85vh;
}
</style>
查看全文
99%的人还看了
相似问题
- Python通过selenium调用IE11浏览器报错解决方法
- ChatGLM2 大模型微调过程中遇到的一些坑及解决方法(更新中)
- 分享mfc140u.dll丢失的解决方法,针对原因解决mfc140u.dll丢失的问题
- 运行软件报错mfc140.dll丢失?分享mfc140.dll丢失的解决方法
- iOS学习 --- Xcode 15 下载iOS_17.0.1_Simulator失败解决方法
- 【IDEA 使用easyAPI、easyYapi、Apifox helper等插件时,导出接口文档缺少代码字段注释的相关内容、校验规则的解决方法】
- 【k8s集群搭建(二):基于虚拟机的linux的k8s集群搭建_超详细_可视化界面Dashboard安装_记录全过程踩坑记录及解决方法】
- SpringBoot项目连接linux服务器数据库两种解决方法(linux直接开放端口访问本机通过SSH协议访问,以mysql为例)
- 打不开github网页解决方法
- mfc140u.dll丢失的解决方法,以及针对每个解决mfc140u.dll丢失办法的优缺点
猜你感兴趣
版权申明
本文"【Element UI】解决 el-dialog 弹框组件设置 custom-class 样式不生效问题":http://eshow365.cn/6-16883-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!
- 上一篇: git 详解-提升篇
- 下一篇: 蓝桥杯每日一题2023.10.7