1. unshift: 新增对象并放在第一位。
const createRow = () => {
plats.value.unshift({
Id: -1,
Name: "",
TypeName: "其他",
BelongName: "其他",
BelongGuid: uuidv4(),
DRI: "",
Function: "",
PlatformId: uuidv4(),
Remark: "",
Status: "",
TechDir: "",
TechFeatue: "",
Type: -1
});
};
2. concat: 列表追加列表
const updateAppendix = (data: Array<FileItem>) => {
reviewData.value.Attachments = reviewData.value.Attachments.concat(data);
};
3. push: 列表追加对象
const addRow = () => {
tableData.value.push({
Id: -1,
BillId: "",
BrandSN: "",
Category: "",
PartName: "",
Brand: "",
ModelType: "",
LeadTechModelType: "",
FillRequire: false,
WhyUseCustomBrand: "",
RDConfirmer: ""
});
};