feat: update ts type
parent
3297f7aa58
commit
7dda6e8e07
|
@ -23,17 +23,17 @@ export type { ListItemMetaProps } from './ItemMeta';
|
||||||
|
|
||||||
export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
||||||
|
|
||||||
export const ListGridType = {
|
export type ColumnCount = number;
|
||||||
gutter: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(Number)]),
|
export interface ListGridType {
|
||||||
column: PropTypes.number,
|
gutter?: number;
|
||||||
xs: PropTypes.number,
|
column?: ColumnCount;
|
||||||
sm: PropTypes.number,
|
xs?: ColumnCount;
|
||||||
md: PropTypes.number,
|
sm?: ColumnCount;
|
||||||
lg: PropTypes.number,
|
md?: ColumnCount;
|
||||||
xl: PropTypes.number,
|
lg?: ColumnCount;
|
||||||
xxl: PropTypes.number,
|
xl?: ColumnCount;
|
||||||
xxxl: PropTypes.number,
|
xxl?: ColumnCount;
|
||||||
};
|
}
|
||||||
|
|
||||||
export const ListSize = tuple('small', 'default', 'large');
|
export const ListSize = tuple('small', 'default', 'large');
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ export const listProps = {
|
||||||
bordered: PropTypes.looseBool,
|
bordered: PropTypes.looseBool,
|
||||||
dataSource: PropTypes.array,
|
dataSource: PropTypes.array,
|
||||||
extra: PropTypes.any,
|
extra: PropTypes.any,
|
||||||
grid: PropTypes.shape(ListGridType).loose,
|
grid: { type: Object as PropType<ListGridType>, default: undefined },
|
||||||
itemLayout: PropTypes.oneOf(tuple('horizontal', 'vertical')),
|
itemLayout: PropTypes.oneOf(tuple('horizontal', 'vertical')),
|
||||||
loading: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object])),
|
loading: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, PropTypes.object])),
|
||||||
loadMore: PropTypes.any,
|
loadMore: PropTypes.any,
|
||||||
|
|
|
@ -12,6 +12,7 @@ import type { Breakpoint } from '../_util/responsiveObserve';
|
||||||
import type { INTERNAL_SELECTION_ITEM } from './hooks/useSelection';
|
import type { INTERNAL_SELECTION_ITEM } from './hooks/useSelection';
|
||||||
import type { VueNode } from '../_util/type';
|
import type { VueNode } from '../_util/type';
|
||||||
import { tuple } from '../_util/type';
|
import { tuple } from '../_util/type';
|
||||||
|
import type { CSSProperties } from 'vue';
|
||||||
// import { TableAction } from './Table';
|
// import { TableAction } from './Table';
|
||||||
|
|
||||||
export type { GetRowKey, ExpandableConfig };
|
export type { GetRowKey, ExpandableConfig };
|
||||||
|
@ -195,6 +196,8 @@ type TablePaginationPosition =
|
||||||
|
|
||||||
export interface TablePaginationConfig extends PaginationProps {
|
export interface TablePaginationConfig extends PaginationProps {
|
||||||
position?: TablePaginationPosition[];
|
position?: TablePaginationPosition[];
|
||||||
|
class?: string;
|
||||||
|
style?: CSSProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TransformCellTextProps {
|
export interface TransformCellTextProps {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* - onFilterDropdownVisibleChange
|
* - onFilterDropdownVisibleChange
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { CSSProperties, DefineComponent, FunctionalComponent, HTMLAttributes, Ref } from 'vue';
|
import type { CSSProperties, HTMLAttributes, Ref } from 'vue';
|
||||||
|
|
||||||
export type Key = number | string;
|
export type Key = number | string;
|
||||||
|
|
||||||
|
@ -139,9 +139,9 @@ export type GetComponentProps<DataType> = (
|
||||||
column?: ColumnType<any>,
|
column?: ColumnType<any>,
|
||||||
) => Omit<HTMLAttributes, 'style'> & { style?: CSSProperties };
|
) => Omit<HTMLAttributes, 'style'> & { style?: CSSProperties };
|
||||||
|
|
||||||
type Component<P> = DefineComponent<P> | FunctionalComponent<P> | string;
|
// type Component<P> = DefineComponent<P> | FunctionalComponent<P> | string;
|
||||||
|
|
||||||
export type CustomizeComponent = Component<any>;
|
export type CustomizeComponent = any;
|
||||||
|
|
||||||
export type CustomizeScrollBody<RecordType> = (
|
export type CustomizeScrollBody<RecordType> = (
|
||||||
data: readonly RecordType[],
|
data: readonly RecordType[],
|
||||||
|
|
Loading…
Reference in New Issue