@@ -85,8 +85,8 @@ export default function FormHorizontalDemo() {
8585 const [labelAlign , setLabelAlign ] = useState (' right' );
8686 const [layout , setLayout ] = useState (' horizontal' );
8787 const [disabled , setDisabled ] = useState (false );
88- const [singleNodes , setSingleNodes ] = useState ([]);
89- const [selectedNodes , setSelectedNodes ] = useState ([]);
88+ // const [singleNodes, setSingleNodes] = useState([]);
89+ // const [selectedNodes, setSelectedNodes] = useState([]);
9090
9191 const [value , setValue ] = useState ();
9292 const radioList = [
@@ -204,9 +204,9 @@ export default function FormHorizontalDemo() {
204204 < Checkbox value= {2 }> 京东< / Checkbox>
205205 < Checkbox value= {3 }> 苏宁< / Checkbox>
206206 < Checkbox value= {4 }> 蘑菇街< / Checkbox>
207- < Checkbox value= {4 }> 拼多多< / Checkbox>
208- < Checkbox value= {4 }> 线下< / Checkbox>
209- < Checkbox value= {4 }> 有赞< / Checkbox>
207+ < Checkbox value= {5 }> 拼多多< / Checkbox>
208+ < Checkbox value= {6 }> 线下< / Checkbox>
209+ < Checkbox value= {7 }> 有赞< / Checkbox>
210210 < / Checkbox .Group >
211211 < / Form .Item >
212212
@@ -250,35 +250,44 @@ export default function FormHorizontalDemo() {
250250 < / Select>
251251 < / Form .Item >
252252
253- < Form .Item label= " 树下拉单选" required>
254- < TreeSelect
255- searchable
256- allowClear
257- type= " single"
258- isUnfold
259- containParentNode
260- placeholder= " 选择一个选项"
261- style= {{ width: 328 }}
262- dataSource= {treeData}
263- value= {singleNodes}
264- onChange= {(_ , selectedNodes ) => setSingleNodes (selectedNodes)}
265- / >
266- < / Form .Item >
267-
268- < Form .Item label= " 树下拉多选" required>
269- < TreeSelect
270- searchable
271- allowClear
272- type= " multiple"
273- isUnfold
274- containParentNode
275- placeholder= " 选择一个选项"
276- style= {{ width: 328 }}
277- dataSource= {treeData}
278- value= {selectedNodes}
279- onChange= {(_ , selectedNodes ) => setSelectedNodes (selectedNodes)}
280- / >
281- < / Form .Item >
253+ {/* <Form.Item label="树下拉单选" required>*/ }
254+ {/* <TreeSelect*/ }
255+ {/* searchable*/ }
256+ {/* allowClear*/ }
257+ {/* type="single"*/ }
258+ {/* isUnfold*/ }
259+ {/* containParentNode*/ }
260+ {/* placeholder="选择一个选项"*/ }
261+ {/* style={{ width: 328 }}*/ }
262+ {/* dataSource={treeData}*/ }
263+ {/* {...field.init('tree1', {*/ }
264+ {/* rules: [{*/ }
265+ {/* validator: (name, value, callback) => {*/ }
266+ {/* console.log(value, '-----')*/ }
267+ {/* callback(value ? '' : '请选择');*/ }
268+ {/* } */ }
269+ {/* }]*/ }
270+ {/* })}*/ }
271+ {/* />*/ }
272+ {/* </Form.Item>*/ }
273+
274+ {/* <Form.Item label="树下拉多选" required>*/ }
275+ {/* <TreeSelect*/ }
276+ {/* searchable*/ }
277+ {/* allowClear*/ }
278+ {/* type="multiple"*/ }
279+ {/* isUnfold*/ }
280+ {/* containParentNode*/ }
281+ {/* placeholder="选择一个选项"*/ }
282+ {/* style={{ width: 328 }}*/ }
283+ {/* dataSource={treeData}*/ }
284+ {/* {...field.init('tree2', {*/ }
285+ {/* rules: [{ required: true, message: '请选择' }]*/ }
286+ {/* })}*/ }
287+ {/* value={selectedNodes}*/ }
288+ {/* onChange={(_, selectedNodes) => setSelectedNodes(selectedNodes)}*/ }
289+ {/* />*/ }
290+ {/* </Form.Item>*/ }
282291
283292 < Form .Item wrapperCol= {{ offset: 6 }}>
284293 < Button disabled= {disabled} type= " primary" style= {{ marginRight: 10 }} onClick= {() => {
0 commit comments