ant-design-vue/components/checkbox/demo/layout.vue

28 lines
723 B
Vue
Raw Normal View History

2017-11-03 10:46:18 +00:00
<template>
2017-11-06 09:46:08 +00:00
<CheckboxGroup @change="onChange">
<AntRow>
<AntCol :span="8"><Checkbox value="A">A</Checkbox></AntCol>
<AntCol :span="8"><Checkbox value="B">B</Checkbox></AntCol>
<AntCol :span="8"><Checkbox value="C">C</Checkbox></AntCol>
<AntCol :span="8"><Checkbox value="D">D</Checkbox></AntCol>
<AntCol :span="8"><Checkbox value="E">E</Checkbox></AntCol>
</AntRow>
2017-11-06 09:46:08 +00:00
</CheckboxGroup>
2017-11-03 10:46:18 +00:00
</template>
<script>
2017-11-06 09:46:08 +00:00
import { Checkbox, Row, Col } from 'antd'
2017-11-03 10:46:18 +00:00
export default {
methods: {
2017-11-06 09:46:08 +00:00
onChange (checkedValues) {
console.log('checked = ', checkedValues)
2017-11-03 10:46:18 +00:00
},
},
components: {
Checkbox,
AntRow: Row,
AntCol: Col,
2017-11-06 09:46:08 +00:00
CheckboxGroup: Checkbox.Group,
2017-11-03 10:46:18 +00:00
},
}
</script>