2023-02-23

功能完善
This commit is contained in:
2023-02-23 01:49:53 +08:00
parent 932ebc04c7
commit 28a4a55d4c
2 changed files with 4 additions and 7 deletions

View File

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