Files
element-plus/docs/examples/switch/custom-icons.vue
Aex f78407a409 fix(components): empty icon component judgment (#4178)
* fix(components): empty icon component judgment

* revert: globals components

* fix(components): el-icon missing import

* fix: use shallowRef for icon components

* refactor: remove shallowRef

* fix: remove unused code

* fix: social-link icon size

* fix: time picker icon

* fix: v-if judge
2021-11-05 17:44:02 +08:00

21 lines
438 B
Vue

<template>
<el-switch v-model="value1" :active-icon="Check" :inactive-icon="Close">
</el-switch>
<br />
<el-switch
v-model="value2"
style="margin-left: 24px"
inline-prompt
:active-icon="Check"
:inactive-icon="Close"
>
</el-switch>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { Check, Close } from '@element-plus/icons'
const value1 = ref(true)
const value2 = ref(true)
</script>