uview-plus组件库全面升级更新,订单结算判断支付方式是否可用代码调整,公众号关注二维码修改
This commit is contained in:
@@ -27,6 +27,15 @@
|
||||
item.disabled && 'u-tabs__wrapper__nav__item--disabled',
|
||||
innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']"
|
||||
>
|
||||
<slot v-if="$slots.icon" name="icon" :item="item" :keyName="keyName" :index="index" />
|
||||
<template v-else>
|
||||
<view class="u-tabs__wrapper__nav__item__prefix-icon" v-if="item.icon">
|
||||
<up-icon
|
||||
:name="item.icon"
|
||||
:customStyle="addStyle(iconStyle)"
|
||||
></up-icon>
|
||||
</view>
|
||||
</template>
|
||||
<slot v-if="$slots.content" name="content" :item="item" :keyName="keyName" :index="index" />
|
||||
<slot v-else-if="!$slots.content && ($slots.default || $slots.$default)"
|
||||
:item="item" :keyName="keyName" :index="index" />
|
||||
@@ -169,7 +178,14 @@
|
||||
},
|
||||
async mounted() {
|
||||
this.init()
|
||||
this.windowResizeCallback = (res) => {
|
||||
this.init()
|
||||
}
|
||||
uni.onWindowResize(this.windowResizeCallback)
|
||||
},
|
||||
beforeUnmount() {
|
||||
uni.offWindowResize(this.windowResizeCallback)
|
||||
},
|
||||
emits: ['click', 'longPress', 'change', 'update:current'],
|
||||
methods: {
|
||||
addStyle,
|
||||
@@ -220,6 +236,8 @@
|
||||
}, index)
|
||||
// 如果disabled状态,返回
|
||||
if (item.disabled) return
|
||||
// 如果点击当前不触发change
|
||||
if (this.innerCurrent == index) return
|
||||
this.innerCurrent = index
|
||||
this.resize()
|
||||
this.$emit('update:current', index)
|
||||
@@ -328,7 +346,6 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../libs/css/components.scss";
|
||||
|
||||
.u-tabs {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user