This commit is contained in:
shikong 2024-02-19 01:29:25 +08:00
parent d6e5161114
commit de64b9a766
2 changed files with 23 additions and 14 deletions

View File

@ -6,10 +6,6 @@ import {useGlobalConfig} from "@/stores/globalConfig";
import {watch,onBeforeUnmount } from "vue";
import {useMagicKeys, whenever} from "@vueuse/core";
import {destroyDebugger, switchDebugger} from "@/utils/debugger/eruda";
import {useRoute} from "vue-router";
let routeLocationNormalizedLoaded = useRoute();
console.log(routeLocationNormalizedLoaded)
const {t, availableLocales: languages, locale} = useI18n();
let globalConfig = useGlobalConfig();

View File

@ -1,17 +1,28 @@
<script setup lang="ts">
import '@toast-ui/editor/dist/toastui-editor.css';
// import 'prismjs/themes/prism-tomorrow.css';
import type {Ref} from "vue";
import {onMounted, reactive, ref, watch} from "vue";
import Editor from "@toast-ui/editor";
import Prism from 'prismjs'
import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight'
import colorSyntax from "@toast-ui/editor-plugin-color-syntax"
import chart from "@toast-ui/editor-plugin-chart"
import tableMergedCell from "@toast-ui/editor-plugin-table-merged-cell"
import uml from "@toast-ui/editor-plugin-uml"
//
import '@toast-ui/editor/dist/toastui-editor.css';
import "@toast-ui/editor/dist/i18n/zh-cn";
import Editor from "@toast-ui/editor";
//
import Prism from 'prismjs'
import 'prismjs/themes/prism.css';
import '@toast-ui/editor-plugin-code-syntax-highlight/dist/toastui-editor-plugin-code-syntax-highlight.css';
import codeSyntaxHighlight from '@toast-ui/editor-plugin-code-syntax-highlight'
//
import 'tui-color-picker/dist/tui-color-picker.css'
import "@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.css"
import colorSyntax from "@toast-ui/editor-plugin-color-syntax"
//
import chart from "@toast-ui/editor-plugin-chart"
//
import tableMergedCell from "@toast-ui/editor-plugin-table-merged-cell"
// uml
import uml from "@toast-ui/editor-plugin-uml"
import {useI18n} from "vue-i18n";
const emit = defineEmits([
@ -36,6 +47,7 @@ const editorRef = ref()
function initEditor(editorRef:Ref<any>){
let editor = new Editor({
theme: "dark",
el: editorRef.value,
// language: 'en-US',
language: locale.value,
@ -65,6 +77,7 @@ function initEditor(editorRef:Ref<any>){
// ]
})
// const viewer = Editor.factory({
// el: editorRef.value,
// viewer: true,