@kaiyinchem/ky-uniui 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ky-fetch.vue +4 -4
- package/components/ky-tab.vue +8 -14
- package/package.json +1 -1
package/components/ky-fetch.vue
CHANGED
|
@@ -197,10 +197,10 @@
|
|
|
197
197
|
delete params.size
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
if (this.noLoadmore) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
200
|
+
// if (this.noLoadmore) {
|
|
201
|
+
// delete params.page
|
|
202
|
+
// delete params.size
|
|
203
|
+
// }
|
|
204
204
|
|
|
205
205
|
try {
|
|
206
206
|
const apiUrl = this.api.split('.')
|
package/components/ky-tab.vue
CHANGED
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
<text class="ky-tab-text">{{ tab[label] }}</text>
|
|
28
28
|
</view>
|
|
29
29
|
</view>
|
|
30
|
-
|
|
30
|
+
<view
|
|
31
31
|
v-if="tabItemWidth > 0 && !hasIcon"
|
|
32
32
|
:style="{ left: tabItemOffsetLeft + 'px', width: tabItemWidth + 'px', 'background-color': activeColor }"
|
|
33
|
-
class="tab-slider"
|
|
33
|
+
class="ky-tab-slider"
|
|
34
34
|
>
|
|
35
|
-
</view>
|
|
35
|
+
</view>
|
|
36
36
|
</view>
|
|
37
37
|
</scroll-view>
|
|
38
38
|
</template>
|
|
@@ -133,12 +133,10 @@
|
|
|
133
133
|
return
|
|
134
134
|
}
|
|
135
135
|
const query = uni.createSelectorQuery().in(this)
|
|
136
|
-
const parent = query.select(
|
|
137
|
-
// vue3版本在真机上不能同时获取两个元素
|
|
136
|
+
const parent = query.select(`#ky_tab_${index}`)
|
|
138
137
|
parent.boundingClientRect(data => {
|
|
139
|
-
|
|
140
|
-
this.
|
|
141
|
-
this.tabItemOffsetLeft = index * this.tabItemWidth * 2 + (data.left || (this.tabItemWidth/2.75))
|
|
138
|
+
this.tabItemWidth = data.width
|
|
139
|
+
this.tabItemOffsetLeft = data.left
|
|
142
140
|
if (this.tabIndex === index) {
|
|
143
141
|
return
|
|
144
142
|
}
|
|
@@ -223,15 +221,12 @@
|
|
|
223
221
|
justify-content: space-around;
|
|
224
222
|
.ky-tab-item {
|
|
225
223
|
margin: 0 12rpx;
|
|
226
|
-
padding:
|
|
224
|
+
padding: 15rpx 0;
|
|
227
225
|
transition: all 0.3s;
|
|
228
226
|
color: var(--color-gray);
|
|
229
|
-
border-bottom: 2px solid rgba(255,255,255,0);
|
|
230
|
-
box-sizing: border-box;
|
|
231
227
|
&.active {
|
|
232
228
|
font-weight: bold;
|
|
233
229
|
color: var(--color-primary);
|
|
234
|
-
border-color: var(--color-primary);
|
|
235
230
|
}
|
|
236
231
|
&.icon {
|
|
237
232
|
font-weight: normal;
|
|
@@ -255,9 +250,8 @@
|
|
|
255
250
|
height: 6rpx;
|
|
256
251
|
border-radius: 12rpx;
|
|
257
252
|
width: 50rpx;
|
|
258
|
-
left: 15%;
|
|
259
253
|
bottom: 0;
|
|
260
|
-
transition: all 0.
|
|
254
|
+
transition: all 0.3s;
|
|
261
255
|
}
|
|
262
256
|
}
|
|
263
257
|
}
|