We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
但是设置之后无效,看了之前的issues也有这个问题 但未解决 看了看代码 发现代码中没有判断行数,于是改了改,目前暂时试着没问题 不知道这样改合不合适,暂时没发现有影响其他地方的问题
add() { if (typeof this.addBefore === 'function') this.addBefore() // 默认新增空数据 let rowNum = this.addDefaultRowNum if (typeof rowNum !== 'number') { rowNum = 1 console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0') } this.eachAllTable((item) => { //update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 if (rowNum !== 0) { setTimeout(() => { for (let i = 0; i < rowNum; i++) { item.addRows() } }, 30) } //update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 }) if (typeof this.addAfter === 'function') this.addAfter(this.model) this.edit(this.model) },
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
jl
问题已修复
No branches or pull requests
版本号:3.1.0
前端版本:vue2
问题描述:JVxeTable默认行数不好使,业务需求中不能有默认行数,于是设置addDefaultRow,
但是设置之后无效,看了之前的issues也有这个问题 但未解决 看了看代码 发现代码中没有判断行数,于是改了改,目前暂时试着没问题
不知道这样改合不合适,暂时没发现有影响其他地方的问题
截图&代码:
add() { if (typeof this.addBefore === 'function') this.addBefore() // 默认新增空数据 let rowNum = this.addDefaultRowNum if (typeof rowNum !== 'number') { rowNum = 1 console.warn('由于你没有在 data 中定义 addDefaultRowNum 或 addDefaultRowNum 不是数字,所以默认添加一条空数据,如果不想默认添加空数据,请将定义 addDefaultRowNum 为 0') } this.eachAllTable((item) => { //update-begin-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 if (rowNum !== 0) { setTimeout(() => { for (let i = 0; i < rowNum; i++) { item.addRows() } }, 30) } //update-end-author:taoyan date:20210315 for: 一对多jvex 默认几行不好使了 LOWCOD-1349 }) if (typeof this.addAfter === 'function') this.addAfter(this.model) this.edit(this.model) },
友情提示(为了提高issue处理效率):
The text was updated successfully, but these errors were encountered: