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

28 lines
749 B
Vue
Raw Normal View History

2017-11-03 10:46:18 +00:00
<template>
2018-01-23 10:55:39 +00:00
<a-checkbox-group @change="onChange">
<AntRow>
2018-01-23 10:55:39 +00:00
<AntCol :span="8"><a-checkbox value="A">A</a-checkbox></AntCol>
<AntCol :span="8"><a-checkbox value="B">B</a-checkbox></AntCol>
<AntCol :span="8"><a-checkbox value="C">C</a-checkbox></AntCol>
<AntCol :span="8"><a-checkbox value="D">D</a-checkbox></AntCol>
<AntCol :span="8"><a-checkbox value="E">E</a-checkbox></AntCol>
</AntRow>
2018-01-23 10:55:39 +00:00
</a-checkbox-group>
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>