Browse Source

Fix: 在isMobile=true时无法自定义Drawer的class问题 (#7941)

* fix: 在isMobile=true时无法自定义Drawer的class问题

* fix: 在ResizableHandle两边增加边距
pull/7944/head
layhuts 4 months ago
committed by GitHub
parent
commit
c066889c37
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
  2. 22
      packages/effects/common-ui/src/components/col-page/col-page.vue

16
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue

@ -54,7 +54,6 @@ const components = globalShareState.getComponents();
const id = useId();
provide('DISMISSABLE_DRAWER_ID', id);
// @ts-expect-error unused
const wrapperRef = ref<HTMLElement>();
const { $t } = useSimpleLocale();
const { isMobile } = useIsMobile();
@ -185,11 +184,16 @@ const getForceMount = computed(() => {
<SheetContent
:append-to="getAppendTo"
:class="
cn('flex w-130 flex-col', drawerClass, {
'w-full!': isMobile || placement === 'bottom' || placement === 'top',
'max-h-screen': placement === 'bottom' || placement === 'top',
hidden: isClosed,
})
cn(
'flex w-130 flex-col',
{
'w-full!':
isMobile || placement === 'bottom' || placement === 'top',
'max-h-screen': placement === 'bottom' || placement === 'top',
hidden: isClosed,
},
drawerClass,
)
"
:modal="modal"
:open="state?.isOpen"

22
packages/effects/common-ui/src/components/col-page/col-page.vue

@ -76,14 +76,16 @@ defineExpose({
:min-size="leftMinWidth"
>
<template #default="slotProps">
<slot
name="left"
v-bind="{
...slotProps,
expand: expandLeft,
collapse: collapseLeft,
}"
></slot>
<div class="h-full pr-2">
<slot
name="left"
v-bind="{
...slotProps,
expand: expandLeft,
collapse: collapseLeft,
}"
></slot>
</div>
</template>
</ResizablePanel>
<ResizableHandle
@ -99,7 +101,9 @@ defineExpose({
:min-size="rightMinWidth"
>
<template #default>
<slot></slot>
<div class="h-full pl-2">
<slot></slot>
</div>
</template>
</ResizablePanel>
</ResizablePanelGroup>

Loading…
Cancel
Save