diff --git a/components/list/Item.jsx b/components/list/Item.jsx index 7b5835381..e0d7acba5 100644 --- a/components/list/Item.jsx +++ b/components/list/Item.jsx @@ -21,7 +21,7 @@ export const ListItemMetaProps = { title: PropTypes.any, }; -export const AListItemMeta = (props, { slots }) => { +export const ListItemMeta = (props, { slots }) => { const configProvider = inject('configProvider', ConfigConsumerProps); const getPrefixCls = configProvider.getPrefixCls; const { prefixCls: customizePrefixCls } = props; @@ -43,9 +43,10 @@ export const AListItemMeta = (props, { slots }) => { ); }; -Object.assign(AListItemMeta, { +Object.assign(ListItemMeta, { props: ListItemMetaProps, __ANT_LIST_ITEM_META: true, + componentName: 'AListItemMeta', }); function getGrid(grid, t) { @@ -55,7 +56,7 @@ function getGrid(grid, t) { export default { name: 'AListItem', inheritAttrs: false, - Meta: AListItemMeta, + Meta: ListItemMeta, props: ListItemProps, setup() { const listContext = inject('listContext', {}); diff --git a/components/list/index.jsx b/components/list/index.jsx index 0b7e5ceb9..af871bc88 100644 --- a/components/list/index.jsx +++ b/components/list/index.jsx @@ -280,7 +280,7 @@ const List = { List.install = function(app) { app.component(List.name, List); app.component(List.Item.name, List.Item); - app.component(List.Item.Meta.name, List.Item.Meta); + app.component(List.Item.Meta.componentName, List.Item.Meta); }; export default List; diff --git a/examples/App.vue b/examples/App.vue index 5cc6804c0..d649b1641 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,60 +1,158 @@ + +#### 信息预览抽屉 +需要快速预览对象概要时使用,点击遮罩区关闭。 + + + +#### Preview drawer +Use Drawer to quickly preview details of an object, such as those in a list. + + +```vue -> + +```