tiny-vue/examples/sites/demos/mobile/app/checkbox/event-change.vue

32 lines
487 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="checkbox-wrap">
<tiny-checkbox v-model="checked" @change="handleChange">复选框</tiny-checkbox>
</div>
</template>
<script lang="jsx">
import { Checkbox } from '@opentiny/vue'
export default {
components: {
TinyCheckbox: Checkbox
},
data() {
return {
checked: true
}
},
methods: {
handleChange(val) {
console.log('当前值为' + val)
}
}
}
</script>
<style>
.checkbox-wrap {
padding: 20px;
}
</style>