小程序bindtap参数传递
生活随笔
收集整理的這篇文章主要介紹了
小程序bindtap参数传递
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在開發中遇到了需要實現bindtab 傳遞參數
https://www.jianshu.com/p/6bcbbc985345
https://www.cnblogs.com/Mrrabbit/p/7623314.html
《< input class=“weui-input” placeholder=“請輸入2號輥道電流” bindinput=“bindA” data-page=’{{page[1]}}’ value=’{{company[1]}}’/>
company:[],
page:[0,1],
bindA: function (e) {
console.log(e);
console.log(‘test’);
console.log(e.currentTarget.dataset.page);
this.data.company[e.currentTarget.dataset.page] = e.detail.value;
console.log(this.data.company[e.currentTarget.dataset.page] );
},
總結
以上是生活随笔為你收集整理的小程序bindtap参数传递的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 酒精片能带上飞机吗?
- 下一篇: 直径40的T型刀转速进给如何计算