fix(vue/grid/edit): [grid] fix Number input box returns string type data (#772)

Co-authored-by: dushihong <dush@nancal.com>
This commit is contained in:
David 2023-11-13 15:23:45 +08:00 committed by GitHub
parent 0a2b469926
commit e8b1c6ce70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -421,6 +421,14 @@ export default {
if (isActived) {
this.updateFooter()
// 处理数字输入框返回string类型数据导致还原初始数字还是编辑状态的问题
const { row, column } = args
const { editor } = column || {}
if (editor?.component === 'input' && editor?.attrs?.type === 'number') {
row[column.property] = +row[column.property]
}
emitEvent(this, 'edit-closed', [args, event])
}