|
|
|
@ -180,6 +180,7 @@ export default { |
|
|
|
showDialog: { type: Boolean, default: false }, |
|
|
|
showDialog: { type: Boolean, default: false }, |
|
|
|
moldAddMore: { type: Boolean, default: false }, |
|
|
|
moldAddMore: { type: Boolean, default: false }, |
|
|
|
tabPosition: { type: String, default: '' }, |
|
|
|
tabPosition: { type: String, default: '' }, |
|
|
|
|
|
|
|
itemData: { type: Array, default: () => [] }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
@ -230,6 +231,8 @@ export default { |
|
|
|
// 初始添加一行(可选) |
|
|
|
// 初始添加一行(可选) |
|
|
|
if (this.moldAddMore && this.form.tableData.length === 0) { |
|
|
|
if (this.moldAddMore && this.form.tableData.length === 0) { |
|
|
|
this.addTable(); |
|
|
|
this.addTable(); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.form.tableData = this.itemData.length > 0 ? JSON.parse(JSON.stringify(this.itemData)) : []; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|