Skip to content

Commit

Permalink
处理微信小程序numberbox和tabs的演示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wlxuqu committed Nov 3, 2021
1 parent a107966 commit b574450
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
6 changes: 4 additions & 2 deletions pages/componentsB/numberBox/numberBox.nvue
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,13 @@
},
methods: {
change(e) {
// console.log('change', e);
console.log('change', e);
},
myAsyncChange(e) {
this.asyncChange = false
uni.showLoading()
uni.showLoading({
title: '正在加载'
})
setTimeout(() => {
uni.hideLoading()
this.value9 = e
Expand Down
8 changes: 4 additions & 4 deletions uni_modules/uview-v2/components/u-number-box/u-number-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<view
class="u-number-box__slot"
@tap.stop="clickHandler('minus')"
@touchstart.stop="onTouchStart('minus')"
@touchstart="onTouchStart('minus')"
@touchend.stop="clearTimeout"
v-if="showMinus && $slots.minus"
>
Expand All @@ -13,7 +13,7 @@
v-else-if="showMinus"
class="u-number-box__minus"
@tap.stop="clickHandler('minus')"
@touchstart.stop="onTouchStart('minus')"
@touchstart="onTouchStart('minus')"
@touchend.stop="clearTimeout"
hover-class="u-number-box__minus--hover"
hover-stay-time="150"
Expand Down Expand Up @@ -46,7 +46,7 @@
<view
class="u-number-box__slot"
@tap.stop="clickHandler('plus')"
@touchstart.stop="onTouchStart('plus')"
@touchstart="onTouchStart('plus')"
@touchend.stop="clearTimeout"
v-if="showPlus && $slots.plus"
>
Expand All @@ -56,7 +56,7 @@
v-else-if="showPlus"
class="u-number-box__plus"
@tap.stop="clickHandler('plus')"
@touchstart.stop="onTouchStart('plus')"
@touchstart="onTouchStart('plus')"
@touchend.stop="clearTimeout"
hover-class="u-number-box__plus--hover"
hover-stay-time="150"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@
export default {
name: 'u-tabbar-item',
mixins: [uni.$u.mixin,props],
// #ifdef MP-WEIXIN
// 将自定义节点设置成虚拟的,更加接近Vue组件的表现,能更好的使用flex属性
options: {
virtualHost: true
},
// #endif
data() {
return {
isActive: false, // 是否处于激活状态
Expand Down
1 change: 1 addition & 0 deletions uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
.u-tabbar {
@include flex(column);
flex: 1;
justify-content: center;
&__content {
@include flex(column);
Expand Down
4 changes: 2 additions & 2 deletions uni_modules/uview-v2/components/u-tabs/u-tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
:class="['ellipsis' && 'u-line-1', item.disabled && 'u-tabs__wrapper__nav__item__text--disabled']"
class="u-tabs__wrapper__nav__item__text"
:style="[textStyle(index)]"
>{{ item.name }}</text>
>{{ item.name }}</text>
<u-badge
:show="item.badge && (item.badge.show || item.badge.isDot || item.value)"
:show="item.badge && (item.badge.show || item.badge.isDot || item.badge.value)"
:isDot="item.badge && item.badge.isDot || $u.props.badge.isDot"
:value="item.badge && item.badge.value || $u.props.badge.value"
:max="item.badge && item.badge.max || $u.props.badge.max"
Expand Down

0 comments on commit b574450

Please sign in to comment.