修复字幕对话框的编辑选项在某些电脑下不置顶的BUG

This commit is contained in:
fangxiang 2022-05-24 14:02:48 +08:00
parent ee0dd21bc1
commit 2d79e558fa
1 changed files with 26 additions and 8 deletions

View File

@ -202,7 +202,8 @@ export default defineComponent({
branding: false,
toolbar_mode: "wrap",
toolbar:
"fullscreen | code undo redo restoredraft | cut copy paste pastetext | fontsize| forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify |subscript superscript removeformat",
// "fullscreen | code undo redo restoredraft | cut copy paste pastetext | fontsize| forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify |subscript superscript removeformat",
"fullscreen | fontsize| forecolor backcolor bold italic underline strikethrough | subscript superscript removeformat",
});
return {
@ -228,13 +229,30 @@ export default defineComponent({
loading.value = false;
},
onShow() {
document.querySelectorAll(".tox ").forEach((item) => {
if (item && item.classList.contains("tox-tinymce-aux")) {
DomUtil.css(item, {
zIndex: "99999",
});
}
});
let success = false;
const checkZIndex = () => {
document.querySelectorAll(".tox ").forEach((item) => {
if (item && item.classList.contains("tox-tinymce-aux")) {
DomUtil.css(item, {
zIndex: "99999",
});
success = true;
}
});
};
const checkZIndexAsync = () => {
checkZIndex();
setTimeout(() => {
if (!success) {
checkZIndexAsync();
} else {
console.log("subtitle initialize success");
}
}, 50);
};
checkZIndexAsync();
},
resetData() {
loading.value = false;