Skip to content
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

写的很好,提点小建议 #3

Open
zzhCloud opened this issue Feb 21, 2024 · 9 comments
Open

写的很好,提点小建议 #3

zzhCloud opened this issue Feb 21, 2024 · 9 comments

Comments

@zzhCloud
Copy link

zzhCloud commented Feb 21, 2024

1、组件是否支持插槽扩展
2、建议增加自定义组件示例
3、建议加上TS提示
4、文档建议完善下
5、必填校验报错结果应显示在表单项下方,不是控制台输出,体验不友好
6、希望表单项内置禁用和隐藏,支持函数形式,包含参数当前表单对象,将判断条件写在函数内
(好不容易找到个支持element-plus+vant的,加油作者大大)
7、使用了onChange未生效
8、子容器内必填项校验无法通过,见下图
9、vant场景下SELECT组件options设置为数组报错

@0604hx
Copy link
Owner

0604hx commented Feb 21, 2024

感谢支持,这个项目会继续完善哈

@zzhCloud
Copy link
Author

image

@zzhCloud
Copy link
Author

zzhCloud commented Feb 21, 2024

let form = reactive({
"size":"medium", //表单尺寸
"width":"100%", //表单整体宽度
"grid":3, //每行的列数
"labelWidth":120, //标签宽度
"labelPlacement":"top", //标签位置,可选:top(默认)、left
onChange: (data) => {
console.log(data)
},
items:[
{ _widget:"INPUT", _uuid:"name", _text:"您的姓名", _required:true },
{ _widget:"INPUT", _uuid:"origin", _text:"籍贯" },
{ _widget:"NUMBER", _uuid:"age", _text:"年龄", suffix:"岁" },
{
"_widget": "CARD",
"size": "medium",
"width": "100%",
"grid": 6,
"labelWidth": "120px",
"labelShow": true,
"labelPlacement": "top",
"labelAlign": "left",
"_col": 1,
"title": "教育经历",
"bordered": true,
"_container": true,
"_hideLabel": true,
"category": "multiple",
"_uuid": "educates",
"max": 3,
"items": [
{
"_widget": "SELECT",
"_uuid": "type",
"_text": "类型",
"_value": "小学",
"options": "小学,中学,高中"
},
{
"_widget": "DATE",
"_uuid": "from",
"_text": "开始日期"
},
{
"_widget": "INPUT",
"_uuid": "to",
"_text": "结束日期"
},
{
"_widget": "INPUT",
"_uuid": "school",
"_col": 3,
"_required": true,
"_text": "学校名称"
}
]
}
],
"submitText": '保存'
})

@0604hx
Copy link
Owner

0604hx commented Feb 22, 2024

bug已收到,下个版本将修复此问题,感谢支持🤝

@zzhCloud
Copy link
Author

zzhCloud commented Mar 8, 2024

image

@0604hx
Copy link
Owner

0604hx commented Mar 11, 2024

image

已处理:修复 SELECT 组件参数配置为数组时报错 🐛,感谢提醒

0604hx added a commit that referenced this issue Mar 11, 2024
@0604hx
Copy link
Owner

0604hx commented Mar 11, 2024

image

已修复:修复子表单必填项校验BUG

@zzhCloud
Copy link
Author

还有个疑问,比如我要编辑表单,我要怎么获取和设置表单值,文档没翻到

@0604hx
Copy link
Owner

0604hx commented Mar 14, 2024

还有个疑问,比如我要编辑表单,我要怎么获取和设置表单值,文档没翻到

可以说下具体的场景吗?

修改表单值可以在这些场景:加载完成时(onLoad)、提交前(onSubmit)、值变动时(onChange),文档页:高级功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants