tiny-vue/examples/sites/demos/mobile/app/checkbox/checkbox-group.vue

32 lines
603 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-group v-model="checked">
<tiny-checkbox label="复选框1"></tiny-checkbox>
<tiny-checkbox label="复选框2"></tiny-checkbox>
</tiny-checkbox-group>
<p>当前选中的值为{{ checked }}</p>
</div>
</template>
<script>
import { Checkbox, CheckboxGroup } from '@opentiny/vue'
export default {
components: {
TinyCheckbox: Checkbox,
TinyCheckboxGroup: CheckboxGroup
},
data() {
return {
checked: ['复选框1']
}
}
}
</script>
<style scoped>
.checkbox-wrap {
padding: 20px;
}
</style>