2.4.11
Win10 1803/ Chrome 71.0.3578.98 32bit
2.5.21
https://jsfiddle.net/tbkdnj6x/
No matter when the form model has its value, el-from.resetFields() should empty the model.
el-form.resetFields() will not reset the form-item.value if the value is set in created() function
Even when you delete the test string in the first input component manually, then click the reset button, you will see the test string AGAIN!
It works if you give value to form model field in mounted() function. see here
If cannot or no plan to fix the issue I discribed above, I would close this issue.
It works if you give value to form model field in
mounted()function. see hereIf cannot or no plan to fix the issue I discribed above, I would close this issue.
You didn't give prop for all the el-form-item. For resetting the form prop is mandatory for all the el-form-item.
It works if you give value to form model field in
mounted()function. see hereIf cannot or no plan to fix the issue I discribed above, I would close this issue.
I think this is not documented feature. I think that form take default model in created hook and you can use this feature for forms with default fields data.
Most helpful comment
It works if you give value to form model field in
mounted()function. see hereIf cannot or no plan to fix the issue I discribed above, I would close this issue.