Open iCodek opened 4 years ago
请问有没有组件内元素渲染完毕的回调 this.$refs.md.$nextTick(() => { setTimeout(() => { let blocks = this.$el.querySelectorAll('pre code') blocks.forEach((block) => hljs.highlightBlock(block)) }, 1000) }) 目前只能延迟1秒才调高亮
this.$refs.md.$nextTick(() => { setTimeout(() => { let blocks = this.$el.querySelectorAll('pre code') blocks.forEach((block) => hljs.highlightBlock(block)) }, 1000) })
请问有没有组件内元素渲染完毕的回调
this.$refs.md.$nextTick(() => { setTimeout(() => { let blocks = this.$el.querySelectorAll('pre code') blocks.forEach((block) => hljs.highlightBlock(block)) }, 1000) })
目前只能延迟1秒才调高亮