Add doc and fixed icons, remove prism
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import Prism from 'prismjs';
|
||||
|
||||
const CodeHighlight = {
|
||||
beforeMount(el, binding) {
|
||||
const modifiers = binding.modifiers;
|
||||
const value = binding.value;
|
||||
|
||||
if (modifiers.script || value === 'script') el.className = 'language-javascript';
|
||||
else if (modifiers.css || value === 'css') el.className = 'language-css';
|
||||
else el.className = 'language-markup';
|
||||
|
||||
Prism.highlightElement(el.children[0]);
|
||||
}
|
||||
};
|
||||
|
||||
export default CodeHighlight;
|
||||
4
src/components/CodeHighlight.vue
Normal file
4
src/components/CodeHighlight.vue
Normal file
@@ -0,0 +1,4 @@
|
||||
<template>
|
||||
<pre class="border-round surface-ground text-900 p-5 overflow-auto">
|
||||
<code class="-mt-4 p-0 line-height-3 block" style="font-family: monaco, Consolas, 'Lucida Console', monospace"><slot></slot></code></pre>
|
||||
</template>
|
||||
Reference in New Issue
Block a user