|
1 | 1 | <template> |
2 | 2 | <view class="uni-pagination"> |
3 | | - <view class="uni-pagination__btns"> |
4 | | - <view class="uni-pagination__btn" :class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickLeft"> |
5 | | - <template v-if="showIcon===true || showIcon === 'true'"> |
6 | | - <uni-icons color="#000" size="20" type="arrowleft" /> |
7 | | - </template> |
8 | | - <template v-else><text class="uni-pagination__child-btn">{{ prevText }}</text></template> |
9 | | - </view> |
10 | | - <view class="uni-pagination__btn" :class="currentIndex === maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickRight"> |
11 | | - <template v-if="showIcon===true || showIcon === 'true'"> |
12 | | - <uni-icons color="#000" size="20" type="arrowright" /> |
13 | | - </template> |
14 | | - <template v-else><text class="uni-pagination__child-btn">{{ nextText }}</text></template> |
15 | | - </view> |
| 3 | + <view class="uni-pagination__btn" :class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickLeft"> |
| 4 | + <template v-if="showIcon===true || showIcon === 'true'"> |
| 5 | + <uni-icons color="#000" size="20" type="arrowleft" /> |
| 6 | + </template> |
| 7 | + <template v-else><text class="uni-pagination__child-btn">{{ prevText }}</text></template> |
16 | 8 | </view> |
17 | 9 | <view class="uni-pagination__num"> |
18 | 10 | <view class="uni-pagination__num-current"> |
19 | 11 | <text class="uni-pagination__num-current-text" style="color:#007aff">{{ currentIndex }}</text><text class="uni-pagination__num-current-text">/{{ maxPage || 0 }}</text> |
20 | 12 | </view> |
21 | 13 | </view> |
| 14 | + <view class="uni-pagination__btn" :class="currentIndex === maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-stay-time="70" @click="clickRight"> |
| 15 | + <template v-if="showIcon===true || showIcon === 'true'"> |
| 16 | + <uni-icons color="#000" size="20" type="arrowright" /> |
| 17 | + </template> |
| 18 | + <template v-else><text class="uni-pagination__child-btn">{{ nextText }}</text></template> |
| 19 | + </view> |
22 | 20 | </view> |
23 | 21 | </template> |
24 | 22 |
|
|
109 | 107 | /* #ifndef APP-NVUE */ |
110 | 108 | display: flex; |
111 | 109 | /* #endif */ |
112 | | - /* #ifdef APP-NVUE */ |
113 | | - padding: 0 20px; |
114 | | - /* #endif */ |
115 | | - width: 350px; |
116 | 110 | position: relative; |
117 | 111 | overflow: hidden; |
118 | 112 | flex-direction: row; |
119 | 113 | justify-content: center; |
120 | 114 | align-items: center; |
121 | 115 | } |
122 | 116 |
|
123 | | - .uni-pagination__btns { |
124 | | - /* #ifndef APP-NVUE */ |
125 | | - display: flex; |
126 | | - /* #endif */ |
127 | | - flex: 1; |
128 | | - justify-content: space-between; |
129 | | - align-items: center; |
130 | | - flex-direction: row; |
131 | | - } |
132 | | -
|
133 | 117 | .uni-pagination__btn { |
134 | 118 | /* #ifndef APP-NVUE */ |
135 | 119 | display: flex; |
|
165 | 149 | /* #ifndef APP-NVUE */ |
166 | 150 | display: flex; |
167 | 151 | /* #endif */ |
168 | | - position: absolute; |
169 | | - left: 150px; |
170 | | - top: 0; |
| 152 | + flex: 1; |
171 | 153 | flex-direction: row; |
172 | 154 | justify-content: center; |
173 | 155 | align-items: center; |
174 | | - width: 50px; |
175 | 156 | height: 30px; |
176 | 157 | line-height: 30px; |
177 | 158 | font-size: 28rpx; |
|
0 commit comments