page的data里的属性是动态的怎样拿到值?
发布于 7 年前 作者 fsu 16117 次浏览 来自 问答

let attr = aKey_0;

this.setData({

[attr]:22

})

怎样在wxml中拿到[attr]的值?attr 的值是不固定的,可能是 aKey_0、 aKey_1、 aKey_22

回到顶部