mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
<demo-block title="基本用法">
|
|
<van-grid>
|
|
<van-grid-item icon="photo-o" text="文字" wx:for="{{ 4 }}"></van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义列数">
|
|
<van-grid column-num="3">
|
|
<van-grid-item icon="photo-o" text="文字" wx:for="{{ 6 }}"></van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|
|
|
|
<demo-block title="自定义内容">
|
|
<van-grid column-num="3" border="{{ false }}">
|
|
<van-grid-item use-slot wx:for="{{ 3 }}" wx:for-item="index">
|
|
<image class="van-image" src="https://img.yzcdn.cn/vant/apple-{{ index+1 }}.jpg" />
|
|
</van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|
|
|
|
<demo-block title="正方形格子">
|
|
<van-grid square>
|
|
<van-grid-item icon="photo-o" text="文字" wx:for="{{ 8 }}"></van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|
|
|
|
<demo-block title="格子间距">
|
|
<van-grid gutter="{{ 10 }}">
|
|
<van-grid-item icon="photo-o" text="文字" wx:for="{{ 8 }}"></van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|
|
|
|
<demo-block title="页面跳转">
|
|
<van-grid clickable column-num="2">
|
|
<van-grid-item icon="home-o" link-type="navigateTo" url="/pages/dashboard/index" text="Navigate 跳转"></van-grid-item>
|
|
<van-grid-item icon="search" link-type="reLaunch" url="/pages/dashboard/index" text="ReLaunch 跳转"></van-grid-item>
|
|
</van-grid>
|
|
</demo-block>
|