-
Notifications
You must be signed in to change notification settings - Fork 82
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
[新功能需求] form校验是否可以支持key为"xxx.xxx"形式 #257
Comments
目前validate方法支持 |
这个是ts的类型错误。formState上没那个属性。这里你可以用v-model="formState.xx.xx"来做绑定,prop="xx.xx"。
------------------ 原始邮件 ------------------
发件人: "Moonofweisheng/wot-design-uni" ***@***.***>;
发送时间: 2024年4月24日(星期三) 上午10:04
***@***.***>;
***@***.******@***.***>;
主题: Re: [Moonofweisheng/wot-design-uni] [新功能需求] form校验是否可以支持key为"xxx.xxx"形式 (Issue #257)
目前validate方法支持x.x.x格式prop的。
image.png (view on web)
这样写校验不通过, 需要配置什么吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
不好意思, 类型是我图省事没改 |
这样恐怕不行,'xx.xx'这种格式的prop,目前form的处理是会去找 |
低代码项目, 为了支持重复key做的操作(比如不同表的id、创建时间: "表1.id、 表2.id" 这样), web端使用的框架是ant-design-vue, 那边的prop是根据数组来进行寻找层级的, 所以不会有这个问题. |
所以我的意思就是可不可以 prop是根据"." 来分割层级 和根据[]来区分层级(就像ant-design) 都支持, 用户自己选择 :) |
s
之前没考虑过这个场景,有兴趣可以提个pr来。着急的话可以自行处理一下,在构造formState时将'.'先换成'_'之类的,解决当前的问题。 |
这个功能解决了什么问题?
目前遇到了表单的key就是"abc.abc" 绑定时也绑定为 form"abc.abc"
是否可以添加一个api为"是否以.分割表单层级", prop也可以加支持string[]来表示层级
如果可以的话 我可以pr :)
你期望的 API 是什么样子的?
无
The text was updated successfully, but these errors were encountered: