添加组件及页面
This commit is contained in:
@@ -1,42 +1,19 @@
|
||||
<view class="box">
|
||||
<view wx:if="{{total}}" class="box">
|
||||
<view>共{{total}}条</view>
|
||||
<t-button
|
||||
size="small"
|
||||
disabled="{{curr_page == 1}}"
|
||||
bindtap="pageChange"
|
||||
data-page="prev"
|
||||
icon="chevron-left"
|
||||
style="padding-left: 8px;padding-right: 8px"
|
||||
/>
|
||||
<t-button size="small" disabled="{{curr_page == 1}}" bindtap="pageChange" data-page="prev"
|
||||
icon="chevron-left" style="padding-left: 16rpx;padding-right: 16rpx" />
|
||||
<block wx:for="{{pages}}" wx:key="index">
|
||||
<t-button
|
||||
size="small"
|
||||
theme="{{curr_page == item ? 'primary': ''}}"
|
||||
variant="{{curr_page == item ? 'outline': ''}}"
|
||||
bindtap="pageChange"
|
||||
data-page="{{item}}"
|
||||
>{{item}}
|
||||
<t-button size="small" theme="{{curr_page == item ? 'primary': ''}}"
|
||||
variant="{{curr_page == item ? 'outline': ''}}" bindtap="pageChange" data-page="{{item}}">
|
||||
{{item}}
|
||||
</t-button>
|
||||
</block>
|
||||
<t-button
|
||||
size="small"
|
||||
disabled="{{curr_page == totalPage}}"
|
||||
bindtap="pageChange"
|
||||
data-page="next"
|
||||
icon="chevron-right"
|
||||
style="padding-left: 8px;padding-right: 8px"
|
||||
/>
|
||||
<t-button size="small" bindtap="pageSelect" style="padding-left: 8px;padding-right: 8px">跳转
|
||||
<t-button size="small" disabled="{{curr_page == totalPage}}" bindtap="pageChange" data-page="next"
|
||||
icon="chevron-right" style="padding-left: 16rpx;padding-right: 16rpx" />
|
||||
<t-button size="small" bindtap="pageSelect" style="padding-left: 16rpx;padding-right: 16rpx">跳转
|
||||
</t-button>
|
||||
<t-picker
|
||||
title="选择页码"
|
||||
visible="{{open}}"
|
||||
value="{{[curr_page]}}"
|
||||
cancelBtn="取消"
|
||||
confirmBtn="确认"
|
||||
bind:confirm="onConfirm"
|
||||
>
|
||||
<t-picker-item options="{{pickerPages}}" />
|
||||
</t-picker>
|
||||
</view>
|
||||
|
||||
<t-picker title="选择页码" visible="{{open}}" value="{{[curr_page]}}" cancelBtn="取消" confirmBtn="确认"
|
||||
bind:confirm="onConfirm">
|
||||
<t-picker-item options="{{pickerPages}}" />
|
||||
</t-picker>
|
||||
@@ -1,8 +1,8 @@
|
||||
.box {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(0, max-content));
|
||||
column-gap: 16rpx;
|
||||
row-gap: 16rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
column-gap: 8px;
|
||||
row-gap: 8px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user