Skip to content

Commit 8b9a2d0

Browse files
committed
修复 FaDrawer 组件 contentClass 设置无效
1 parent 4a0ffdd commit 8b9a2d0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/layouts/components/AppSetting/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function handleCopy() {
4949
</script>
5050

5151
<template>
52-
<FaDrawer v-model="isShow" title="应用配置" description="在生产环境中应关闭该模块" :footer="isSupported">
52+
<FaDrawer v-model="isShow" title="应用配置" description="在生产环境中应关闭该模块" :footer="isSupported" content-class="sm:min-w-md">
5353
<div class="rounded-2 bg-rose/20 px-4 py-2 text-sm/6 c-rose">
5454
应用配置可实时预览效果,但只是临时生效,要想真正应用于项目,可以点击下方的「复制配置」按钮,并将配置粘贴到 src/settings.ts 文件中。
5555
</div>

src/ui/components/FaDrawer/index.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ const props = withDefaults(
3636
footer?: boolean
3737
closeOnClickOverlay?: boolean
3838
closeOnPressEscape?: boolean
39-
class?: HTMLAttributes['class']
40-
headerClass?: HTMLAttributes['class']
4139
contentClass?: HTMLAttributes['class']
40+
headerClass?: HTMLAttributes['class']
4241
footerClass?: HTMLAttributes['class']
4342
}>(),
4443
{
@@ -139,7 +138,7 @@ function handleAnimationEnd() {
139138
:open="isOpen"
140139
:overlay="props.overlay"
141140
:overlay-blur="props.overlayBlur"
142-
class="w-full flex flex-col gap-0 p-0"
141+
:class="cn('w-full flex flex-col gap-0 p-0', props.contentClass)"
143142
:side="props.side"
144143
@open-auto-focus="handleFocusOutside"
145144
@close-auto-focus="handleFocusOutside"

0 commit comments

Comments
 (0)