Compare commits
No commits in common. "50cf02890a3dca269a48632183674667c6528671" and "33c1ff1184cb68f26ff45aad330662579590a10e" have entirely different histories.
50cf02890a
...
33c1ff1184
|
|
@ -12,13 +12,15 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="btn.action(editor)"
|
@click="btn.action(editor)"
|
||||||
:class="{ 'is-active': btn.isActive ? btn.isActive(editor) : false }"
|
:class="{ 'is-active': btn.isActive ? btn.isActive(editor) : false }"
|
||||||
:disabled="readOnly || (btn.disabled ? btn.disabled(editor) : false)"
|
:disabled="btn.disabled ? !btn.disabled(editor) : false"
|
||||||
:title="btn.title"
|
:title="btn.title"
|
||||||
>
|
>
|
||||||
<span class="toolbar-icon">{{ btn.icon }}</span>
|
<span class="toolbar-icon">{{ btn.icon }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- محتوای ادیتور -->
|
||||||
<editor-content :editor="editor" class="editor-content" />
|
<editor-content :editor="editor" class="editor-content" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -40,10 +42,6 @@ const props = defineProps({
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
readOnly: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const editor = ref(null);
|
const editor = ref(null);
|
||||||
|
|
@ -260,14 +258,17 @@ function generateDetailsHtml(item) {
|
||||||
if (item.link_url) {
|
if (item.link_url) {
|
||||||
html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`;
|
html += `<a class="link-url" href="${item.link_url}">${item.link_label}</a>`;
|
||||||
}
|
}
|
||||||
html += `</summary>`;
|
html += "</summary>";
|
||||||
|
|
||||||
html += formatContent(item.content || "");
|
const formattedContent = formatContent(item.content || "");
|
||||||
|
html += `<div class="details-content">${formattedContent}</div>`;
|
||||||
|
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
|
html += '<div class="children-container">';
|
||||||
item.children.forEach((child) => {
|
item.children.forEach((child) => {
|
||||||
html += generateDetailsHtml(child);
|
html += generateDetailsHtml(child);
|
||||||
});
|
});
|
||||||
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
html += `</details>`;
|
html += `</details>`;
|
||||||
|
|
@ -306,7 +307,6 @@ watch(
|
||||||
);
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
editor.value = new Editor({
|
editor.value = new Editor({
|
||||||
editable: !props.readOnly,
|
|
||||||
extensions: [
|
extensions: [
|
||||||
StarterKit,
|
StarterKit,
|
||||||
Underline,
|
Underline,
|
||||||
|
|
@ -440,7 +440,7 @@ onBeforeUnmount(() => {
|
||||||
|
|
||||||
.tiptap {
|
.tiptap {
|
||||||
font-family:
|
font-family:
|
||||||
"sahel",
|
"Vazir",
|
||||||
"Inter",
|
"Inter",
|
||||||
-apple-system,
|
-apple-system,
|
||||||
BlinkMacSystemFont,
|
BlinkMacSystemFont,
|
||||||
|
|
@ -560,9 +560,11 @@ onBeforeUnmount(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
summary.tag {
|
summary.tag {
|
||||||
color: blue;
|
color: blue;
|
||||||
border-radius: var(--radius) var(--radius) 0 0;
|
border-radius: var(--radius) var(--radius) 0 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
summary.label {
|
summary.label {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const setDataEditor = async () => {
|
||||||
base_url += "/entity/show/view/qasection/{{qanon_id}}?jump_id={{section_id}}";
|
base_url += "/entity/show/view/qasection/{{qanon_id}}?jump_id={{section_id}}";
|
||||||
|
|
||||||
accordionItems.value = [];
|
accordionItems.value = [];
|
||||||
let node = {};
|
let node = {}
|
||||||
|
|
||||||
if (_source.previous_info) {
|
if (_source.previous_info) {
|
||||||
let item = _source.previous_info;
|
let item = _source.previous_info;
|
||||||
|
|
@ -127,15 +127,17 @@ const setDataEditor = async () => {
|
||||||
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
title: "توضیح هوشمند برای وجود وحدت موضوع بین احکام استنادی ",
|
||||||
content: _source.subject_unity.reason,
|
content: _source.subject_unity.reason,
|
||||||
children: [],
|
children: [],
|
||||||
};
|
}
|
||||||
|
|
||||||
|
if(_source.subject_unity.description){
|
||||||
|
|
||||||
if (_source.subject_unity.description) {
|
|
||||||
node["children"].push({
|
node["children"].push({
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
id: _source.context_id,
|
id: _source.context_id,
|
||||||
title: "شرط اعتبار وحدت موضوع : ",
|
title: "شرط اعتبار وحدت موضوع : ",
|
||||||
content: _source.subject_unity.description,
|
content: _source.subject_unity.description,
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
accordionItems.value.push(node);
|
accordionItems.value.push(node);
|
||||||
|
|
@ -146,23 +148,23 @@ const setDataEditor = async () => {
|
||||||
title: "توضیح وجود تخالف بین دو ماده ",
|
title: "توضیح وجود تخالف بین دو ماده ",
|
||||||
content: _source.conflict_detection.description,
|
content: _source.conflict_detection.description,
|
||||||
children: [],
|
children: [],
|
||||||
};
|
}
|
||||||
|
|
||||||
accordionItems.value.push(node);
|
accordionItems.value.push(node);
|
||||||
/////-------------بیان نوع تخالف----------------------
|
/////-------------بیان نوع تخالف----------------------
|
||||||
node = {
|
node = {
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
id: 11,
|
id: 11,
|
||||||
title:
|
title: "بیان نوع تخالف بین دو ماده : " + _source.conflict_relation_identification.main_type,
|
||||||
"بیان نوع تخالف بین دو ماده : " +
|
|
||||||
_source.conflict_relation_identification.main_type,
|
|
||||||
content: _source.conflict_relation_identification.description,
|
content: _source.conflict_relation_identification.description,
|
||||||
children: [],
|
children: [],
|
||||||
};
|
}
|
||||||
|
|
||||||
accordionItems.value.push(node);
|
accordionItems.value.push(node);
|
||||||
/////-----------------------------------
|
/////-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log("accordionItems", accordionItems.value);
|
console.log("accordionItems", accordionItems.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user