npm install --save vue-syntax-highlight
// Import Vue and vue-syntax-highlight
import Vue from 'vue'
import HighLight from 'vue-syntax-highlight'
// Tell Vue.js to use vue-syntax-highlight
Vue.use(HighLight)
<highlight lang='javascript'><template v-slot>需要高亮的代码</template></highlight>
Author: zhangtong
Email: zhangtong@tocersoft.com
License: MIT
-
v0.1.0
Published a Vue Component Based on Highlightjs Encapsulation, Providing Syntax Highlight