|
|
|
@ -9,28 +9,23 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
name: { |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
id: { |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
value: {}, |
|
|
|
label: {}, |
|
|
|
}, |
|
|
|
<script setup> |
|
|
|
import {computed} from 'vue'; |
|
|
|
|
|
|
|
computed: { |
|
|
|
inner: { |
|
|
|
get() { |
|
|
|
return this.value; |
|
|
|
}, |
|
|
|
set(v) { |
|
|
|
this.$emit('input', v === true); |
|
|
|
}, |
|
|
|
}, |
|
|
|
const emit = defineEmits(['update:modelValue']); |
|
|
|
const props = defineProps({ |
|
|
|
name: { |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
id: { |
|
|
|
required: true, |
|
|
|
}, |
|
|
|
}; |
|
|
|
modelValue: {}, |
|
|
|
label: {}, |
|
|
|
}); |
|
|
|
|
|
|
|
const inner = computed({ |
|
|
|
get: () => props.modelValue, |
|
|
|
set: (v) => emit('update:modelValue', v === true), |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|