将一个数组转化为以逗号分隔的参数序列
data() {
return {
list1 = [1,2,3,4]
list2 = [5,6,7]
}
}
this.rids = [
...this.list1,
...this.list2
]
打印: rids = [1,2,3,4,5,6,7]
this.rids = [
...this.list1,
...this.list2
].join(',')
--将数组内容转化为字符串--
将一个数组转化为以逗号分隔的参数序列
data() {
return {
list1 = [1,2,3,4]
list2 = [5,6,7]
}
}
this.rids = [
...this.list1,
...this.list2
]
打印: rids = [1,2,3,4,5,6,7]
this.rids = [
...this.list1,
...this.list2
].join(',')
--将数组内容转化为字符串--