Skip to content

Commit 4fbe556

Browse files
author
xuqingkai
committed
docs: ✏️ 修复Segment演示demo在钉钉小程序平台展示异常的问题
1 parent 320e4dd commit 4fbe556

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

docs/component/segmented.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<wd-segmented :options="list1" v-model:value="current4" :vibrate-short="true">
5656
<template #label="{ option }">
5757
<view class="section-slot">
58-
<wd-img round width="32px" height="32px" :src="option.payload.avatar" />
58+
<image style="border-radius: 50%; width: 32px; height: 32px" :src="option.payload.avatar" />
5959
<view class="name">
6060
{{ option.value }}
6161
</view>

src/pages/segmented/Index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
<wd-segmented :options="list1" v-model:value="current4" :vibrate-short="true">
3737
<template #label="{ option }">
3838
<view class="section-slot">
39-
<wd-img round width="32px" height="32px" :src="option.payload.avatar" />
39+
<image style="border-radius: 50%; width: 32px; height: 32px" :src="option.payload.avatar" />
40+
4041
<view class="name">
4142
{{ option.value }}
4243
</view>

src/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
:key="index"
1010
>
1111
<view class="wd-segmented__item-label">
12-
<slot name="label" :option="isObj(option) ? option : { value: option }"></slot>
13-
<template v-if="!$slots.label">
12+
<slot name="label" v-if="$slots.label" :option="isObj(option) ? option : { value: option }"></slot>
13+
<template v-else>
1414
{{ isObj(option) ? option.value : option }}
1515
</template>
1616
</view>

0 commit comments

Comments
 (0)