1、列表index下标取值
实现方式:data-index="{
{index}}"挖坑及e.currentTarget.dataset.index来填坑即可
wxml:
<
view
wx:for=
"{
{adress}}"
bindtap=
'delete'
wx:key=
"{
{adress}}"
data-index=
"{
{index}}">
<
text
>{
{item.name}}
</
text
>
<
text
class=
'red'>删除
</
text
>
</
view
>
JS:
adress:[
{
id:
100,
name: