提交
This commit is contained in:
@@ -1531,37 +1531,29 @@ export default {
|
||||
},
|
||||
inTinymceButtonClass() {
|
||||
setTimeout(function () {
|
||||
// 查找该按钮并添加 className
|
||||
const commentaddbutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="commentadd"]');
|
||||
if (commentaddbutton) {
|
||||
commentaddbutton.classList.add('tinymce-custom-button-commentadd');
|
||||
}
|
||||
const addrowbutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="addrow"]');
|
||||
if (addrowbutton) {
|
||||
addrowbutton.classList.add('tinymce-custom-button-addrow');
|
||||
}
|
||||
const deletebutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="delete"]');
|
||||
if (deletebutton) {
|
||||
deletebutton.classList.add('tinymce-custom-button-delete');
|
||||
}
|
||||
const editbutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="edit"]');
|
||||
if (editbutton) {
|
||||
editbutton.classList.add('tinymce-custom-button-edit');
|
||||
}
|
||||
const savebutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="save"]');
|
||||
if (savebutton) {
|
||||
savebutton.classList.add('tinymce-custom-button-save');
|
||||
}
|
||||
const button = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="customblue"]');
|
||||
if (button) {
|
||||
button.classList.add('tinymce-custom-button-blue');
|
||||
}
|
||||
const removebutton = document.querySelector('.tox-toolbar .tox-toolbar__group .tox-tbtn[data-mce-name="removeblue"]');
|
||||
if (removebutton) {
|
||||
removebutton.classList.add('tinymce-custom-button-removeblue');
|
||||
}
|
||||
// 使用 querySelectorAll 获取所有符合条件的按钮
|
||||
const buttons = [
|
||||
{ selector: '.tox-tbtn[data-mce-name="commentadd"]', className: 'tinymce-custom-button-commentadd' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="addrow"]', className: 'tinymce-custom-button-addrow' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="delete"]', className: 'tinymce-custom-button-delete' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="edit"]', className: 'tinymce-custom-button-edit' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="save"]', className: 'tinymce-custom-button-save' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="customblue"]', className: 'tinymce-custom-button-blue' },
|
||||
{ selector: '.tox-tbtn[data-mce-name="removeblue"]', className: 'tinymce-custom-button-removeblue' }
|
||||
];
|
||||
|
||||
// 遍历每个按钮并为每个按钮添加类
|
||||
buttons.forEach(item => {
|
||||
const buttonElements = document.querySelectorAll(item.selector);
|
||||
buttonElements.forEach(button => {
|
||||
if (!button.classList.contains(item.className)) { // 防止重复添加
|
||||
button.classList.add(item.className);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, 100); // 延迟执行,确保按钮渲染完成
|
||||
}
|
||||
|
||||
|
||||
// 通用递归方法
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div> -->
|
||||
|
||||
<common-word
|
||||
:key="Main_List"
|
||||
:key="new Date().getTime()"
|
||||
v-if="htmlContent"
|
||||
ref="commonWord"
|
||||
:value="htmlContent"
|
||||
@@ -179,6 +179,7 @@
|
||||
<el-form ref="editMes" :model="lineStyle" label-width="115px">
|
||||
<el-form-item label="Table Title :">
|
||||
<common-content
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-title`"
|
||||
:isAutomaticUpdate="true"
|
||||
:value="lineStyle.title"
|
||||
@getContent="getContent"
|
||||
@@ -194,7 +195,6 @@
|
||||
<font style="color: #f56c6c; margin-right: 5px">*</font>
|
||||
Table :
|
||||
</span>
|
||||
|
||||
<common-table
|
||||
@getContent="getContent"
|
||||
v-if="threeVisible"
|
||||
@@ -205,6 +205,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="Bottom Title :">
|
||||
<common-content
|
||||
:id="`editor-${new Date().getTime()}-${lineStyle.am_id}-${lineStyle.amt_id}-note`"
|
||||
:isAutomaticUpdate="true"
|
||||
:value="lineStyle.note"
|
||||
@getContent="getContent"
|
||||
@@ -884,8 +885,8 @@ export default {
|
||||
});
|
||||
},
|
||||
async onAddRow(mainId) {
|
||||
console.log('data at line 886:', mainId)
|
||||
|
||||
console.log('data at line 886:', mainId);
|
||||
|
||||
await this.$api
|
||||
.post(this.urlList.addRow, {
|
||||
am_id: mainId,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<tinymce
|
||||
type="table"
|
||||
:height="height"
|
||||
:id="id"
|
||||
ref="tinymceChild1"
|
||||
:wordStyle="wordStyle"
|
||||
:isAutomaticUpdate="isAutomaticUpdate"
|
||||
@@ -34,7 +35,7 @@
|
||||
<script>
|
||||
import Tinymce from '@/components/page/components/Tinymce';
|
||||
export default {
|
||||
props: ['value','isAutomaticUpdate','height'],
|
||||
props: ['value','isAutomaticUpdate','height','id'],
|
||||
components: {
|
||||
Tinymce
|
||||
},
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
class="commentList"
|
||||
>
|
||||
<li
|
||||
|
||||
v-for="(item, index) in commentList"
|
||||
class="comment-item annotation"
|
||||
:data-target="`main-${item.am_id}`"
|
||||
@@ -155,6 +156,7 @@
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid rgba(243, 213, 213);
|
||||
"
|
||||
:style="commont.estate == 1? 'background:#13bc200f;' : ''"
|
||||
v-for="(commont, commentIndex) in item.comment"
|
||||
@click="highlightLeftComment(commont.amc_id, item.am_id)"
|
||||
>
|
||||
@@ -988,13 +990,18 @@ export default {
|
||||
const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}`;
|
||||
|
||||
return formattedDate;
|
||||
},
|
||||
goToListComment(data) {
|
||||
console.log('data at line 993:', data)
|
||||
this.goToComment(data.am_id)
|
||||
|
||||
},
|
||||
divOnScroll() {
|
||||
if (!this.isPreview) {
|
||||
// const scrollTop = scrollDiv.scrollTop; // 获取垂直滚动距离
|
||||
this.scrollPosition = this.$refs.scrollDiv.scrollTop;
|
||||
localStorage.setItem('scrollPosition', this.scrollPosition);
|
||||
console.log('this.scrollPosition at line 980:', this.scrollPosition);
|
||||
// console.log('this.scrollPosition at line 980:', this.scrollPosition);
|
||||
// 检查每个编辑器是否在可视区域内
|
||||
for (const key in this.editors) {
|
||||
const editorElement = document.getElementById(key);
|
||||
|
||||
Reference in New Issue
Block a user