types(Grid): use tsx (#8122)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { PropType } from 'vue';
|
||||
import { createNamespace, addUnit } from '../utils';
|
||||
import { BORDER_TOP } from '../utils/constant';
|
||||
import { useChildren } from '@vant/use';
|
||||
@@ -6,12 +7,27 @@ const [createComponent, bem] = createNamespace('grid');
|
||||
|
||||
export const GRID_KEY = 'vanGrid';
|
||||
|
||||
export type GridDirection = 'horizontal' | 'vertical';
|
||||
|
||||
export type GridProvide = {
|
||||
props: {
|
||||
center: boolean;
|
||||
border: boolean;
|
||||
square?: boolean;
|
||||
gutter?: number | string;
|
||||
iconSize?: number | string;
|
||||
columnNum: number | string;
|
||||
direction?: GridDirection;
|
||||
clickable?: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
props: {
|
||||
square: Boolean,
|
||||
gutter: [Number, String],
|
||||
iconSize: [Number, String],
|
||||
direction: String,
|
||||
direction: String as PropType<GridDirection>,
|
||||
clickable: Boolean,
|
||||
columnNum: {
|
||||
type: [Number, String],
|
||||
Reference in New Issue
Block a user