var a = ['1','2']
var b = [`${a[0]},${a[1]}`]
可转成['1,2']
比如 var b = ['1,2'],需要转成 ['1','2']
this.levelCheckIds = []
if (this.$route.query.levelCode) {
this.$route.query.levelCode.split(",").forEach((item) => {
this.levelCheckIds.push(item);
});
}
var a = ['1','2']
var b = [`${a[0]},${a[1]}`]
可转成['1,2']
比如 var b = ['1,2'],需要转成 ['1','2']
this.levelCheckIds = []
if (this.$route.query.levelCode) {
this.$route.query.levelCode.split(",").forEach((item) => {
this.levelCheckIds.push(item);
});
}