wxParser-plugin icon indicating copy to clipboard operation
wxParser-plugin copied to clipboard

mpvue下使用不渲染页面

Open moshanghan opened this issue 6 years ago • 4 comments

<template>
  <div class="articleWap">
    <wxparser :rich-text="articleData" />
  </div>
</template>

<script>
import { getRequest } from '@/utils/wxRequest.js'
var Api = require('@/utils/api.js')
export default {
  data () {
    return {
      articleId: '',
      articleData: {}
    }
  },
  mounted () {
    this.$nextTick(() => {
      this.articleId = this.$root.$mp.query.id
      this.getDetailData()
    })
  },
  methods: {
    getDetailData () {
      var getPostDetailRequest = getRequest(Api.getPostByID(this.articleId))
      getPostDetailRequest.then(({ data, statusCode }) => {
        if (statusCode === 200) {
          this.articleData = data.content.rendered
          console.log(this.articleData)
        }
      })
    }
  }
}
</script>

moshanghan avatar Jul 03 '18 14:07 moshanghan

+1

shiqikai avatar Feb 12 '19 08:02 shiqikai

数量不大,可以用mpvue wxparse 基于mpvue的 就是数据量大会卡顿

tophantWeb avatar Jul 26 '19 09:07 tophantWeb

+1

tophantWeb avatar Jul 26 '19 10:07 tophantWeb

"version": "0.2.1

tophantWeb avatar Jul 29 '19 05:07 tophantWeb