fix: custom class (#6217)
parent
94e981e00b
commit
337d958c67
|
@ -152,8 +152,10 @@ export default defineComponent({
|
||||||
const breadcrumbClassName = {
|
const breadcrumbClassName = {
|
||||||
[prefixCls.value]: true,
|
[prefixCls.value]: true,
|
||||||
[`${prefixCls.value}-rtl`]: direction.value === 'rtl',
|
[`${prefixCls.value}-rtl`]: direction.value === 'rtl',
|
||||||
|
[`${attrs.class}`]: !!attrs.class,
|
||||||
[hashId.value]: true,
|
[hashId.value]: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<nav {...attrs} class={breadcrumbClassName}>
|
<nav {...attrs} class={breadcrumbClassName}>
|
||||||
<ol>{crumbs}</ol>
|
<ol>{crumbs}</ol>
|
||||||
|
|
|
@ -162,10 +162,11 @@ export const descriptionsContext: InjectionKey<DescriptionsContextProp> =
|
||||||
const Descriptions = defineComponent({
|
const Descriptions = defineComponent({
|
||||||
compatConfig: { MODE: 3 },
|
compatConfig: { MODE: 3 },
|
||||||
name: 'ADescriptions',
|
name: 'ADescriptions',
|
||||||
|
inheritAttrs: false,
|
||||||
props: descriptionsProps(),
|
props: descriptionsProps(),
|
||||||
slots: ['title', 'extra'],
|
slots: ['title', 'extra'],
|
||||||
Item: DescriptionsItem,
|
Item: DescriptionsItem,
|
||||||
setup(props, { slots }) {
|
setup(props, { slots, attrs }) {
|
||||||
const { prefixCls, direction } = useConfigInject('descriptions', props);
|
const { prefixCls, direction } = useConfigInject('descriptions', props);
|
||||||
let token: number;
|
let token: number;
|
||||||
const screens = ref<ScreenMap>({});
|
const screens = ref<ScreenMap>({});
|
||||||
|
@ -208,6 +209,7 @@ const Descriptions = defineComponent({
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
<div
|
<div
|
||||||
|
{...attrs}
|
||||||
class={[
|
class={[
|
||||||
prefixCls.value,
|
prefixCls.value,
|
||||||
{
|
{
|
||||||
|
@ -215,6 +217,7 @@ const Descriptions = defineComponent({
|
||||||
[`${prefixCls.value}-bordered`]: !!bordered,
|
[`${prefixCls.value}-bordered`]: !!bordered,
|
||||||
[`${prefixCls.value}-rtl`]: direction.value === 'rtl',
|
[`${prefixCls.value}-rtl`]: direction.value === 'rtl',
|
||||||
},
|
},
|
||||||
|
attrs.class,
|
||||||
hashId.value,
|
hashId.value,
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
|
|
@ -79,6 +79,7 @@ const Divider = defineComponent({
|
||||||
children.length
|
children.length
|
||||||
? `${prefixClsRef.value}-with-text ${prefixClsRef.value}-with-text${orientationPrefix.value}`
|
? `${prefixClsRef.value}-with-text ${prefixClsRef.value}-with-text${orientationPrefix.value}`
|
||||||
: '',
|
: '',
|
||||||
|
attrs.class,
|
||||||
]}
|
]}
|
||||||
role="separator"
|
role="separator"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue