* fix: collapse 组件slot修改 * fix: searchbar 组件slot修改
@@ -29,7 +29,7 @@
<h2>{{ translate('basic7') }}</h2>
<nut-searchbar v-model="searchValue6">
- <template v-slot:clearIcon>
+ <template v-slot:clear-icon>
<img :src="icon" style="width: 20px; height: 20px" />
</template>
</nut-searchbar>
@@ -152,7 +152,7 @@ export default {
```html
<template>
<nut-searchbar v-model="searchValue">
<img :src="icon" style="width: 10px; height: 10px" />
@@ -151,7 +151,7 @@ export default {
@@ -149,7 +149,7 @@ app.use(Searchbar);
@@ -33,8 +33,8 @@
v-if="clearable"
v-show="String(modelValue).length > 0"
>
- <template v-if="$slots.clearIcon">
- <slot name="clearIcon"></slot>
+ <template v-if="$slots['clear-icon']">
+ <slot name="clear-icon"></slot>
<component :is="renderIcon(clearIcon)" v-else></component>
</view>
@@ -36,8 +36,8 @@