From b574450491846aac0519c683a2a57e3272b7ba38 Mon Sep 17 00:00:00 2001 From: yiruiwen <1416956117@qq.com> Date: Wed, 3 Nov 2021 11:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=BE=AE=E4=BF=A1=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8Fnumberbox=E5=92=8Ctabs=E7=9A=84=E6=BC=94?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/componentsB/numberBox/numberBox.nvue | 6 ++++-- .../uview-v2/components/u-number-box/u-number-box.vue | 8 ++++---- .../uview-v2/components/u-tabbar-item/u-tabbar-item.vue | 7 ++++++- uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue | 1 + uni_modules/uview-v2/components/u-tabs/u-tabs.vue | 4 ++-- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/pages/componentsB/numberBox/numberBox.nvue b/pages/componentsB/numberBox/numberBox.nvue index f43dc80e..2d4e9f8d 100644 --- a/pages/componentsB/numberBox/numberBox.nvue +++ b/pages/componentsB/numberBox/numberBox.nvue @@ -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 diff --git a/uni_modules/uview-v2/components/u-number-box/u-number-box.vue b/uni_modules/uview-v2/components/u-number-box/u-number-box.vue index d2035670..065b7b3c 100644 --- a/uni_modules/uview-v2/components/u-number-box/u-number-box.vue +++ b/uni_modules/uview-v2/components/u-number-box/u-number-box.vue @@ -3,7 +3,7 @@ @@ -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" @@ -46,7 +46,7 @@ @@ -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" diff --git a/uni_modules/uview-v2/components/u-tabbar-item/u-tabbar-item.vue b/uni_modules/uview-v2/components/u-tabbar-item/u-tabbar-item.vue index 68194e75..6a00d03b 100644 --- a/uni_modules/uview-v2/components/u-tabbar-item/u-tabbar-item.vue +++ b/uni_modules/uview-v2/components/u-tabbar-item/u-tabbar-item.vue @@ -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, // 是否处于激活状态 diff --git a/uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue b/uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue index 8ae20bcc..0ec5214a 100644 --- a/uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue +++ b/uni_modules/uview-v2/components/u-tabbar/u-tabbar.vue @@ -118,6 +118,7 @@ .u-tabbar { @include flex(column); flex: 1; + justify-content: center; &__content { @include flex(column); diff --git a/uni_modules/uview-v2/components/u-tabs/u-tabs.vue b/uni_modules/uview-v2/components/u-tabs/u-tabs.vue index b463c4b8..e207d30e 100644 --- a/uni_modules/uview-v2/components/u-tabs/u-tabs.vue +++ b/uni_modules/uview-v2/components/u-tabs/u-tabs.vue @@ -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 }} + >{{ item.name }}