vue中JSX绑定原生事件
用的是:nativeOnClick{this.navList && this.navList.map((it, index) =><router-linktag={ 'span' }to={ { path: it.path } }class={ `${ styles.item } ${ this.currentNavIndex ===...
·
用的是:nativeOnClick
{
this.navList && this.navList.map((it, index) =>
<router-link
tag={ 'span' }
to={ { path: it.path } }
class={ `${ styles.item } ${ this.currentNavIndex === index ? styles.active : '' }` }
nativeOnClick={ this.tabItem.bind(this, index) }
>{ it.name }</router-link>
)
}
更多推荐
已为社区贡献5条内容
所有评论(0)