preload tree for display template properly (#8849)

This commit is contained in:
Nitwel
2021-10-16 01:06:29 +02:00
committed by GitHub
parent 362c751e47
commit bcbc55cf43

View File

@@ -277,7 +277,13 @@ export default defineComponent({
return `<span class="text">${part}</span>`;
}
const fieldKey = part.replace(/({|})/g, '').trim();
const field = findTree(treeList.value, fieldKey.split('.'));
const fieldPath = fieldKey.split('.');
for (let i = 0; i < fieldPath.length; i++) {
loadFieldRelations(fieldPath.slice(0, i).join('.'));
}
const field = findTree(treeList.value, fieldPath);
if (!field) return '';