Skip to content

Commit

Permalink
fix(comp:desc): header component does not take effect (#1742)
Browse files Browse the repository at this point in the history
  • Loading branch information
threedayAAAAA committed Nov 28, 2023
1 parent 0905872 commit dd1aab8
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/components/desc/src/Desc.tsx
Expand Up @@ -10,6 +10,7 @@ import { computed, defineComponent, normalizeClass, provide } from 'vue'
import { ɵHeader } from '@idux/components/_private/header'
import { useGlobalConfig } from '@idux/components/config'
import { IxRow } from '@idux/components/grid'
import { IxHeader } from '@idux/components/header'

import { descToken } from './token'
import { descProps } from './types'
Expand Down Expand Up @@ -42,11 +43,18 @@ export default defineComponent({
return () => {
return (
<IxRow class={classes.value}>
<ɵHeader
v-slots={{ header: slots.header, closeIcon: slots.suffix }}
header={props.header}
size={mergedSize.value === 'lg' ? 'md' : 'sm'}
/>
{slots.header ? (
<IxHeader
v-slots={{ default: slots.header, closeIcon: slots.suffix }}
size={mergedSize.value === 'lg' ? 'md' : 'sm'}
/>
) : (
<ɵHeader
v-slots={{ header: slots.header, closeIcon: slots.suffix }}
header={props.header}
size={mergedSize.value === 'lg' ? 'md' : 'sm'}
/>
)}
{slots.default && slots.default()}
</IxRow>
)
Expand Down

0 comments on commit dd1aab8

Please sign in to comment.