layui/example/docs/zh-CN/components/iconPicker.md

152 lines
1.9 KiB
Markdown
Raw Normal View History

::: anchor
:::
::: title 基本介绍
:::
::: describe 内置 icon 图标选择组件, 常用于权限管理, 菜单定制。
:::
2021-10-26 01:13:23 +08:00
::: title 基础使用
2021-10-19 22:28:44 +08:00
:::
::: demo
<template>
<lay-icon-picker type="layui-icon-face-smile"></lay-icon-picker>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const icon = ref("layui-icon-home")
return {
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title 默认选择
2021-10-19 22:28:44 +08:00
:::
::: demo
<template>
2021-10-07 22:47:51 +08:00
<lay-icon-picker v-model="icon" type="layui-icon-face-smile"></lay-icon-picker>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
2021-10-07 22:47:51 +08:00
const icon = ref("layui-icon-home")
return {
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title 开启分页
2021-10-19 22:28:44 +08:00
:::
::: demo
<template>
<lay-icon-picker v-model="icon" type="layui-icon-face-smile" page></lay-icon-picker>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const icon = ref("layui-icon-home")
return {
}
}
}
</script>
2021-10-08 11:09:44 +08:00
:::
2021-10-26 01:13:23 +08:00
::: title 开启搜索
2021-10-19 22:28:44 +08:00
:::
::: 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>
:::
2022-03-18 16:41:54 +08:00
::: title 静态面板
:::
::: demo
<template>
<lay-icon-picker v-model="icon" type="layui-icon-face-smile" page showSearch position="static"></lay-icon-picker>
</template>
<script>
import { ref } from 'vue'
export default {
setup() {
const icon = ref("layui-icon-home")
return {
}
}
}
</script>
:::
2021-10-26 01:13:23 +08:00
::: title icon-picker 属性
2021-10-13 10:04:43 +08:00
:::
2021-10-12 18:00:09 +08:00
2021-11-07 15:55:08 +08:00
::: table
| | | |
| ---------- | -------- | --- |
| v-model | 默认值 | -- |
| page | 开启分页 | -- |
| showSearch | 启用搜索 | -- |
2021-11-07 15:55:08 +08:00
2021-11-07 15:56:24 +08:00
:::
2021-12-16 17:57:59 +08:00
::: comment
2022-01-12 14:19:06 +08:00
:::
::: previousNext iconPicker
2021-12-16 17:57:59 +08:00
:::