-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
请教几个表单的问题 #47
Comments
我感觉我描述的不清楚,那个标签被过滤了,我贴下组件代码: `
` |
第一个问题找到方法了,需要自己转换下:
|
时间自己用 |
你们好辛苦啊,不容易! |
时间不能自己转一下吗 既然设置了format获取到的值应该是格式化之后的结果才对啊 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
美女你好, 请教几个表单的问题:
1、标签无法格式化选中的日期,比如我需要的是“2019-01-10”,加上:format="dateFormat"只能控制页面上显示,无法控制提交后的结果,还是给我的 "2019-01-10T08:28:37.888Z"这种。
比如:
<a-form-item label="发布时间"> <a-date-picker v-model="queryParam.publishTime" name="publishTime" style="width: 100%" :format="dateFormat" /> </a-form-item>
2、绑定的值只能数字,中文汉字无效,纠结了半天,如果绑定了fieldDecoratorId,会导致vue加载单选框默认不选中,但是如果不给fieldDecoratorId,form就取不到值,原因未知。
比如:
<a-form-item label="性别" :labelCol="{lg: {span: 2}, sm: {span: 7}}" :wrapperCol="{lg: {span: 10}, sm: {span: 17} }" fieldDecoratorId="sex" :fieldDecoratorOptions="{rules: [{ required: true, message: '请选择出生日期' }]}" > <a-radio-group v-model="sex"> <a-radio :value="1">男</a-radio> <a-radio :value="2">女</a-radio> </a-radio-group> </a-form-item>
3、标签的defaultValue="movie" 无效。
比如:
<a-form-item label="兴趣爱好" :labelCol="{lg: {span: 2}, sm: {span: 7}}" :wrapperCol="{lg: {span: 10}, sm: {span: 17} }" fieldDecoratorId="like" :fieldDecoratorOptions="{rules: [{ required: false, message: '请选择兴趣爱好' }]}" > <a-select defaultValue="movie"> <a-select-option value="game">游戏</a-select-option> <a-select-option value="movie">电影</a-select-option> <a-select-option value="lvyou">旅游</a-select-option> </a-select> </a-form-item>
请问你们也遇到了吗?
The text was updated successfully, but these errors were encountered: