2020-08-13 15:16:38 +08:00
|
|
|
<template>
|
|
|
|
<div class="block">
|
|
|
|
<el-checkbox v-model="checked" @change="onChange">{{ checked }}</el-checkbox>
|
|
|
|
<el-checkbox v-model="checked1" disabled>{{ checked1 }}</el-checkbox>
|
|
|
|
<el-checkbox v-model="checked2" disabled>{{ checked2 }}</el-checkbox>
|
|
|
|
<el-checkbox v-model="checked1" label="A" border />
|
2020-08-25 10:30:03 +08:00
|
|
|
<el-checkbox v-model="checked2" border />
|
2020-08-28 11:44:04 +08:00
|
|
|
<el-checkbox v-model="checked4" true-label="a" :false-label="3" />
|
|
|
|
{{ checked4 }}
|
2020-08-31 21:45:59 +08:00
|
|
|
<el-checkbox-button v-model="checkbox" label="a" />
|
2020-08-13 15:16:38 +08:00
|
|
|
<el-checkbox-group v-model="checkList">
|
|
|
|
<el-checkbox label="A" />
|
|
|
|
<el-checkbox label="B" />
|
|
|
|
<el-checkbox label="C" />
|
|
|
|
<el-checkbox label="D" disabled />
|
|
|
|
<el-checkbox label="Ha" disabled />
|
|
|
|
</el-checkbox-group>
|
|
|
|
{{ checkList }}
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script lang="tsx">
|
|
|
|
import { defineComponent } from 'vue'
|
|
|
|
export default defineComponent({
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
checked: false,
|
|
|
|
checked1: false,
|
|
|
|
checked2: true,
|
|
|
|
checkList: ['Ha','A'],
|
2020-08-28 11:44:04 +08:00
|
|
|
checked4: 3,
|
2020-08-31 21:45:59 +08:00
|
|
|
checkbox: false,
|
2020-08-13 15:16:38 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
onChange(val) {
|
|
|
|
console.log(val)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
</script>
|