Merge branch 'Baghi/conflict' of https://git2.tavasi.ir/Baghi/conflict-nuxt-4 into main
This commit is contained in:
commit
50cf02890a
|
|
@ -12,15 +12,13 @@
|
|||
:key="index"
|
||||
@click="btn.action(editor)"
|
||||
:class="{ 'is-active': btn.isActive ? btn.isActive(editor) : false }"
|
||||
:disabled="btn.disabled ? !btn.disabled(editor) : false"
|
||||
:disabled="readOnly || (btn.disabled ? btn.disabled(editor) : false)"
|
||||
:title="btn.title"
|
||||
>
|
||||
<span class="toolbar-icon">{{ btn.icon }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- محتوای ادیتور -->
|
||||
<editor-content :editor="editor" class="editor-content" />
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -42,6 +40,10 @@ const props = defineProps({
|
|||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
readOnly: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const editor = ref(null);
|
||||
|
|
@ -258,17 +260,14 @@ function generateDetailsHtml(item) {
|
|||
if (item.link_url) {
|
||||
html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`;
|
||||
}
|
||||
html += "</summary>";
|
||||
html += `</summary>`;
|
||||
|
||||
const formattedContent = formatContent(item.content || "");
|
||||
html += `<div class="details-content">${formattedContent}</div>`;
|
||||
html += formatContent(item.content || "");
|
||||
|
||||
if (item.children && item.children.length > 0) {
|
||||
html += '<div class="children-container">';
|
||||
item.children.forEach((child) => {
|
||||
html += generateDetailsHtml(child);
|
||||
});
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += `</details>`;
|
||||
|
|
@ -307,6 +306,7 @@ watch(
|
|||
);
|
||||
onMounted(() => {
|
||||
editor.value = new Editor({
|
||||
editable: !props.readOnly,
|
||||
extensions: [
|
||||
StarterKit,
|
||||
Underline,
|
||||
|
|
@ -440,7 +440,7 @@ onBeforeUnmount(() => {
|
|||
|
||||
.tiptap {
|
||||
font-family:
|
||||
"Vazir",
|
||||
"sahel",
|
||||
"Inter",
|
||||
-apple-system,
|
||||
BlinkMacSystemFont,
|
||||
|
|
@ -560,11 +560,9 @@ onBeforeUnmount(() => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
summary.tag {
|
||||
color: blue;
|
||||
border-radius: var(--radius) var(--radius) 0 0;
|
||||
|
||||
}
|
||||
|
||||
summary.label {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,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;
|
||||
|
|
@ -127,17 +127,15 @@ const setDataEditor = async () => {
|
|||
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
||||
content: _source.subject_unity.reason,
|
||||
children: [],
|
||||
}
|
||||
};
|
||||
|
||||
if (_source.subject_unity.description) {
|
||||
|
||||
node["children"].push({
|
||||
isOpen: false,
|
||||
id: _source.context_id,
|
||||
title: "شرط اعتبار وحدت موضوع : ",
|
||||
content: _source.subject_unity.description,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
accordionItems.value.push(node);
|
||||
|
|
@ -148,23 +146,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);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user