mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +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
41 lines
732 B
Vue
41 lines
732 B
Vue
<template>
|
|
<el-switch
|
|
v-model="value1"
|
|
active-text="Pay by month"
|
|
inactive-text="Pay by year"
|
|
>
|
|
</el-switch>
|
|
<br />
|
|
<el-switch
|
|
v-model="value2"
|
|
active-color="#13ce66"
|
|
inactive-color="#ff4949"
|
|
active-text="Pay by month"
|
|
inactive-text="Pay by year"
|
|
/>
|
|
<br />
|
|
<el-switch v-model="value3" inline-prompt active-text="是" inactive-text="否">
|
|
</el-switch>
|
|
<el-switch
|
|
v-model="value4"
|
|
inline-prompt
|
|
active-color="#13ce66"
|
|
inactive-color="#ff4949"
|
|
active-text="Y"
|
|
inactive-text="N"
|
|
/>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
export default {
|
|
data() {
|
|
return {
|
|
value1: true,
|
|
value2: true,
|
|
value3: true,
|
|
value4: true,
|
|
}
|
|
},
|
|
}
|
|
</script>
|