feat: add switch onswitch-icon and unswitch-icon slot
This commit is contained in:
@@ -117,6 +117,35 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: title 图标插槽
|
||||
:::
|
||||
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-switch v-model="active5">
|
||||
<template #onswitch-icon>😄</template>
|
||||
<template #unswitch-icon>🤔</template>
|
||||
</lay-switch>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const active5 = ref(true)
|
||||
|
||||
return {
|
||||
active5
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
::: title Switch 属性
|
||||
:::
|
||||
|
||||
|
||||
@@ -170,6 +170,7 @@ export default {
|
||||
| dataSource | 数据来源 | -- |
|
||||
| title | 标题 | -- |
|
||||
| id | 主键 | -- |
|
||||
| showSearch | 开启搜索 | -- |
|
||||
|
||||
:::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user