UNPKG

1.12 kBTypeScriptView Raw
1import { ComponentType } from 'react'
2import { StandardProps } from './common'
3interface GridViewProps extends StandardProps {
4 /** 布局方式。masonry - 瀑布流,根据子元素高度自动布局。 aligned - 每行高度由同一行中最大高度子节点决定。
5 * @supported weapp
6 * @default "aligned"
7 */
8 type: string
9 /** 交叉轴元素数量
10 * @supported weapp
11 * @default 2
12 */
13 crossAxisCount?: number
14 /** 主轴方向间隔
15 * @supported weapp
16 * @default 0
17 */
18 mainAxisGap?: number
19 /** 交叉轴方向间隔
20 * @supported weapp
21 * @default 0
22 */
23 crossAxisGap?: number
24 /** 交叉轴元素最大范围
25 * @supported weapp
26 * @default 0
27 */
28 maxCrossAxisExtent?: number
29}
30/**
31 * 网格布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。
32 * @classification viewContainer
33 * @supported weapp
34 * @see https://developers.weixin.qq.com/miniprogram/dev/component/grid-view.html
35 */
36declare const GridView: ComponentType<GridViewProps>
37export { GridView, GridViewProps }