From 8c047f7da19d7e59136a322e1a851d4b6b0eab97 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期四, 06 三月 2025 17:30:31 +0800 Subject: [PATCH] - --- src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue b/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue index 52bbbe6..2675865 100644 --- a/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue +++ b/src/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue @@ -4,7 +4,7 @@ :class="[`u-steps-item__line--${parentData.direction}`]" :style="[lineStyle]"></view> <view class="u-steps-item__wrapper" :class="[`u-steps-item__wrapper--${parentData.direction}`, parentData.dot && `u-steps-item__wrapper--${parentData.direction}--dot`]" - :style="[itemStyle]"> + :style="[itemStyleInner]"> <slot name="icon"> <view class="u-steps-item__wrapper__dot" v-if="parentData.dot" :style="{ backgroundColor: statusColor @@ -32,11 +32,15 @@ </view> <view class="u-steps-item__content" :class="[`u-steps-item__content--${parentData.direction}`]" :style="[contentStyle]"> - <up-text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px" - :size="parentData.current == index ? 14 : 13"></up-text> - <slot name="desc"> - <up-text :text="desc" type="tips" size="12"></up-text> + <slot name="content"> </slot> + <template v-if="!$slots['content']"> + <up-text :text="title" :type="parentData.current == index ? 'main' : 'content'" lineHeight="20px" + :size="parentData.current == index ? 14 : 13"></up-text> + <slot name="desc"> + <up-text :text="desc" type="tips" size="12"></up-text> + </slot> + </template> </view> <!-- <view class="u-steps-item__line" @@ -117,7 +121,7 @@ .current ? this.parentData.activeColor : this.parentData.inactiveColor return style }, - itemStyle() { + itemStyleInner() { return { ...this.itemStyle } -- Gitblit v1.9.1