rich-text 如何确定,用户点击事件,点击的是nodes里的具体哪个对象
发布于 5 年前 作者 zdong 15346 次浏览 来自 问答
<rich-text nodes="{{nodes}}" bindtap="tap"></rich-text>

nodes=[

{

                type: ‘text’,

                text: _subStr.substr(0, startIndex)

},

{

                type:‘node’,

                name: ‘span’,

                attrs: {

                    class: ‘link_msg’,

                    style: ‘margin-left:4px;color:#’ + color + ‘;font-weight:’ + font_weight + ‘;’

                },

                children: [{

                    type: ‘text’,

                    text: foramt[num].linktext

                }]

}]

如何确定,我是点击的第二个type=node呢?

1 回复

我也想知道,rich-text 的点击事件怎么处理

回到顶部