fix: 修复布尔类型值类型是布尔的情况下不能编辑
This commit is contained in:
parent
e17ead51c3
commit
09e56c4d0c
|
@ -47,8 +47,7 @@ const emit = defineEmits<Emits>()
|
|||
const props = defineProps({
|
||||
value: {
|
||||
type: Object as PropType<ModelValueType>,
|
||||
default: () => ({
|
||||
})
|
||||
default: () => ({})
|
||||
},
|
||||
name: {
|
||||
type: Array as PropType<(string| number)[]>,
|
||||
|
@ -67,6 +66,15 @@ onMounted(() => {
|
|||
})
|
||||
})
|
||||
|
||||
watchEffect(() => {
|
||||
if (typeof props.value.trueValue === 'boolean') {
|
||||
props.value.trueValue = String(props.value.trueValue)
|
||||
}
|
||||
if (typeof props.value.falseValue === 'boolean') {
|
||||
props.value.falseValue = String(props.value.falseValue)
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.boolean-param {
|
||||
|
|
Loading…
Reference in New Issue