Commit 4935a91d authored by 王纵's avatar 王纵

优化getBindValue

parent 92492547
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com * @Author: zong.wang01@hand-china.com
* @Date: 2024-07-30 14:39:47 * @Date: 2024-07-30 14:39:47
* @LastEditors: zong.wang01@hand-china.com * @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-09-19 16:16:57 * @LastEditTime: 2024-10-12 15:32:31
* @Version: 1.0.0 * @Version: 1.0.0
* @Description: 工具类 * @Description: 工具类
* @Copyright: Copyright (c) 2021, Hand-RongJing * @Copyright: Copyright (c) 2021, Hand-RongJing
...@@ -287,7 +287,7 @@ const reloadData = (dataSets, type = 'all') => { ...@@ -287,7 +287,7 @@ const reloadData = (dataSets, type = 'all') => {
const getBindValue = (bindStr, record) => { const getBindValue = (bindStr, record) => {
const bindArr = bindStr.split('.'); const bindArr = bindStr.split('.');
if (bindArr.length > 1) { if (bindArr.length > 1) {
return record[bindArr[0]][bindArr[1]]; return record[bindArr[0]] ? record[bindArr[0]][bindArr[1]] : record[bindArr[0]];
} else { } else {
return record[bindArr[0]]; return record[bindArr[0]];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment