mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 00:26:20 +08:00
perf: optimize local startup speed and add header Class configuration to drawer (#4840)
This commit is contained in:
@@ -7,7 +7,7 @@ export interface DrawerProps {
|
||||
* 取消按钮文字
|
||||
*/
|
||||
cancelText?: string;
|
||||
class?: string;
|
||||
class?: any;
|
||||
/**
|
||||
* 是否显示右上角的关闭按钮
|
||||
* @default true
|
||||
@@ -42,6 +42,14 @@ export interface DrawerProps {
|
||||
* @default true
|
||||
*/
|
||||
footer?: boolean;
|
||||
/**
|
||||
* 弹窗底部样式
|
||||
*/
|
||||
footerClass?: any;
|
||||
/**
|
||||
* 弹窗头部样式
|
||||
*/
|
||||
headerClass?: any;
|
||||
/**
|
||||
* 弹窗是否显示
|
||||
* @default false
|
||||
|
@@ -56,6 +56,8 @@ const {
|
||||
contentClass,
|
||||
description,
|
||||
footer: showFooter,
|
||||
footerClass,
|
||||
headerClass,
|
||||
loading: showLoading,
|
||||
modal,
|
||||
openAutoFocus,
|
||||
@@ -130,9 +132,13 @@ function handleFocusOutside(e: Event) {
|
||||
>
|
||||
<SheetHeader
|
||||
:class="
|
||||
cn('!flex flex-row items-center justify-between border-b px-6 py-5', {
|
||||
'px-4 py-3': closable,
|
||||
})
|
||||
cn(
|
||||
'!flex flex-row items-center justify-between border-b px-6 py-5',
|
||||
headerClass,
|
||||
{
|
||||
'px-4 py-3': closable,
|
||||
},
|
||||
)
|
||||
"
|
||||
>
|
||||
<div>
|
||||
@@ -186,7 +192,12 @@ function handleFocusOutside(e: Event) {
|
||||
|
||||
<SheetFooter
|
||||
v-if="showFooter"
|
||||
class="w-full flex-row items-center justify-end border-t p-2 px-3"
|
||||
:class="
|
||||
cn(
|
||||
'w-full flex-row items-center justify-end border-t p-2 px-3',
|
||||
footerClass,
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot name="prepend-footer"></slot>
|
||||
<slot name="footer">
|
||||
|
Reference in New Issue
Block a user