✨ Added tab functionality and optimized related configurations
This commit is contained in:
@@ -7,11 +7,13 @@ import {createWheelZoomHandler} from './basic/wheelZoomExtension';
|
||||
import Toolbar from '@/components/toolbar/Toolbar.vue';
|
||||
import {useWindowStore} from "@/stores/windowStore";
|
||||
import LoadingScreen from '@/components/loading/LoadingScreen.vue';
|
||||
import {useTabStore} from "@/stores/tabStore";
|
||||
|
||||
const editorStore = useEditorStore();
|
||||
const documentStore = useDocumentStore();
|
||||
const configStore = useConfigStore();
|
||||
const windowStore = useWindowStore();
|
||||
const tabStore = useTabStore();
|
||||
|
||||
const editorElement = ref<HTMLElement | null>(null);
|
||||
|
||||
@@ -33,6 +35,8 @@ onMounted(async () => {
|
||||
// 设置编辑器容器
|
||||
editorStore.setEditorContainer(editorElement.value);
|
||||
|
||||
await tabStore.initializeTab();
|
||||
|
||||
// 添加滚轮事件监听
|
||||
editorElement.value.addEventListener('wheel', wheelHandler, {passive: false});
|
||||
});
|
||||
|
||||
@@ -285,19 +285,6 @@ export class TranslationTooltip implements TooltipView {
|
||||
this.translate();
|
||||
}
|
||||
|
||||
/**
|
||||
* 寻找替代的目标语言
|
||||
*/
|
||||
private findAlternativeTargetLanguage(): void {
|
||||
const options = Array.from(this.targetLangSelector.options);
|
||||
for (const option of options) {
|
||||
if (option.value !== this.sourceLangSelector.value) {
|
||||
this.targetLangSelector.value = option.value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 交换源语言和目标语言
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user