Skip to content

Commit

Permalink
style(Drawer): antdv4版本 drawer要使用rootClassName来来配置最外层元素样式 (vbenjs#3012)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Sep 11, 2023
1 parent 1c668f2 commit 356f132
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Drawer/src/BasicDrawer.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<Drawer :class="prefixCls" @close="onClose" v-bind="getBindValues">
<Drawer :rootClassName="prefixCls" @close="onClose" v-bind="getBindValues">
<template #title v-if="!$slots.title">
<DrawerHeader
:title="getMergeProps.title"
Expand Down Expand Up @@ -94,7 +94,7 @@
opt.width = '100%';
}
const detailCls = `${prefixCls}__detail`;
opt.class = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls;
opt.rootClassName = wrapClassName ? `${wrapClassName} ${detailCls}` : detailCls;
if (!getContainer) {
// TODO type error?
Expand Down
1 change: 1 addition & 0 deletions src/components/Drawer/src/typing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export interface DrawerProps extends DrawerFooterProps {
*/
wrapClassName?: string;
class?: string;
rootClassName?: string;
/**
* Style of wrapper element which **contains mask** compare to `drawerStyle`
* @type object
Expand Down

0 comments on commit 356f132

Please sign in to comment.