Showing
1 changed file
with
10 additions
and
1 deletions
| ... | ... | @@ -19,6 +19,13 @@ |
| 19 | 19 | component: 'Checkbox', |
| 20 | 20 | defaultValue: option.showDeviceName, |
| 21 | 21 | }, |
| 22 | + { | |
| 23 | + field: ComponentConfigFieldEnum.LINE_COLOR, | |
| 24 | + label: '线条颜色', | |
| 25 | + component: 'ColorPicker', | |
| 26 | + changeEvent: 'update:value', | |
| 27 | + defaultValue: option.fontColor, | |
| 28 | + }, | |
| 22 | 29 | ], |
| 23 | 30 | showActionButtonGroup: false, |
| 24 | 31 | labelWidth: 120, |
| ... | ... | @@ -32,6 +39,7 @@ |
| 32 | 39 | const item = getFieldsValue(); |
| 33 | 40 | return { |
| 34 | 41 | fontColor: item[ComponentConfigFieldEnum.FONT_COLOR], |
| 42 | + lineColor: item[ComponentConfigFieldEnum.LINE_COLOR], | |
| 35 | 43 | unit: item[ComponentConfigFieldEnum.UNIT], |
| 36 | 44 | showDeviceName: item[ComponentConfigFieldEnum.SHOW_DEVICE_NAME], |
| 37 | 45 | } as ComponentInfo; |
| ... | ... | @@ -39,11 +47,12 @@ |
| 39 | 47 | |
| 40 | 48 | const setFormValues = (data: Recordable) => { |
| 41 | 49 | // return setFieldsValue(data); |
| 42 | - const { unit, fontColor, showDeviceName } = data; | |
| 50 | + const { unit, fontColor, showDeviceName, lineColor } = data; | |
| 43 | 51 | |
| 44 | 52 | const value = { |
| 45 | 53 | [ComponentConfigFieldEnum.UNIT]: unit, |
| 46 | 54 | [ComponentConfigFieldEnum.FONT_COLOR]: fontColor, |
| 55 | + [ComponentConfigFieldEnum.LINE_COLOR]: lineColor, | |
| 47 | 56 | [ComponentConfigFieldEnum.SHOW_DEVICE_NAME]: showDeviceName, |
| 48 | 57 | }; |
| 49 | 58 | return setFieldsValue(value); | ... | ... |