Showing
1 changed file
with
56 additions
and
93 deletions
@@ -14,90 +14,22 @@ | @@ -14,90 +14,22 @@ | ||
14 | Demo: | 14 | Demo: |
15 | 15 | ||
16 | ```tsx | 16 | ```tsx |
17 | -import { QxParameterSetting } from '@qx/common'; | 17 | +import { QxParameterSetting, request } from '@qx/common'; |
18 | import { Input } from 'antd'; | 18 | import { Input } from 'antd'; |
19 | import React, { useState } from 'react'; | 19 | import React, { useState } from 'react'; |
20 | - | 20 | +import { appFormList } from './mock'; |
21 | export default () => { | 21 | export default () => { |
22 | const [value, setValue] = useState([ | 22 | const [value, setValue] = useState([ |
23 | { | 23 | { |
24 | - code: '29gnd', | ||
25 | - id: 'f7724ff3557041588fcdcf69d31bec1d', | ||
26 | - pid: '', | ||
27 | - showCode: true, | ||
28 | - qxProps: { | ||
29 | - appId: 'HBZy3te6d9SxSMO3lLr', | ||
30 | - formId: 'j9s5sUXvLiT2a1PJOsh', | ||
31 | - formName: '合同管理', | ||
32 | - }, | ||
33 | - required: false, | ||
34 | - title: '流程类萨', | ||
35 | - type: 'OBJECT', | ||
36 | - disabled: true, | ||
37 | - child: [ | ||
38 | - { | ||
39 | - id: '519338cceed64b08aeadcc7f5b4c9d94', | ||
40 | - pid: 'f7724ff3557041588fcdcf69d31bec1d', | ||
41 | - code: '60edb3', | ||
42 | - showCode: true, | ||
43 | - title: '问问', | ||
44 | - required: true, | ||
45 | - qxProps: { | ||
46 | - min: '2023-08-18', | ||
47 | - max: '2023-08-08', | ||
48 | - options: ['1231231231321'], | ||
49 | - default: '2023-08-02', | ||
50 | - format: 'YEAR_DATE', | ||
51 | - }, | ||
52 | - disabled: false, | ||
53 | - type: 'TIME', | ||
54 | - }, | ||
55 | - ], | ||
56 | - }, | ||
57 | - { | ||
58 | id: '6370b8fd52484b83abd702379870b05f', | 24 | id: '6370b8fd52484b83abd702379870b05f', |
59 | pid: '', | 25 | pid: '', |
60 | code: 'ufsqtk', | 26 | code: 'ufsqtk', |
61 | showCode: true, | 27 | showCode: true, |
62 | title: '爱的人翁热', | 28 | title: '爱的人翁热', |
63 | required: true, | 29 | required: true, |
64 | - qxProps: { | ||
65 | - min: 1, | ||
66 | - max: 10, | ||
67 | - options: ['232312312323423'], | ||
68 | - default: 112, | ||
69 | - precision: 2, | ||
70 | - }, | ||
71 | - disabled: false, | ||
72 | - type: 'NUMBER', | ||
73 | - }, | ||
74 | - { | ||
75 | - id: '2df392beea224ad5af58ac96dad04e7b', | ||
76 | - pid: '', | ||
77 | - code: 'ci4ihw', | ||
78 | - showCode: true, | ||
79 | - title: '来来来', | ||
80 | - required: false, | ||
81 | - child: [ | ||
82 | - { | ||
83 | - id: 'db1cd3c513534a82ae85f63e82cf0951', | ||
84 | - pid: '2df392beea224ad5af58ac96dad04e7b', | ||
85 | - code: 'b3cbef', | ||
86 | - title: '啊实打实', | ||
87 | - required: false, | ||
88 | - qxProps: { | ||
89 | - min: '2023-08-16', | ||
90 | - max: '2023-08-01', | ||
91 | - options: ["asdaa'd "], | ||
92 | - default: '2023-08-03', | ||
93 | - format: 'YEAR_DATE', | ||
94 | - }, | ||
95 | - disabled: false, | ||
96 | - type: 'TIME', | ||
97 | - }, | ||
98 | - ], | 30 | + qxProps: {}, |
99 | disabled: false, | 31 | disabled: false, |
100 | - type: 'ARRAY', | 32 | + type: 'FORM', |
101 | }, | 33 | }, |
102 | ]); | 34 | ]); |
103 | const handleChange = (newValue) => { | 35 | const handleChange = (newValue) => { |
@@ -140,39 +72,70 @@ export default () => { | @@ -140,39 +72,70 @@ export default () => { | ||
140 | }; | 72 | }; |
141 | 73 | ||
142 | const isHide = true; | 74 | const isHide = true; |
143 | - const isShow = true; | ||
144 | 75 | ||
145 | const componentItem = { | 76 | const componentItem = { |
146 | value: comValue, | 77 | value: comValue, |
147 | onChange: comHandleChange, | 78 | onChange: comHandleChange, |
148 | }; | 79 | }; |
80 | + const titleDom = ( | ||
81 | + <div | ||
82 | + style={{ | ||
83 | + width: '100%', | ||
84 | + display: 'flex', | ||
85 | + justifyContent: 'flex-start', | ||
86 | + flexDirection: 'column', | ||
87 | + }} | ||
88 | + > | ||
89 | + <span | ||
90 | + style={{ | ||
91 | + overflow: 'hidden', | ||
92 | + whiteSpace: 'nowrap', | ||
93 | + textOverflow: 'ellipsis', | ||
94 | + }} | ||
95 | + > | ||
96 | + 标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示 | ||
97 | + </span> | ||
98 | + <span | ||
99 | + style={{ | ||
100 | + overflow: 'hidden', | ||
101 | + whiteSpace: 'nowrap', | ||
102 | + textOverflow: 'ellipsis', | ||
103 | + }} | ||
104 | + > | ||
105 | + 标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示标题展示 | ||
106 | + </span> | ||
107 | + </div> | ||
108 | + ); | ||
109 | + | ||
149 | return ( | 110 | return ( |
150 | - <QxParameterSetting | ||
151 | - value={value} | ||
152 | - nodeItem={nodeItem} | ||
153 | - // componentItem={componentItem} | ||
154 | - onChange={handleChange} | ||
155 | - isHideSearch={isHide} | ||
156 | - isShowTitle={isShow} | ||
157 | - isShowField={true} | ||
158 | - title={'sadaasdasdasdwwwwwwwasdasdasdsdsd'} | ||
159 | - // component={QxTagsInput} | ||
160 | - /> | 111 | + <div style={{ width: '400px' }}> |
112 | + <QxParameterSetting | ||
113 | + value={value} | ||
114 | + nodeItem={nodeItem} | ||
115 | + // componentItem={componentItem} | ||
116 | + onChange={handleChange} | ||
117 | + isHideSearch={isHide} | ||
118 | + isShowField={true} | ||
119 | + title={titleDom} | ||
120 | + // component={QxTagsInput} | ||
121 | + request={request} | ||
122 | + appFormList={appFormList} | ||
123 | + /> | ||
124 | + </div> | ||
161 | ); | 125 | ); |
162 | }; | 126 | }; |
163 | ``` | 127 | ``` |
164 | 128 | ||
165 | ## 入参数据格式 | 129 | ## 入参数据格式 |
166 | 130 | ||
167 | -| 参数 | 说明 | 类型 | 默认值 | | ||
168 | -| ------------ | -------------------------------- | ------ | ------ | | ||
169 | -| isHideSearch | 是否隐藏搜索框 | bool | - | | ||
170 | -| nodeItem | 节点信息,默认值右侧选择节点使用 | [] | - | | ||
171 | -| value | | [] | - | | ||
172 | -| isShowTitle | 是否显示左侧标题 | bool | - | | ||
173 | -| title | 左侧标题 | string | - | | ||
174 | -| isShowField | 是否显示下部默认值 item | bool | - | | ||
175 | -| onChange | | | - | | 131 | +| 参数 | 说明 | 类型 | 默认值 | |
132 | +| ------------ | -------------------------------- | --------------- | ------ | | ||
133 | +| isHideSearch | 是否隐藏搜索框 | bool | - | | ||
134 | +| nodeItem | 节点信息,默认值右侧选择节点使用 | [] | - | | ||
135 | +| value | | [] | - | | ||
136 | +| title | 左侧标题 | React.ReactNode | - | | ||
137 | +| isShowField | 是否显示下部默认值 item | bool | - | | ||
138 | +| onChange | | | - | | ||
176 | 139 | ||
177 | ## 出参数据格式 | 140 | ## 出参数据格式 |
178 | 141 |