We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
想要在react中使用amis。配置字段属性除了onchange都不生效
import React from "react" import 'amis/lib/themes/antd.css' import 'amis/lib/themes/cxd.css' import 'amis/lib/helper.css' import { ConditionBuilder } from 'amis'; const App = () => { const formData = { "type": "page", "title": "搜索", "body": { "type": "form", "controls": [ { "type": "condition-builder", "label": "查询条件", "name": "conditions", "fields": [ { "label": "关键词", "type": "text", "name": "keyword" }, { "label": "最小数量", "type": "number", "name": "minQuantity" }, { "label": "状态", "type": "select", "name": "status", "options": [ { "label": "启用", "value": "active" }, { "label": "禁用", "value": "inactive" } ] } ] } ] } }; console.log('ConditionBuilder config:', formData); const handleSearch = (values) => { console.log(111111111) // 处理搜索条件的逻辑 console.log("搜索条件:", values); // 在这里你可以将搜索条件应用到数据过滤或者发起网络请求等 }; return ( <ConditionBuilder data={formData} placeholder="请设置查询条件" /> ) } export default App
The text was updated successfully, but these errors were encountered:
如果直接用 ui 组件,得看 props 说明,输入输出对应的是 value 和 onChange
value
onChange
Sorry, something went wrong.
No branches or pull requests
想要在react中使用amis。配置字段属性除了onchange都不生效
The text was updated successfully, but these errors were encountered: