数组基础写法-增加、删除、置顶、上移、下移
## js基础写法
```javascript
// 增加
addItem: function () {
var n = this.signForm.signFormList ? this.signForm.signFormList.length + 1 : 1;
this.signForm.signFormList.push({
title: '标题' + n,
require: false
});
},
// 删除
removeItem: function (item) {
const index = this.signForm.signFor
more...数组flat() 方法
按照一个可指定的深度递归遍历数组:
```javascript
let nestedArray = [1, 2, [3, 4, [5, 6]]];
let flatArray = nestedArray.flat();
console.log(flatArray);
// 输出: [1, 2, 3, 4, [5, 6]]
// 指定深度为2
let deeplyNestedArray = [1, 2, [3, 4, [5, 6]]];
let deeplyFlatArray = deeplyNestedArray.flat(2);
console.log(deepl
more...el-form表单数组循环必填校验
使用element表单时会出现数组对象类型的数据结构并且需要必填校验
<!--more-->
```javascript
data(){
return {
//表单中出现像jsonList这样的数组对象数据
editForm:{
script:'',
paramJsonList:[
{paramName:'',paramaValue:''}
]
},
//表单校验
ed
more...



