element split 将多个单号分隔
const condeid = this.formData.WayBillCode; var item = ""; const codes = condeid.split(","); for (var i = 0; i < codes.length; i++) { if (i + 1 === codes.length) { item += "'" + codes[i] + "'"; } else { item += "'" + codes[i] + "',"; } }
---------------------------------------------------------------
const valList = val.split(/,|,|、|\s/); //可以分割多种;