feat(iconPicker): iconPicker 新增 showSearch 配置, 是否启用搜索

This commit is contained in:
就眠仪式 2021-10-11 03:22:06 +08:00
parent 71fea6ee35
commit 223e377085
2 changed files with 27 additions and 3 deletions

View File

@ -64,7 +64,30 @@ export default {
:::
::: demo
<template>
<lay-icon-picker v-model="icon" type="layui-icon-face-smile" page showSearch></lay-icon-picker>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const icon = ref("layui-icon-home")
return {
}
}
}
</script>
:::
| | | |
|--|--|--|
| v-model | 默认值 | -- |
| page | 开启分页 | -- |
| page | 开启分页 | -- |
| showSearch | 启用搜索 | -- |

View File

@ -14,7 +14,7 @@
</div>
<template #content>
<div class="layui-iconpicker-view layui-iconpicker-scroll">
<div class="layui-iconpicker-search">
<div class="layui-iconpicker-search" v-if="showSearch">
<div class="layui-form layui-input-wrap layui-input-wrap-prefix">
<div class="layui-input-prefix">
<i class="layui-icon layui-icon-search"></i>
@ -86,10 +86,11 @@ const props = withDefaults(
defineProps<{
modelValue?: string
page?: boolean
showSearch?: boolean
}>(),
{
modelValue: 'layui-icon-face-smile',
page: false,
page: false
}
)