Showing
1 changed file
with
22 additions
and
36 deletions
... | ... | @@ -4,9 +4,8 @@ |
4 | 4 | /** |
5 | 5 | * debug: true |
6 | 6 | */ |
7 | -import { QxOrgSelector } from '@qx/common'; | |
7 | +import { QxOrgSelector, request } from '@qx/common'; | |
8 | 8 | import React from 'react'; |
9 | -import { request } from '@qx/common'; | |
10 | 9 | |
11 | 10 | export default () => { |
12 | 11 | return ( |
... | ... | @@ -20,41 +19,28 @@ export default () => { |
20 | 19 | ### 弹框 |
21 | 20 | |
22 | 21 | ```tsx |
23 | -import {QxOrgSelector} from '@qx/common'; | |
24 | -import React, {useState} from 'react'; | |
25 | -import {request} from '@qx/common'; | |
22 | +import { QxOrgSelector, request } from '@qx/common'; | |
23 | +import React, { useState } from 'react'; | |
26 | 24 | |
27 | 25 | export default () => { |
28 | - const [visible, setVisible] = useState(false) | |
29 | - return ( | |
30 | - <div> | |
31 | - <div onClick={()=> setVisible(true)}>点一下</div> | |
32 | - <QxOrgSelector.Dialog | |
33 | - request={request} | |
34 | - checkStrictly | |
35 | - title={'添加部门'} | |
36 | - visible={visible} | |
37 | - multiple={true} | |
38 | - onOk={(orgIds: any) => { | |
39 | - console.log(orgIds,'lllll') | |
40 | - }} | |
41 | - onCancel={() => { | |
42 | - setVisible(false); | |
43 | - }} | |
44 | - /> | |
45 | - </div> | |
46 | - ); | |
26 | + const [visible, setVisible] = useState(false); | |
27 | + return ( | |
28 | + <div> | |
29 | + <div onClick={() => setVisible(true)}>点一下</div> | |
30 | + <QxOrgSelector.Dialog | |
31 | + request={request} | |
32 | + checkStrictly | |
33 | + title={'添加部门'} | |
34 | + visible={visible} | |
35 | + multiple={true} | |
36 | + onOk={(orgIds: any) => { | |
37 | + console.log(orgIds, 'lllll'); | |
38 | + }} | |
39 | + onCancel={() => { | |
40 | + setVisible(false); | |
41 | + }} | |
42 | + /> | |
43 | + </div> | |
44 | + ); | |
47 | 45 | }; |
48 | 46 | ``` |
49 | - | |
50 | -## API | |
51 | - | |
52 | -| 参数 | 说明 | 类型 | 默认值 | | |
53 | -| ------------ | ------------------------ | ------------------ | ------ | | |
54 | -| onChange | 选的人变化时的回调 | function(value) | - | | |
55 | -| defaultValue | 默认值 | string[] | - | | |
56 | -| disabled | 禁用 | bool | - | | |
57 | -| multiple | 是否多选 | bool | - | | |
58 | -| max | 最多选几个,ps:没有控制 | number | - | | |
59 | -| readOnly | 只读 | bool | - | | |
60 | -| value | | string[] \| string | | | ... | ... |