<view class='containers'>
<text class="content {{ellipsis?'ellipsis':'unellipsis'}}">
{{item.content}}
text>
<view bindtap='ellipsis'>
<view>
<button>{{ellipsis?'展开':'收起'}}button>
view>
view>
view>
// 展开与收起
ellipsis(e) {
this.setData({
ellipsis:!this.data.ellipsis
})
},
内容是从云开放数据库中获取
https://developers.weixin.qq.com/community/develop/doc/0006ae5c22cab89b0ccac93e75b800
若认为该回答有用,给回答者点个[ 有用 ],让答案帮助更多的人
https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html