mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 18:01:24 +08:00
bc57317bea
fix #82
31 lines
538 B
Vue
31 lines
538 B
Vue
<template>
|
|
<div>
|
|
<div>
|
|
use v-model
|
|
<el-switch v-model="v" />
|
|
</div>
|
|
<div>
|
|
use :value
|
|
<el-switch :value="value" @change="value = $event" />
|
|
</div>
|
|
<div>
|
|
use :model-value
|
|
<el-switch :model-value="modelValue" @update:modelValue="modelValue = $event" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue'
|
|
export default defineComponent({
|
|
data() {
|
|
return {
|
|
v: true,
|
|
value: true,
|
|
modelValue: true,
|
|
}
|
|
},
|
|
})
|
|
</script>
|
|
|