完善
This commit is contained in:
parent
d6e5161114
commit
de64b9a766
@ -6,10 +6,6 @@ import {useGlobalConfig} from "@/stores/globalConfig";
|
|||||||
import {watch,onBeforeUnmount } from "vue";
|
import {watch,onBeforeUnmount } from "vue";
|
||||||
import {useMagicKeys, whenever} from "@vueuse/core";
|
import {useMagicKeys, whenever} from "@vueuse/core";
|
||||||
import {destroyDebugger, switchDebugger} from "@/utils/debugger/eruda";
|
import {destroyDebugger, switchDebugger} from "@/utils/debugger/eruda";
|
||||||
import {useRoute} from "vue-router";
|
|
||||||
|
|
||||||
let routeLocationNormalizedLoaded = useRoute();
|
|
||||||
console.log(routeLocationNormalizedLoaded)
|
|
||||||
|
|
||||||
const {t, availableLocales: languages, locale} = useI18n();
|
const {t, availableLocales: languages, locale} = useI18n();
|
||||||
let globalConfig = useGlobalConfig();
|
let globalConfig = useGlobalConfig();
|
||||||
|
@ -1,17 +1,28 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import '@toast-ui/editor/dist/toastui-editor.css';
|
|
||||||
// import 'prismjs/themes/prism-tomorrow.css';
|
|
||||||
|
|
||||||
import type {Ref} from "vue";
|
import type {Ref} from "vue";
|
||||||
import {onMounted, reactive, ref, watch} 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 '@toast-ui/editor/dist/toastui-editor.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"
|
|
||||||
import uml from "@toast-ui/editor-plugin-uml"
|
|
||||||
import "@toast-ui/editor/dist/i18n/zh-cn";
|
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";
|
import {useI18n} from "vue-i18n";
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
@ -36,6 +47,7 @@ const editorRef = ref()
|
|||||||
|
|
||||||
function initEditor(editorRef:Ref<any>){
|
function initEditor(editorRef:Ref<any>){
|
||||||
let editor = new Editor({
|
let editor = new Editor({
|
||||||
|
theme: "dark",
|
||||||
el: editorRef.value,
|
el: editorRef.value,
|
||||||
// language: 'en-US',
|
// language: 'en-US',
|
||||||
language: locale.value,
|
language: locale.value,
|
||||||
@ -65,6 +77,7 @@ function initEditor(editorRef:Ref<any>){
|
|||||||
// ]
|
// ]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// const viewer = Editor.factory({
|
// const viewer = Editor.factory({
|
||||||
// el: editorRef.value,
|
// el: editorRef.value,
|
||||||
// viewer: true,
|
// viewer: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user