|
@ -369,10 +369,7 @@ |
|
|
this.$refs.SubComponent.callSubMethod() |
|
|
this.$refs.SubComponent.callSubMethod() |
|
|
}, |
|
|
}, |
|
|
callParentMethod(val) { |
|
|
callParentMethod(val) { |
|
|
let info = val |
|
|
|
|
|
console.log('callParentMethod: ' + val) |
|
|
console.log('callParentMethod: ' + val) |
|
|
console.log('val: ' + val.id) |
|
|
|
|
|
console.log('val: ' + info.id) |
|
|
|
|
|
// 默认去遍历list集合,将集合中的每个元素传入到function的item里, |
|
|
// 默认去遍历list集合,将集合中的每个元素传入到function的item里, |
|
|
var index = this.couponList.findIndex( |
|
|
var index = this.couponList.findIndex( |
|
|
// function(item) { |
|
|
// function(item) { |
|
@ -380,9 +377,9 @@ |
|
|
// console.log('val: ' + val) |
|
|
// console.log('val: ' + val) |
|
|
// return item.id == val.id; |
|
|
// return item.id == val.id; |
|
|
item => { |
|
|
item => { |
|
|
console.log('item: ' + JSON.stringify(item).id) |
|
|
console.log('item_id: ' +JSON.parse(JSON.stringify(item)).id) |
|
|
console.log('val: ' + val.id) |
|
|
console.log('val_id: ' +JSON.parse(val).id) |
|
|
if (item == val) { |
|
|
if (JSON.parse(JSON.stringify(item)).id == JSON.parse(val).id) { |
|
|
return true |
|
|
return true |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|