hookehuyr

✨ feat: 多选控件新增绑定默认值

1 <!-- 1 <!--
2 * @Date: 2022-08-30 11:34:19 2 * @Date: 2022-08-30 11:34:19
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2023-01-17 16:44:05 4 + * @LastEditTime: 2023-01-18 16:21:13
5 * @FilePath: /data-table/src/components/CheckboxField/index.vue 5 * @FilePath: /data-table/src/components/CheckboxField/index.vue
6 * @Description: 多项选择控件 6 * @Description: 多项选择控件
7 --> 7 -->
...@@ -51,7 +51,7 @@ const themeVars = { ...@@ -51,7 +51,7 @@ const themeVars = {
51 }; 51 };
52 onMounted(() => { 52 onMounted(() => {
53 // 默认值为数组 53 // 默认值为数组
54 - props.item.value = []; 54 + props.item.value = props.item.component_props.default;
55 }); 55 });
56 // 隐藏显示 56 // 隐藏显示
57 const HideShow = computed(() => { 57 const HideShow = computed(() => {
......