这篇文章主要介绍了微信小程序 wx:for遍历循环使用实例解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
效果图如下:
实现代码如下:
type.js:
// pages/type/type.js
Page({
/**
* 页面的初始数据
*/
data: {
types: ""
},
editType: function (e) {
var typeId = e.currentTarget.dataset['id'];
console.log("edit:"+typeId);
wx.navigateTo({
url: '../type_edit/type_edit?typeId=' + typeId
})
},
delType:function(e){
var typeId = e.currentTarget.dataset['id'];
console.log("delete:"+typeId)
wx.showModal({
title: '提示',
content: '确认要删除该支出类型?',
success: function (res) {
if (res.confirm) {