naive-ui
naive-ui copied to clipboard
Support prop name for all form fields
This function solves the problem (这个功能解决的问题)
I try to use some components in a legacy application. I need to set the input field attribute name.
Actually it is possible for radio see https://www.naiveui.com/en-US/os-theme/components/radio#API.
Status (not complete):
- autocomplete (workaround input-props)
- color picker (not possible)
- checkbox (not possible)
- date picker (not possible)
- select (workaround input-props)
- slider (not possible)
- switch (not possible)
- upload (workaround input-props)
Expected API (期望的 API)
prop name
see radio implementation. For multiple fields (date picker or dynamic inputs) save as array.
I think you may add hidden input for components without input. For example <input type="hidden" name="xxx" :value="selectValue" />
.
I'm not sure we will finally provide input-props
for all listed components.
This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem