<wxs module="utils" src="../wxs/utils.wxs"/>
<wxs module="computed" src="./index.wxs"/>

<view
        bindtap="onClick"
        class="custom-class {{ utils.bem('grid-item', { square }) }}"
        style="{{ computed.wrapperStyle({ square, gutter, columnNum, index }) }}"
>
    <view
            class="content-class {{ utils.bem('grid-item__content', [direction, { center, square, reverse, clickable, surround: border && gutter }]) }} {{ border ? 'van-hairline--surround' : '' }}"
            style="{{ computed.contentStyle({ square, gutter }) }}"
    >
        <block wx:if="{{ useSlot }}">
            <slot/>
        </block>
        <block wx:else>
            <view class="van-grid-item__icon icon-class">
                <van-icon class-prefix="{{ iconPrefix }}" color="{{ iconColor }}" dot="{{ dot }}" info="{{ badge || info }}"
                          name="{{ icon }}" size="{{ iconSize }}" wx:if="{{ icon }}"/>
                <slot name="icon" wx:else></slot>
            </view>
            <view class="van-grid-item__text text-class">
                <text wx:if="{{ text }}">{{ text }}</text>
                <slot name="text" wx:else></slot>
            </view>
        </block>
    </view>
</view>
