Commit 2f8b38f648761185760548e9d4ea94a1ccfb86b5

Authored by 邱嘉伟
1 parent cdc672d8

pref:参数设计器 部分样式修改

... ... @@ -18,7 +18,6 @@ import {
18 18 Divider,
19 19 message,
20 20 } from 'antd';
21   -import type { FormInstance } from 'antd/es/form';
22 21 import React, {
23 22 useCallback,
24 23 useEffect,
... ... @@ -86,7 +85,6 @@ interface ParameterSettingProps {
86 85 nodeType?: string | 'START' | 'END';
87 86 appId?: string; // 当前应用ID
88 87 }
89   -const EditableContext = React.createContext<FormInstance<any> | null>(null);
90 88
91 89 const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
92 90 console.log('onChange', e);
... ... @@ -178,7 +176,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
178 176 </div>
179 177 ),
180 178 dataIndex: 'code',
181   - width: '12%',
  179 + width: '150px',
182 180 key: 'code',
183 181 render: (text, record) => (
184 182 < Form.Item
... ... @@ -201,7 +199,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
201 199 </div>
202 200 ),
203 201 dataIndex: 'title',
204   - width: '12%',
  202 + width: '112px',
205 203 key: 'title',
206 204 render: (text, record) => (
207 205 <Form.Item
... ... @@ -224,7 +222,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
224 222 </div>
225 223 ),
226 224 dataIndex: 'type',
227   - width: '8%',
  225 + width: '102px',
228 226 key: 'type',
229 227 render: (text, record) =>
230 228 <Form.Item
... ... @@ -248,7 +246,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
248 246 {
249 247 title: '默认值',
250 248 dataIndex: 'valueMapping',
251   - width: '13%',
  249 + width: '116px',
252 250 key: 'valueMapping',
253 251 render: (text, record) =>
254 252 <div className="editable-cell ">
... ... @@ -273,6 +271,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
273 271 title: '参数说明',
274 272 dataIndex: 'description',
275 273 key: 'description',
  274 + width: '102px',
276 275 render: (text, record) => (
277 276 <Form.Item
278 277 name={'description' + record.id}
... ... @@ -290,7 +289,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
290 289 {
291 290 title: '操作',
292 291 key: 'action',
293   - width: '8%',
  292 + width: '96px',
294 293 render: (text, record) => {
295 294 const isShowAdd = (record && checkShowAdd(record));
296 295 const isShowTree = (record && checkShowTree(record));
... ... @@ -333,6 +332,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
333 332 title: '取值范围',
334 333 dataIndex: 'qxProps',
335 334 editable: true,
  335 + width: '314px',
336 336 key: 'qxProps',
337 337 render: (qxProps: any, record: any) => {
338 338 switch (record.type) {
... ... @@ -388,7 +388,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
388 388 size='small'
389 389 defaultValue={qxProps.min}
390 390 onBlur={(e) => handleChange(e, record, 'qxProps-min')}
391   - style={{ width: '110px' }}
  391 + // style={{ width: '110px' }}
392 392 placeholder="最小值"
393 393 />
394 394 </Form.Item>
... ... @@ -403,7 +403,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
403 403 precision={qxProps.precision || 0}
404 404 defaultValue={qxProps.max}
405 405 onBlur={(e) => handleChange(e, record, 'qxProps-max')}
406   - style={{ width: '110px' }}
  406 + // style={{ width: '110px' }}
407 407 placeholder="最大值"
408 408 />
409 409 </Form.Item>
... ... @@ -444,7 +444,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
444 444 : undefined
445 445 }
446 446 format={formatEnum[qxProps?.format]}
447   - style={{ width: '110px' }}
  447 + // style={{ width: '110px' }}
448 448 showTime
449 449 onChange={(e) => handleChange(e, record, 'qxProps-min')}
450 450 placeholder="开始日期"
... ... @@ -459,7 +459,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
459 459 : undefined
460 460 }
461 461 format={formatEnum[qxProps?.format]}
462   - style={{ width: '110px' }}
  462 + // style={{ width: '110px' }}
463 463 showTime
464 464 onChange={(e) => handleChange(e, record, 'qxProps-max')}
465 465 placeholder="结束日期"
... ... @@ -469,7 +469,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
469 469 <div className='range-cell'>
470 470 <Select
471 471 size='small'
472   - style={{ width: '90px' }}
  472 + // style={{ width: '90px' }}
473 473 bordered={false}
474 474 placeholder="格式"
475 475 popupMatchSelectWidth={false}
... ... @@ -524,7 +524,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
524 524 dataIndex: 'required',
525 525 editable: true,
526 526 key: 'required',
527   - width: '5%',
  527 + width: '76px',
528 528 render: (text, record) => (
529 529 <Form.Item
530 530 name={'required' + record.id}
... ... @@ -804,7 +804,7 @@ const ParameterModal: React.FC<ParameterSettingProps> = (props) => {
804 804 childrenColumnName: 'child'
805 805 }}
806 806 onRow={() => onRow()}
807   - scroll={{ x: 960 }}
  807 + scroll={{ x: 960, y: 432 }}
808 808 // rowClassName={() => 'editable-row'}
809 809 bordered
810 810 pagination={false}
... ...