taro小程序展示富文本
在微信小程序下会用到wxParse这个东西来达到html转换wxml的效果, taro小程序官方也给出了示例, 地址 这里封装成自己的组件: import Taro, { Component } from "@tarojs/taro" import { View } from "@tarojs/components" import WxParse from '../../utils/wxParse/wxParse.js' import "../../utils/wxParse/wxParse.scss" export default class ParseComponent extends Component { componentDidMount() {} defaultProps = { mark: "" } render() { if ( this .props.mark) { let domText = this .props.mark WxParse.wxParse( "domText", "html", domText, this .$scope, 5 ); } return ( <View> {process.env.TARO_ENV === "weapp" ? ( <View> <import src='../../utils/wxParse/wxParse