fix: 修复弹框自定义宽度 class 被默认 max-w 覆盖的问题 (#8100)
将 modalClass 参数移至 cn() 末尾,确保用户通过 class 传入的宽度样式 优先于内置默认的 max-w-[calc(100vw-20px)] 生效,使 业务使用Modal 上的自定义的max-w-[50%] 等方式能正确控制弹框宽度。
This commit is contained in:
@@ -243,7 +243,6 @@ function handleClosed() {
|
||||
cn(
|
||||
'inset-x-0 top-[10vh] mx-auto flex w-130 flex-col p-0',
|
||||
shouldFullscreen ? 'rounded-none' : 'rounded-(--radius)',
|
||||
modalClass,
|
||||
{
|
||||
'border border-border': bordered,
|
||||
'shadow-3xl': !bordered,
|
||||
@@ -255,6 +254,7 @@ function handleClosed() {
|
||||
'duration-300': !dragging,
|
||||
hidden: isClosed,
|
||||
},
|
||||
modalClass,
|
||||
)
|
||||
"
|
||||
:force-mount="getForceMount"
|
||||
|
||||
Reference in New Issue
Block a user