/** * 扫码后获取指定的物料的属性 * @param {Object} str 扫描得到的字符串 * @param {Object} attr 需要获取到的属性值 */ export function getAttrValue(targetStr,attr) { let endStr = ''; debugger if(targetStr){ // let targetStr = str.replace(/\s/g,'') //字符串拆分数组 const targetArr = targetStr.split(',') //循环数组 for(let i=0;i