Skip to content
New issue

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

[Bug]: 修正编辑表单弹框时的引用类型数据重置问题 #415

Closed
jensen-999 opened this issue Apr 27, 2024 · 3 comments
Closed

Comments

@jensen-999
Copy link

软件版本

v1.0.8

运行环境

Windows (64)

运行架构

AMD64

重现步骤

打开operate-modal.vue文件,
修改创建Model的函数

function createDefaultModel(): Model {
  return {
    customName: '匿名顾客',
    customPhone: '',
    originalPrice: 0,
    receivedAmount: 0,
    profit: 0,
    orderProductList<object[]>: [], // 增加引用数据类型
    image: '',
    remark: ''
  }
}

点击某一表格行的编辑按钮。
打开编辑弹框。
修改orderProductList数据,并点击取消。
检查该行数据,引用类型数据未重置。

期望的结果是什么?

无论用户是否保存编辑,点击取消后,所有数据应重置为编辑前的状态,确保数据的一致性和准确性。

实际的结果是什么?

点击取消后,基本数据类型的数据重置为编辑前的状态,但引用类型数据没有被重置。
1
2
3

日志记录(可选)

No response

补充说明(可选)

No response

@honghuangdc
Copy link
Member

你这代码是自己写的,自己处理下就行。

@honghuangdc
Copy link
Member

你对比下,用户管理里面有个 userRoles, 是引用数据,没有你说的这个问题

@honghuangdc honghuangdc reopened this Apr 27, 2024
@honghuangdc
Copy link
Member

待复现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants