举例:修改el-dialog组件的内边距padding:
<script setup lang="ts">
import { ref } from 'vue'
const visible = ref(true)
</script>
<template>
<el-dialog v-model="visible" :class="$style.ElDialog">
<div style="height: 300px; background-color: blue">这是弹框内容</div>
</el-dialog>
</template>
<style lang="scss" module>
.ElDialog {
:global .el-dialog__body {
padding: 0px !important;
}
}
</style>