Back to Uni App

Grid View

docs/component/grid-view.md

2.3.33.2 KB
Original Source
<!-- ## grid-view -->

::: sourceCode

grid-view

:::

兼容性

Web微信小程序AndroidiOSHarmonyOSHarmonyOS(Vapor)
<a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a>4.41<a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a><a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a><a style="color:unset;" href="https://vote.dcloud.net.cn/#/?name=uni-app%20x">x</a>-

属性

名称类型默认值兼容性描述
typestring-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(string)
布局方式
cross-axis-countnumber-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(number)
交叉轴元素数量
max-cross-axis-extentnumber-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(number)
交叉轴元素最大范围
main-axis-gapnumber-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(number)
主轴方向间隔
cross-axis-gapnumber-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(number)
交叉轴方向间隔
paddingArray-Web: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -(Array)
长度为 4 的数组,按 top、right、bottom、left 顺序指定内边距

type 的属性描述

合法值兼容性描述
alignedWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -每行高度由同一行中最大高度子节点决定
masonryWeb: x; 微信小程序: 4.41; Android: x; iOS: x; HarmonyOS: x; HarmonyOS(Vapor): -瀑布流,根据子元素高度自动布局
<!-- UTSCOMJSON.grid-view.component_type -->

参见