vue3中使用MAthJax入门教程2.x
时间:2024-9-3 15:48 作者:小诸葛 分类: Vue 正在检查是否收录...
MAthJax用于在页面中显示一些数学公式
官网下载代码地址为:https://www.mathjax.org/
1.在index.html中引入
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
2.页面更新的时候需要重新渲染
` nextTick(() => {
if (window.MathJax && window.MathJax?.Hub) {
// 添加到 MathJax 渲染队列
window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub])
}
推荐阅读:
扫描二维码,在手机上阅读