1 | import { ComponentType } from 'react'
|
2 | import { StandardProps } from './common'
|
3 | interface GridViewProps extends StandardProps {
|
4 | /**
|
5 | * 布局方式
|
6 | * @supported weapp
|
7 | * @default "aligned"
|
8 | *
|
9 | * 可选值:
|
10 | * - aligned: 每行高度由同一行中最大高度子节点决定
|
11 | * - masonry: 瀑布流,根据子元素高度自动布局
|
12 | */
|
13 | type: 'aligned' | 'masonry'
|
14 | /**
|
15 | * 交叉轴元素数量
|
16 | * @supported weapp
|
17 | * @default 2
|
18 | */
|
19 | crossAxisCount?: number
|
20 | /**
|
21 | * 主轴方向间隔
|
22 | * @supported weapp
|
23 | * @default 0
|
24 | */
|
25 | mainAxisGap?: number
|
26 | /** 交叉轴方向间隔
|
27 | * @supported weapp
|
28 | * @default 0
|
29 | */
|
30 | crossAxisGap?: number
|
31 | /** 交叉轴元素最大范围
|
32 | * @supported weapp
|
33 | * @default 0
|
34 | */
|
35 | maxCrossAxisExtent?: number
|
36 | /**
|
37 | * 长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距
|
38 | * @supported weapp
|
39 | * @default [0, 0, 0, 0]
|
40 | */
|
41 | padding?: [number, number, number, number]
|
42 | }
|
43 |
|
44 | /**
|
45 | * 网格布局容器,仅支持作为 scroll-view 自定义模式下的直接子节点或 sticky-section 组件直接子节点。仅 Skyline 支持。
|
46 | * @classification skyline
|
47 | * @supported weapp
|
48 | * @see https://developers.weixin.qq.com/miniprogram/dev/component/grid-view.html
|
49 | */
|
50 | declare const GridView: ComponentType<GridViewProps>
|
51 | export { GridView, GridViewProps }
|