安装
yarn add prismjs
使用
<template>
...
</template>
<script setup lang="ts">
import Prism from 'prismjs';
import 'prismjs/themes/prism.css';
Prism.highlight("{name: '张三'}", Prism.languages.js);
</script>
标签:...,vue,import,如何,Prism,使用,prismjs
From: https://www.cnblogs.com/dingshaohua/p/16998009.html