123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <import-sjs
- from="./index.sjs"
- name="sjs" />
- <view
- a:if="{{ mode === 'default' }}"
- class="ant-grid ant-grid-columns-{{ columns }} ant-grid-{{ mode }} {{ className || '' }}"
- style="{{ style || '' }}">
- <block
- a:for="{{ items }}"
- a:for-index="index"
- a:for-item="item">
- <view
- data-item="{{ item }}"
- class="ant-grid-item ant-grid-item-{{ gridItemLayout }} {{ sjs.checkNeedVerticalSpace(items.length, index, columns) ? 'ant-grid-item-vertical-space' : '' }} ant-grid-item-columns-{{ columns }} {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
- onTap="onTap"
- onFirstAppear="onFirstAppear">
- <view
- class="ant-grid-item-icon ant-grid-item-icon-{{ item.iconStyle || iconStyle }}">
- <slot
- name="icon"
- value="{{ item }}"
- index="{{ index }}">
- <image-icon
- image="{{ item.icon }}"
- className="ant-grid-item-icon"
- style="{{ iconSize ? 'width:' + iconSize + 'px;height:' + iconSize + 'px;font-size:' + iconSize + 'px' : '' }}" />
- </slot>
- </view>
- <view class="ant-grid-item-title">
- <slot
- name="title"
- value="{{ item }}"
- index="{{ index }}">
- {{ item.title }}
- </slot>
- </view>
- <view class="ant-grid-item-description">
- <slot
- name="description"
- value="{{ item }}"
- index="{{ index }}">
- {{ item.description }}
- </slot>
- </view>
- </view>
- </block>
- </view>
- <ant-pagination
- a:elif="{{ mode === 'scroll' }}"
- fillColor="{{ paginationFillColor }}"
- frontColor="{{ paginationFrontColor }}"
- className="{{ className || '' }}"
- style="{{ style || '' }}">
- <view class="ant-grid ant-grid-{{ mode }}">
- <block
- a:for="{{ items }}"
- a:for-index="index"
- a:for-item="item">
- <view
- data-item="{{ item }}"
- class="ant-grid-item ant-grid-item-{{ gridItemLayout }} ant-grid-item-columns-scroll {{ sjs.checkShowSplitLine(index, items.length, columns, mode, showDivider) ? 'ant-grid-item-line' : '' }}"
- onTap="onTap"
- onFirstAppear="onFirstAppear">
- <view
- class="ant-grid-item-icon ant-grid-item-icon-{{ item.iconStyle || iconStyle }}">
- <slot
- name="icon"
- value="{{ item }}"
- index="{{ index }}">
- <image-icon
- image="{{ item.icon }}"
- className="ant-grid-item-icon"
- style="{{ iconSize ? 'width:' + iconSize + 'px;height:' + iconSize + 'px;font-size:' + iconSize + 'px' : '' }}" />
- </slot>
- </view>
- <view class="ant-grid-item-title">
- <slot
- name="title"
- value="{{ item }}"
- index="{{ index }}">
- {{ item.title }}
- </slot>
- </view>
- <view class="ant-grid-item-description">
- <slot
- name="description"
- value="{{ item }}"
- index="{{ index }}">
- {{ item.description }}
- </slot>
- </view>
- </view>
- </block>
- </view>
- </ant-pagination>
|