How to modify the style of el-dialog
- It cannot be modified directly in
<style scoped>
, so the modification will not take effect - In vue's SFC, multiple style blocks are allowed. You can write a style without scope, define the class name and change the style separately in it.
- example:
<el-dialog class="aaa"> </el-dialog>
<style scope>
//其他局部样式
</style>
<style lang="scss">
//dialog样式,按照类名区分 不然还是在全局css中修改更清晰一些。
.aaa {
.el-dialog__footer {
text-align: center;
}
}
</style>
Reference: The modification of the el-dialog bullet box style in element does not take effect and has no effect on the attributes.
How does element-ui modify the style of el-dialog?
Modify elementui source code and apply
Modify the element-ui source code in the vue project, how to apply it to the project (modify the file in node_modules, and apply) : Using the alias of webpack is very easy to use, I haven't tried it.