Skip to content

Commit 14e4fb3

Browse files
committed
update(uni-ui): uni-list-item slot right
1 parent 3f070a0 commit 14e4fb3

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

components/uni-list-item/uni-list-item.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
<text class="uni-list-item__content-title">{{ title }}</text>
1616
<text v-if="note" class="uni-list-item__content-note">{{ note }}</text>
1717
</view>
18-
<view v-if="showBadge || showArrow || showSwitch" class="uni-list-item__extra">
18+
<view class="uni-list-item__extra">
1919
<text v-if="rightText" class="uni-list-item__extra-text">{{rightText}}</text>
2020
<uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" />
2121
<switch v-if="showSwitch" :disabled="disabled" :checked="switchChecked" @change="onSwitchChange" />
22+
<slot name="right"></slot>
2223
<uni-icons v-if="showArrow" :size="20" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
2324
</view>
2425
</view>

pages.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,14 +1117,14 @@
11171117
"navigationBarTitleText": "swiper-list"
11181118
}
11191119
},
1120-
// #endif
1121-
// #ifdef APP-PLUS
1122-
{
1123-
"path": "swiper-list-nvue/swiper-list-nvue",
1124-
"style": {
1125-
"navigationBarTitleText": "swiper-list"
1126-
}
1127-
},
1120+
// #endif
1121+
// #ifdef APP-PLUS
1122+
{
1123+
"path": "swiper-list-nvue/swiper-list-nvue",
1124+
"style": {
1125+
"navigationBarTitleText": "swiper-list"
1126+
}
1127+
},
11281128
// #endif
11291129
{
11301130
"path": "scheme/scheme",
@@ -1190,4 +1190,4 @@
11901190
}
11911191
]
11921192
}
1193-
}
1193+
}

pages/extUI/list/list.nvue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
<uni-section title="菜单列表" type="line"></uni-section>
1111
<uni-list>
1212
<uni-list-item title="列表右侧带箭头" rightText="右侧文字" />
13+
<uni-list-item title="右侧插槽" :showArrow="false">
14+
<template v-slot:right="">
15+
<image style="width: 40px;height: 40px;" src="/static/logo.png" mode="widthFix"></image>
16+
</template>
17+
</uni-list-item>
1318
<uni-list-item :show-badge="true" title="列表右侧带箭头 + 角标" badge-text="12" />
1419
<uni-list-item title="列表左侧带略缩图" thumb="https://img-cdn-qiniu.dcloud.net.cn/new-page/uni.png" />
1520
<uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" title="列表左侧带扩展图标" />

0 commit comments

Comments
 (0)