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-08-20 10:06:41 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f7f1b0e667770e7720f0a978da7d2f9177882b15
f7f1b0e6
1 parent
4bff9339
手动选中联系人-多选组件数据结构调整
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
src/views/index.vue
src/views/index.vue
View file @
f7f1b0e
<!--
* @Date: 2022-07-18 10:22:22
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-08-19
16:40:08
* @LastEditTime: 2024-08-19
23:05:12
* @FilePath: /data-table/src/views/index.vue
* @Description: 首页
-->
...
...
@@ -545,13 +545,17 @@ onMounted(async () => {
// TODO: iframe通信-读取联系人身份证信息
window.addEventListener('message', (ev) => {
let data = ev.data || null;
// console.warn('读取联系人身份证信息', data);
if (data.length) {
console.warn('读取联系人身份证信息', data);
const objectMap = new Map(data?.map(item => [item.key, item.value]));
formData.value.forEach((item) => {
// TODO: 绑定别名字段-待确定
if (objectMap.has(item.component_props.tag)) {
item.component_props.default = objectMap.get(item.component_props.tag);
// 绑定别名字段
if (objectMap.has(item.component_props.alias)) {
if (item.component_props.tag === 'checkbox') { // 多选组件值需要转换为数组
item.component_props.default = objectMap.get(item.component_props.alias).trim().split(' ');
} else {
item.component_props.default = objectMap.get(item.component_props.alias);
}
}
});
}
...
...
Please
register
or
login
to post a comment