修改自定义内容的数据

v1.1.0
于肖磊 2024-12-10 18:30:43 +08:00
parent d618bad9bc
commit 86d61b06c9
1 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ const text_title = computed(() => {
if (data_source_id.length > 0) {
//
data_source_id.forEach((source_id: string) => {
const sourceList = option.filter((item: any) => item.field == source_id);
const sourceList = option.find((item: any) => item.field == source_id);
// ID
if (source_id.includes(';')) {
const ids = source_id.split(';');
@ -91,9 +91,9 @@ const text_title = computed(() => {
ids.forEach((item: string, index: number) => {
text += data_handling(item) + (index != ids.length - 1 ? (sourceList?.join || '') : '');
});
text_title += (sourceList?.first || '') + text + (sourceList?.last || '');
text_title += (sourceList?.first || '') + (text == '' && !props.isDisplayPanel ? sourceList?.name || '请在此输入文字' : text ) + (sourceList?.last || '');
} else {
text_title += (sourceList?.first || '') + data_handling(source_id) + (sourceList?.last || '');
text_title += (sourceList?.first || '') + (data_handling(source_id) == '' && !props.isDisplayPanel ? sourceList?.name || '请在此输入文字' : data_handling(source_id) ) + (sourceList?.last || '');
}
});
}
@ -107,7 +107,7 @@ const text_title = computed(() => {
// 使使
let text = formValue.text_title || text_title || '';
if (text == '' && !props.isDisplayPanel) {
text = props.options.find((item: any) => item.field === data_source_id)?.name || '请在此输入文字';
text = '请在此输入文字';
}
return text;
}