hookehuyr

fix(CheckboxField): 修复默认值为空时的初始化问题

当component_props.default未定义时,将checkbox_value初始化为空数组以避免潜在错误
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-10 14:21:45
* @LastEditTime: 2025-06-10 14:38:18
* @FilePath: /data-table/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
......@@ -94,7 +94,7 @@ const validatorMessage = (val, rule) => {
const rules = [{ validator, message: validatorMessage }];
const emit = defineEmits(["active"]);
const checkbox_value = ref(props.item.component_props?.default);
const checkbox_value = ref(props.item.component_props?.default ? props.item.component_props?.default : []);
const affix_value = ref({});
const onClick = (item) => {
......