Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/list/demo/simple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Customizing the header and footer of list by setting `header` and `footer` prope
<div>Footer</div>
</template>
</a-list>
<h3 :style="{ marginBottom: '16px' }">Default Size</h3>
<h3 :style="{ margin: '16px 0' }">Default Size</h3>
<a-list bordered :data-source="data">
<template #renderItem="{ item }">
<a-list-item>{{ item }}</a-list-item>
Expand Down
6 changes: 5 additions & 1 deletion components/list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import eagerComputed from '../_util/eagerComputed';

// CSSINJS
import useStyle from './style';
import useCSSVarCls from '../config-provider/hooks/useCssVarCls';

export type { ListItemProps } from './Item';
export type { ListItemMetaProps } from './ItemMeta';
Expand Down Expand Up @@ -110,7 +111,8 @@ const List = defineComponent({
const { prefixCls, direction, renderEmpty } = useConfigInject('list', props);

// Style
const [wrapSSR, hashId] = useStyle(prefixCls);
const rootCls = useCSSVarCls(prefixCls);
const [wrapSSR, hashId, cssVarCls] = useStyle(prefixCls, rootCls);

const paginationObj = computed(() =>
props.pagination && typeof props.pagination === 'object' ? props.pagination : {},
Expand Down Expand Up @@ -274,7 +276,9 @@ const List = defineComponent({
[`${prefixCls.value}-something-after-last-item`]: isSomethingAfterLastItem,
},
attrs.class,
cssVarCls.value,
hashId.value,
rootCls.value,
);
const paginationContent = props.pagination ? (
<div class={`${prefixCls.value}-pagination`}>
Expand Down
Loading