Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-06-13 18:40:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
649122bcb4ed2ae37cad36c4ce650943fb764431
649122bc
1 parent
4a5a6236
fix 勾选状态问题导致补充信息无法保存
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
src/components/CheckboxField/index.vue
src/components/CheckboxField/index.vue
View file @
649122b
<!--
* @Date: 2022-08-30 11:34:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-13 1
5:27:37
* @LastEditTime: 2024-06-13 1
8:38:10
* @FilePath: /data-table/src/components/CheckboxField/index.vue
* @Description: 多项选择控件
-->
...
...
@@ -128,6 +128,16 @@ onMounted(() => {
} else { // 纯多选情况
checkbox_value.value = arr;
}
// 同步数据结构中的checked属性
props.item.component_props.options.forEach(item => {
checkbox_value.value.forEach(x => {
if (item.value === x) {
item.checked = true;
}
})
});
// 发送自定义数据结构
props.item.value = { key: props.item.key, value: checkbox_value.value, affix: affix_value.value, type: "checkbox" };
emit("active", props.item.value);
...
...
Please
register
or
login
to post a comment