fix field template removing text (#7549)

This commit is contained in:
Nitwel
2021-08-23 17:20:33 +02:00
committed by GitHub
parent 62b9edc281
commit 9e33413b1e

View File

@@ -247,10 +247,8 @@ export default defineComponent({
const el = node as HTMLElement;
const tag = el.tagName;
if (tag) {
if (tag.toLowerCase() === 'button') return (acc += `{{${el.dataset.field}}}`);
if (tag.toLowerCase() === 'span') return (acc += el.textContent);
}
if (tag && tag.toLowerCase() === 'button') return (acc += `{{${el.dataset.field}}}`);
else if ('textContent' in el) return (acc += el.textContent);
return (acc += '');
}, '');