style(Drawer): antdv4版本 drawer要使用rootClassName来来配置最外层元素样式 (#3012)

This commit is contained in:
invalid w 2023-09-11 17:54:40 +08:00 committed by GitHub
parent 1c668f21bf
commit 356f132610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<Drawer :class="prefixCls" @close="onClose" v-bind="getBindValues"> <Drawer :rootClassName="prefixCls" @close="onClose" v-bind="getBindValues">
<template #title v-if="!$slots.title"> <template #title v-if="!$slots.title">
<DrawerHeader <DrawerHeader
:title="getMergeProps.title" :title="getMergeProps.title"
@ -94,7 +94,7 @@
opt.width = '100%'; opt.width = '100%';
} }
const detailCls = `${prefixCls}__detail`; const detailCls = `${prefixCls}__detail`;
opt.class = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls; opt.rootClassName = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls;
if (!getContainer) { if (!getContainer) {
// TODO type error? // TODO type error?

View File

@ -134,6 +134,7 @@ export interface DrawerProps extends DrawerFooterProps {
*/ */
wrapClassName?: string; wrapClassName?: string;
class?: string; class?: string;
rootClassName?: string;
/** /**
* Style of wrapper element which **contains mask** compare to `drawerStyle` * Style of wrapper element which **contains mask** compare to `drawerStyle`
* @type object * @type object