mirror of
https://github.com/jeecgboot/ant-design-vue-jeecg.git
synced 2026-02-27 01:01:47 +08:00
修复【issues/4019】修复JVxeTable默认行数无效
This commit is contained in:
@@ -53,11 +53,14 @@ export const JVxeTableMixin = {
|
||||
console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0')
|
||||
}
|
||||
//update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
this.eachAllTable((item) => {
|
||||
setTimeout(()=>{
|
||||
item.addRows()
|
||||
}, 30)
|
||||
})
|
||||
if (rowNum > 0) {
|
||||
let newRows = new Array(rowNum).fill({})
|
||||
this.eachAllTable((item) => {
|
||||
setTimeout(()=>{
|
||||
item.addRows(newRows)
|
||||
}, 30)
|
||||
})
|
||||
}
|
||||
//update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
if (typeof this.addAfter === 'function') this.addAfter(this.model)
|
||||
this.edit({})
|
||||
|
||||
@@ -52,13 +52,16 @@ export const JVxeTableModelMixin = {
|
||||
rowNum = 1
|
||||
console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0')
|
||||
}
|
||||
this.eachAllTable((item) => {
|
||||
//update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
setTimeout(()=>{
|
||||
item.addRows()
|
||||
}, 30)
|
||||
//update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
})
|
||||
if (rowNum > 0) {
|
||||
let newRows = new Array(rowNum).fill({})
|
||||
this.eachAllTable((item) => {
|
||||
//update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
setTimeout(()=>{
|
||||
item.addRows(newRows)
|
||||
}, 30)
|
||||
//update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349
|
||||
})
|
||||
}
|
||||
if (typeof this.addAfter === 'function') this.addAfter(this.model)
|
||||
this.edit(this.model)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user