You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
342 B
JavaScript
14 lines
342 B
JavaScript
// 该指令只支持H5
|
|
import renderMath from '@/utils/mathJax/renderMath.js'
|
|
|
|
export default {
|
|
name: 'math',
|
|
inserted (el, binding) {
|
|
if (!binding.value) return;
|
|
// console.log(binding.value)
|
|
// console.log(Reflect.ownKeys(el.__vnode.el))
|
|
// console.log(el.__vnode)
|
|
el.__vnode.el.innerHTML = renderMath(binding.value)
|
|
}
|
|
}
|