Article From:

There is not much to say.

First, NPM install mpvue-wxparse.

npm i mpvue-wxparse

Next: use

    <wxParse :content="article" @preview="preview" @navigate="navigate" />

import wxParse from 'mpvue-wxparse'

export default {
  components: {
  data () {
    return {
      article: '<div>I am the HTML code < /div>'
  methods: {
    preview(src, e) {
      // do something
    navigate(href, e) {
      // do something

@import url("~mpvue-wxparse/src/wxParse.css");

Of course: we can dynamically load values in article.

Extended learning address:

Leave a Reply

Your email address will not be published. Required fields are marked *