index.js 513 B

1234567891011121314151617181920212223
  1. (function () {
  2. const bankList = [{
  3. name: 'airwallex',
  4. title: '银行卡',
  5. icon: 'bank_card.png'
  6. }, {
  7. name: 'google',
  8. title: 'Google支付',
  9. icon: 'google.png'
  10. }]
  11. let wrapId = document.getElementById('wrap')
  12. console.log(wrapId);
  13. for (let i = 0; i < bankList.length; i++) {
  14. const item = bankList[i];
  15. let itemHtml = `
  16. <input type="radio" :name="${item.name}">
  17. <div class='wallet_content'>
  18. ${item.title}
  19. </div>
  20. `
  21. wrapId.innerHTML += itemHtml;
  22. }
  23. })()