diff --git a/src/assets/style/global.less b/src/assets/style/global.less index 1ee8a62..9ce1db6 100644 --- a/src/assets/style/global.less +++ b/src/assets/style/global.less @@ -135,13 +135,13 @@ body .arco-modal-simple .arco-modal-title { text-align: left; } -/* Rounded corners to align with SimpleAdmin (Element Plus-like 4px) */ +/* Rounded corners to align with SimpleAdmin (Element Plus-like 4px) + 抽屉贴边展开,不做圆角 */ body .arco-card, body .arco-card-bordered, body .arco-modal, body .arco-popover-content, body .arco-dropdown, -body .arco-drawer, body .arco-input-wrapper, body .arco-textarea-wrapper, body .arco-select, @@ -155,6 +155,10 @@ body .arco-notification { border-radius: 8px !important; } +body .arco-drawer { + border-radius: 0 !important; +} + /* vxe table wrapper */ body .vxe-table--border, body .vxe-grid { diff --git a/src/components/DrawerPro/index.vue b/src/components/DrawerPro/index.vue index 7f03e83..404ce39 100644 --- a/src/components/DrawerPro/index.vue +++ b/src/components/DrawerPro/index.vue @@ -10,11 +10,18 @@ visible: false, width: 400, placement: 'right', + // 默认不展示顶栏(可点遮罩关闭);需要标题时 setDrawerProps({ title }) 会自动打开 + header: false, ...unref(Attrs), }); const setDrawerProps = (props: DrawerProps) => { - Object.assign(defaultProps, props); + const next: DrawerProps = { ...props }; + // 传入 title 且未显式指定 header 时,自动显示顶栏 + if (next.title && next.header === undefined) { + next.header = true; + } + Object.assign(defaultProps, next); }; const instance = getCurrentInstance(); diff --git a/src/views/order/myOrders/components/OrderDetailDrawer.vue b/src/views/order/myOrders/components/OrderDetailDrawer.vue index 51f33e3..9c55103 100644 --- a/src/views/order/myOrders/components/OrderDetailDrawer.vue +++ b/src/views/order/myOrders/components/OrderDetailDrawer.vue @@ -1,25 +1,10 @@