- 博客(2)
- 收藏
- 关注
原创 js提取数组某一项的属性值,组成新数组
js提取数组某一属性值,将每一项的某个属性之,组成新数组。var arr = [ { id: 1, name: "张三" }, { id: 2, name: "李四" }, { id: 3, name: "王五" },]var newArr = arr.map( (item, index) => { return item.id})console.log("arr的id集合", newArr)// newArr 为:[1, 2, 3]所用的是map方法...
2021-03-05 14:27:47 9610
原创 微信小程序封装wx.showModal
微信小程序封装wx.showModal// 方法封装 common.jsshowModal: ( { title = "提示", content = "确认此操作吗?" } = {}, successCallback) => { return wx.showModal({ title: title, content: content, success: res => { if (res.confirm) { su
2021-02-23 15:18:29 452
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人