mpvue解析富文本mpvue-wxParse
1.参考git:https://github.com/F-loat/mpvue-wxParse2.安装npm i mpvue-wxparse3.使用<template><div><wxParse :content="article" @preview="preview" @navigate
·
1.参考git:https://github.com/F-loat/mpvue-wxParse
2.安装
npm i mpvue-wxparse
3.使用
<template> <div> <wxParse :content="article" @preview="preview" @navigate="navigate" /> </div> </template> <script> import wxParse from 'mpvue-wxparse' export default { components: { wxParse }, data () { return { article: '<div>我是HTML代码</div>' } }, methods: { preview(src, e) { // do something }, navigate(href, e) { // do something } } } </script> <style> @import url("~mpvue-wxparse/src/wxParse.css"); </style>
更多推荐
已为社区贡献8条内容
所有评论(0)