GitHub地址:https://github.com/TooBug/wemark
// 引入组件
import Taro, { Component } from '@tarojs/taro'
import TaroWemark from '../../components/taro-wemark/taro-wemark'
export default class Index extends Component{
constructor() {
super();
this.state = {
content: '## hello, world'
};
}
render () {
return (
// md为markdown内容
<TaroWemark md={this.state.content}></TaroWemark>
)
}
}
MIT