fix:scFormTable增加pushType传输
This commit is contained in:
parent
f986cd8d59
commit
2703a2a1a3
|
@ -49,7 +49,8 @@
|
|||
dragSort: { type: Boolean, default: false },
|
||||
hideAdd: { type: Boolean, default: false },
|
||||
hideDelete: { type: Boolean, default: false },
|
||||
hideIndex: { type: Boolean, default: false }
|
||||
hideIndex: { type: Boolean, default: false },
|
||||
pushType: { type: String, default: 'push' }
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
|
@ -98,8 +99,12 @@
|
|||
})
|
||||
},
|
||||
rowAdd(){
|
||||
const temp = JSON.parse(JSON.stringify(this.addTemplate))
|
||||
this.data.push(temp);
|
||||
const temp = JSON.parse(JSON.stringify(this.addTemplate));
|
||||
if(this.pushType == 'unshift'){
|
||||
this.data.unshift(temp);
|
||||
}else{
|
||||
this.data.push(temp);
|
||||
}
|
||||
this.$emit('add', temp)
|
||||
},
|
||||
rowDel(row, index){
|
||||
|
|
Loading…
Reference in New Issue