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