Yes
ElForm
I want to reset initialValues when the form successfully submited. just looks like: $refs.form.resetInitialValues() or something.
So that when I call resetFields, the field values can be reset to the newly submited value, instead of the old dirty value.
I think this would be useful as well.
这确实是个值得改进的需求点,比如编辑某条数据时组件data初始化都是空值。从服务端加载数据后重新赋值。重置表单功能应以赋值数据为准,而非全置为空。
可以在服务端加载数据后保存一份快照数据,然后在submit之后使用这份快照数据填充当前数据