Commit 015d4969 authored by liaozan's avatar liaozan 🏀

feat: fileContent preview with highlight+2

parent da6c9328
...@@ -4,11 +4,17 @@ import Antd from 'ant-design-vue' ...@@ -4,11 +4,17 @@ import Antd from 'ant-design-vue'
import './index.css' import './index.css'
import 'ant-design-vue/dist/antd.css'; import 'ant-design-vue/dist/antd.css';
import 'highlight.js/styles/idea.css'; import 'highlight.js/styles/idea.css';
import 'highlight.js/lib/common' import highlight from 'highlight.js/lib/core'
import java from 'highlight.js/lib/languages/java';
import xml from 'highlight.js/lib/languages/xml';
import yaml from 'highlight.js/lib/languages/yaml';
import highlightVuePlugin from '@highlightjs/vue-plugin' import highlightVuePlugin from '@highlightjs/vue-plugin'
const app = createApp(App) highlight.registerLanguage('xml', xml)
highlight.registerLanguage('yaml', yaml)
highlight.registerLanguage('java', java)
const app = createApp(App)
app.use(highlightVuePlugin) app.use(highlightVuePlugin)
app.use(Antd) app.use(Antd)
app.mount('#app') app.mount('#app')
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment