feat: add switch onswitch-icon and unswitch-icon slot

This commit is contained in:
就眠儀式
2022-03-24 04:23:24 +08:00
parent 5df0a0dea6
commit ce356012ce
9 changed files with 50 additions and 27 deletions

View File

@@ -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 属性
:::