From 2d3534f731df11c4bc83db28885690790ca75313 Mon Sep 17 00:00:00 2001 From: Baghi330 Date: Sat, 14 Feb 2026 15:36:24 +0330 Subject: [PATCH] children --- app/components/auto-import/TiptapEditor.vue | 10 +++------- .../lazy-load/data-entry/RelationEdit.vue | 20 +++++++++---------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/app/components/auto-import/TiptapEditor.vue b/app/components/auto-import/TiptapEditor.vue index ab88bcf..e206a33 100755 --- a/app/components/auto-import/TiptapEditor.vue +++ b/app/components/auto-import/TiptapEditor.vue @@ -249,24 +249,20 @@ function generateDetailsHtml(item) { let html = `
`; html += ``; if (item.tag) { - html += ` ${item.tag} `; + html += `${item.tag} `; } - html += `${escapeHtml(item.title) || "بدون عنوان"}`; if (item.link_url) { html += `${item.link_label}`; } - html += ""; + html += ``; - const formattedContent = formatContent(item.content || ""); - html += `
${formattedContent}
`; + html += formatContent(item.content || ""); if (item.children && item.children.length > 0) { - html += '
'; item.children.forEach((child) => { html += generateDetailsHtml(child); }); - html += "
"; } html += `
`; diff --git a/app/components/lazy-load/data-entry/RelationEdit.vue b/app/components/lazy-load/data-entry/RelationEdit.vue index a6b398c..cfb609a 100644 --- a/app/components/lazy-load/data-entry/RelationEdit.vue +++ b/app/components/lazy-load/data-entry/RelationEdit.vue @@ -48,7 +48,7 @@ const setDataEditor = async () => { base_url += "/entity/show/view/qasection/{{qanon_id}}?jump_id={{section_id}}"; accordionItems.value = []; - let node = {} + let node = {}; if (_source.previous_info) { let item = _source.previous_info; @@ -126,17 +126,15 @@ const setDataEditor = async () => { title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ", content: _source.subject_unity.reason, children: [], - } + }; - if(_source.subject_unity.description){ - - node["children"].push({ + if (_source.subject_unity.description) { + node["children"].push({ isOpen: false, id: item.context_id, title: "شرط اعتبار وحدت موضوع : ", content: _source.subject_unity.description, }); - } accordionItems.value.push(node); @@ -147,23 +145,23 @@ const setDataEditor = async () => { title: "توضیح وجود تخالف بین دو ماده ", content: _source.conflict_detection.description, children: [], - } + }; accordionItems.value.push(node); /////-------------بیان نوع تخالف---------------------- node = { isOpen: true, id: 11, - title: "بیان نوع تخالف بین دو ماده : " + _source.conflict_relation_identification.main_type, + title: + "بیان نوع تخالف بین دو ماده : " + + _source.conflict_relation_identification.main_type, content: _source.conflict_relation_identification.description, children: [], - } + }; accordionItems.value.push(node); /////----------------------------------- - - console.log("accordionItems", accordionItems.value); };