函数return
findCategory(id) { // this.Category=[{id:1,name:'ljj'},{id:2,name:'wmy'}] var ar = this.Category.find(function (elem) { return elem.id == id; }); return ar.name },
法2
findCategory(id) { var value this.Category.forEach(item => { if (item.id == id) { value = item.name } }) return value },
^(* ̄(oo) ̄)^:foreach不可以内部直接return
异步函数,async/await,promise目前return出的都是[promise object]