diff --git a/frontend/src/components/Confirm/index.vue b/frontend/src/components/Confirm/index.vue index 55717768..762612f9 100644 --- a/frontend/src/components/Confirm/index.vue +++ b/frontend/src/components/Confirm/index.vue @@ -90,7 +90,7 @@ marked.use({ dataSource: rows.map((row) => { const record: Record = {} header.forEach(({ text }, index) => { - record[text] = row[index]?.text + record[text] = this.parser.parseInline(row[index]?.tokens || []) }) return record }) @@ -102,12 +102,16 @@ marked.use({ }) const mountCustomComp = (containerId: string, comp: VNode) => { - setTimeout(() => { + let count = 0 + const tryToMount = () => { + if (count >= 3) return + count += 1 const div = document.getElementById(containerId) - if (!div) return + if (!div) return setTimeout(tryToMount, count * 100) render(comp, div) domContainers.push(() => render(null, div)) - }) + } + setTimeout(tryToMount) } const renderContent = async () => { diff --git a/frontend/src/components/Table/index.vue b/frontend/src/components/Table/index.vue index 9889d5c5..c26d1567 100644 --- a/frontend/src/components/Table/index.vue +++ b/frontend/src/components/Table/index.vue @@ -96,13 +96,12 @@ const tableColumns = computed(() => { :key="column.key" :style="{ textAlign: column.align || 'left' }" class="select-text" - > - {{ + v-html=" (column.customRender ? column.customRender({ value: getValue(data, column.key), record: data }) : getValue(data, column.key)) ?? '-' - }} - + " + >