tiny-vue/examples/sites/demos/mobile-first/app/switch/custom-true-false-value.vue

29 lines
476 B
Vue

<template>
<div>
<tiny-switch v-model="value" true-value="yes" false-value="no" types="word">
<template #open>
<span></span>
</template>
<template #close>
<span></span>
</template>
</tiny-switch>
当前值: {{ value }}
</div>
</template>
<script>
import { Switch } from '@opentiny/vue'
export default {
components: {
TinySwitch: Switch
},
data() {
return {
value: 'yes'
}
}
}
</script>