优化tableData;新增dataGet;

This commit is contained in:
2024-04-11 10:27:24 +08:00
parent 1c9560cff8
commit 84e879f8f0
5 changed files with 18 additions and 16 deletions

View File

@@ -40,8 +40,8 @@
height: clientHeight,
placeholder: '请选择',
selectConfirmCallback: 'onTableDataConfirm',
type:'input',
className:'layui-input',
type: 'input',
className: 'layui-input',
};
var options = $.extend(defaultOption, data);
@@ -56,7 +56,7 @@
options.index += 'select_mode=' + options.selectType;
if(options.type == 'textarea'){
if (options.type == 'textarea') {
options.className = 'layui-textarea';
}
@@ -82,7 +82,7 @@
if (this.setting.fieldName.indexOf('|') < 0) {
return this.listSelected.map(
(item) => {
item['_select_show'] = item[this.setting.fieldName];
item['_select_show'] = ua.dataGet(item, this.setting.fieldName);
return item;
}
);
@@ -92,7 +92,7 @@
return this.listSelected.map(item => {
var showText = '';
fieldNameList.forEach(fieldName => {
showText += item[fieldName] + ' ';
showText += ua.dataGet(item, fieldName) + ' ';
});
item['_select_show'] = showText;