【fix ESLint】src/components/jero/JVxeTable/utils、src/mixins

This commit is contained in:
zhaoxiao
2023-03-06 11:17:05 +08:00
parent 9b2f446f76
commit 71521236cb
8 changed files with 47 additions and 31 deletions
@@ -19,7 +19,9 @@ export const JEditableTableModelMixin = {
wrapperCol: {
xs: { span: 24 },
sm: { span: 18 }
}
},
addDefaultRowNum: null, // 这个变量应该是一个数字,但是为了保留原本代码中的提示逻辑,定义为null
refKeys: null
}
},
methods: {
@@ -70,7 +72,7 @@ export const JEditableTableModelMixin = {
},
/** 当点击了编辑(修改)按钮时调用此方法 */
edit (record) {
if (record && JSON.stringify(record) != '{}' && record.id) {
if (record && JSON.stringify(record) !== '{}' && record.id) {
this.tableReset()
}
if (typeof this.editBefore === 'function') this.editBefore(record)
@@ -105,7 +107,9 @@ export const JEditableTableModelMixin = {
}
}
tab.dataSource = dataSource
typeof success === 'function' ? success(res) : ''
if (typeof success === 'function') {
success(res)
}
}).finally(() => {
tab.loading = false
})