mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
--demand 面授课
This commit is contained in:
24
src/components/common/CheckBox.vue
Normal file
24
src/components/common/CheckBox.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<a-checkbox @change="change">
|
||||
<slot></slot>
|
||||
</a-checkbox>
|
||||
</template>
|
||||
<script setup>
|
||||
import {defineEmits, defineProps} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
checkValue: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
unCheckValue: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['update:modelValue']);
|
||||
|
||||
function change({ target: { checked } }) {
|
||||
emit("update:modelValue", checked ? props.checkValue : props.unCheckValue);
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user