0
点赞
收藏
分享

微信扫一扫

uni-app中Card slots的使用(添加点击事件)(uni-card)


uni-app官方文档中只给出了action底部插槽的使用的例子。对于初学者来说,当需要在卡片顶部添加点击事件时,往往也需要一个例子来引路。

uni-app中Card slots的使用(添加点击事件)(uni-card)_前端

这里是使用title(卡片头部插槽)在顶部添加点击事件,如图,在uni-card里包裹<templete>,然后在<templete>中使用title,这样就可以在view中绑定点击事件了。

最后可以参考官网的Slots。

uni-app中Card slots的使用(添加点击事件)(uni-card)_点击事件_02

 

举报

相关推荐

0 条评论