parent
cdbe8eea6b
commit
e2ea50f08e
|
@ -6,7 +6,7 @@ import { cloneElement } from '../_util/vnode';
|
||||||
import { defineComponent, inject, ref } from 'vue';
|
import { defineComponent, inject, ref } from 'vue';
|
||||||
import ItemMeta from './ItemMeta';
|
import ItemMeta from './ItemMeta';
|
||||||
import useConfigInject from '../_util/hooks/useConfigInject';
|
import useConfigInject from '../_util/hooks/useConfigInject';
|
||||||
import { ListContextKey } from '.';
|
import { ListContextKey } from './contextKey';
|
||||||
|
|
||||||
export const ListItemProps = {
|
export const ListItemProps = {
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
import type { InjectionKey, Ref } from 'vue';
|
||||||
|
|
||||||
|
export interface ListContext {
|
||||||
|
grid?: Ref<any>;
|
||||||
|
itemLayout?: Ref<string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ListContextKey: InjectionKey<ListContext> = Symbol('ListContextKey');
|
|
@ -1,4 +1,4 @@
|
||||||
import type { App, Plugin, ExtractPropTypes, PropType, InjectionKey, Ref } from 'vue';
|
import type { App, Plugin, ExtractPropTypes, PropType } from 'vue';
|
||||||
import { provide, defineComponent, ref, watch, computed, toRef } from 'vue';
|
import { provide, defineComponent, ref, watch, computed, toRef } from 'vue';
|
||||||
import PropTypes, { withUndefined } from '../_util/vue-types';
|
import PropTypes, { withUndefined } from '../_util/vue-types';
|
||||||
import type { RenderEmptyHandler } from '../config-provider';
|
import type { RenderEmptyHandler } from '../config-provider';
|
||||||
|
@ -70,12 +70,7 @@ export interface ListLocale {
|
||||||
|
|
||||||
export type ListProps = Partial<ExtractPropTypes<typeof listProps>>;
|
export type ListProps = Partial<ExtractPropTypes<typeof listProps>>;
|
||||||
|
|
||||||
export interface ListContext {
|
import { ListContextKey } from './contextKey';
|
||||||
grid?: Ref<any>;
|
|
||||||
itemLayout?: Ref<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ListContextKey: InjectionKey<ListContext> = Symbol('ListContextKey');
|
|
||||||
|
|
||||||
const List = defineComponent({
|
const List = defineComponent({
|
||||||
name: 'AList',
|
name: 'AList',
|
||||||
|
|
Loading…
Reference in New Issue