update src/components/Dialog/src/Dialog.vue.

解决了单独使用elementplus diaolog组件时,样式被篡改的问题


Signed-off-by: AKING <2734339436@qq.com>
This commit is contained in:
AKING 2023-08-22 09:06:09 +00:00 committed by Gitee
parent 5baccbd5bc
commit cba35d698f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -67,6 +67,7 @@ const dialogStyle = computed(() => {
lock-scroll lock-scroll
draggable draggable
top="0" top="0"
class="com-dialog"
:show-close="false" :show-close="false"
> >
<template #header="{ close }"> <template #header="{ close }">
@ -107,32 +108,34 @@ const dialogStyle = computed(() => {
</template> </template>
<style lang="scss"> <style lang="scss">
.#{$elNamespace}-overlay-dialog { .com-dialog {
display: flex; .#{$elNamespace}-overlay-dialog {
justify-content: center; display: flex;
align-items: center; justify-content: center;
} align-items: center;
.#{$elNamespace}-dialog {
margin: 0 !important;
&__header {
height: 54px;
padding: 0;
margin-right: 0 !important;
border-bottom: 1px solid var(--el-border-color);
} }
&__body { .#{$elNamespace}-dialog {
padding: 15px !important; margin: 0 !important;
}
&__footer { &__header {
border-top: 1px solid var(--el-border-color); height: 54px;
} padding: 0;
margin-right: 0 !important;
border-bottom: 1px solid var(--el-border-color);
}
&__headerbtn { &__body {
top: 0; padding: 15px !important;
}
&__footer {
border-top: 1px solid var(--el-border-color);
}
&__headerbtn {
top: 0;
}
} }
} }
</style> </style>