@kaiyinchem/ky-uniui 1.1.8 → 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.
@@ -27,12 +27,12 @@
27
27
  <text class="ky-tab-text">{{ tab[label] }}</text>
28
28
  </view>
29
29
  </view>
30
- <!-- <view
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('#ky-tab-parent')
137
- // vue3版本在真机上不能同时获取两个元素
136
+ const parent = query.select(`#ky_tab_${index}`)
138
137
  parent.boundingClientRect(data => {
139
- // console.log(data)
140
- this.tabItemWidth = data.width / (this.menu.length * 2)
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: 12rpx 0;
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.5s;
254
+ transition: all 0.3s;
261
255
  }
262
256
  }
263
257
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "locale"
10
10
  ],
11
11
  "description": "an uniapp ui",
12
- "version": "1.1.8",
12
+ "version": "1.1.9",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/yezipi/ky-uniui.git"