Element UI to Element Plus - Forms validation #16747
-
Hello, We're currently in the process of migrating our web-app from Vue 2 to Vue 3, and as part of this transition, we're shifting from Element UI to Element Plus. However, we've encountered challenges, particularly concerning form validations. Specifically, we need to dynamically enable/disable certain buttons based on the validity state of various form fields. Our current implementation relies on accessing data from |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
elment-plus only expose out methods that are consistent with the documentation. You are using the implicit method of element-ui (The documentation does not explain), because vue2 throws all events directly, while element-plus uses defineExpose of vue > 3.2 You seem to want this, But I'm not sure it's good to expose |
Beta Was this translation helpful? Give feedback.
elment-plus only expose out methods that are consistent with the documentation.
https://github.com/element-plus/element-plus/blob/d468b38494441d7eeabe7e029e184223f03487d2/packages/components/form/src/form.vue#L183C1-L204C3
You are using the implicit method of element-ui (The documentation does not explain), because vue2 throws all events directly, while element-plus uses defineExpose of vue > 3.2
You seem to want this, But I'm not sure it's good to expose
fields
out.This requires view from the maintainer.
https://github.com/element-plus/element-plus/blob/d468b38494441d7eeabe7e029e184223f03487d2/packages/components/form/src/form.vue#L33C1-L33C37