mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-03 19:58:09 +08:00
cd646824c2
* refactor(components): el-swtich custom texts and icons * fix: test * fix: font size * fix: example margin * feat(components): el-switch add inline-prompt support * revert: paly * docs: update icons * feat: add inner text * fix: switch test * refactor: icon inline
28 lines
502 B
Vue
28 lines
502 B
Vue
<template>
|
|
<el-switch v-model="value1" :active-icon="active" :inactive-icon="inactive">
|
|
</el-switch>
|
|
<br />
|
|
<el-switch
|
|
v-model="value2"
|
|
style="margin-left: 24px"
|
|
inline-prompt
|
|
:active-icon="active"
|
|
:inactive-icon="inactive"
|
|
>
|
|
</el-switch>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Check, Close } from '@element-plus/icons'
|
|
export default {
|
|
data() {
|
|
return {
|
|
value1: true,
|
|
value2: true,
|
|
active: Check,
|
|
inactive: Close,
|
|
}
|
|
},
|
|
}
|
|
</script>
|