【更新】对PR内容进行微调

This commit is contained in:
俞宝山
2026-04-21 23:53:37 +08:00
parent 7394817b7c
commit 1aacaa85d1
3 changed files with 16 additions and 18 deletions
@@ -2,7 +2,7 @@
<a-modal
v-if="isModal"
v-bind="$attrs"
:open="visible"
:open="isOpen"
:width="modalWidth"
:footer="slotKeys.includes('footer') ? undefined : null"
:wrap-class-name="wrapClassName + fullscreenClass"
@@ -60,7 +60,8 @@
<a-drawer
v-else
v-bind="$attrs"
:open="visible"
:open="isOpen"
:title="title"
:width="drawerWidth"
:footer-style="{ textAlign: 'right' }"
@close="cancel"
@@ -79,6 +80,11 @@
const slots = useSlots()
const store = globalStore()
const props = defineProps({
open: {
type: Boolean,
default: false,
required: false
},
visible: {
type: Boolean,
default: false,
@@ -111,9 +117,12 @@
return FormContainerTypeEnum.MODAL === formStyle.value
})
const emit = defineEmits(['close', 'fullscreen'])
const isOpen = computed(() => props.open || props.visible)
const emit = defineEmits(['close', 'fullscreen', 'update:open'])
const cancel = () => {
emit('update:open', false)
emit('close')
}
@@ -204,12 +213,9 @@
})
}
watch(
() => props.visible,
() => {
if (!props.visible) toggleResetDrag()
}
)
watch(isOpen, () => {
if (!isOpen.value) toggleResetDrag()
})
// 监听窗口大小变化
const handleResize = () => {
@@ -242,13 +242,11 @@
}
&.unread {
background-color: #f0f9ff;
&:hover {
background-color: #e6f7ff;
}
.msg-title {
font-weight: 600;
color: #1890ff;
}
}
}
+1 -7
View File
@@ -536,28 +536,24 @@ body,
// ant-modal-header 样式
.ant-modal .ant-modal-header {
margin: -20px -24px 0 -24px;
margin: -20px -24px 20px -24px;
padding: 12px 24px;
background: rgb(from var(--primary-color) r g b / 10%);
}
// ant-modal-title 样式
.ant-modal .ant-modal-title {
margin-right: 22px;
}
// ant-modal-close 样式
.ant-modal .ant-modal-close {
top: 12px;
line-height: 1.5;
inset-inline-end: 24px;
}
// ant-modal-close-x 样式
.ant-modal .ant-modal-close-x {
line-height: 1.5;
}
// ant-modal 全屏
.full-modal {
.ant-modal {
@@ -576,7 +572,6 @@ body,
overflow: auto;
}
}
// ant-modal 自定义按钮
.ant-modal-action {
display: inline-flex;
@@ -602,7 +597,6 @@ body,
text-align: center;
text-transform: none;
text-rendering: auto;
&:hover {
color: rgba(0, 0, 0, 0.88);
background-color: rgba(0, 0, 0, 0.06);