Showing
23 changed files
with
112 additions
and
36 deletions
| @@ -175,7 +175,10 @@ | @@ -175,7 +175,10 @@ | ||
| 175 | label: '取消收藏', | 175 | label: '取消收藏', |
| 176 | auth: 'api:yt:device:online:record', | 176 | auth: 'api:yt:device:online:record', |
| 177 | icon: 'ant-design:heart-outlined', | 177 | icon: 'ant-design:heart-outlined', |
| 178 | - onClick: handelCollect.bind(null, record), | 178 | + popConfirm: { |
| 179 | + title: '是否取消收藏', | ||
| 180 | + confirm: handelCollect.bind(null, record), | ||
| 181 | + }, | ||
| 179 | }, | 182 | }, |
| 180 | { | 183 | { |
| 181 | label: '删除', | 184 | label: '删除', |
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | min: 0, | 45 | min: 0, |
| 46 | max: 100, | 46 | max: 100, |
| 47 | formatter: (e) => { | 47 | formatter: (e) => { |
| 48 | - const value = e.replace(/^0/g, ''); | 48 | + const value = e?.toString().replace(/^0/g, ''); |
| 49 | if (value) { | 49 | if (value) { |
| 50 | return value.replace(/^0/g, ''); | 50 | return value.replace(/^0/g, ''); |
| 51 | } else { | 51 | } else { |
| @@ -24,6 +24,18 @@ | @@ -24,6 +24,18 @@ | ||
| 24 | label: '文本字体大小', | 24 | label: '文本字体大小', |
| 25 | component: 'InputNumber', | 25 | component: 'InputNumber', |
| 26 | defaultValue: 14, | 26 | defaultValue: 14, |
| 27 | + componentProps: { | ||
| 28 | + min: 0, | ||
| 29 | + max: 100, | ||
| 30 | + formatter: (e) => { | ||
| 31 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 32 | + if (value) { | ||
| 33 | + return value.replace(/^0/g, ''); | ||
| 34 | + } else { | ||
| 35 | + return 0; | ||
| 36 | + } | ||
| 37 | + }, | ||
| 38 | + }, | ||
| 27 | }, | 39 | }, |
| 28 | { | 40 | { |
| 29 | field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, | 41 | field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, |
| @@ -36,7 +36,19 @@ | @@ -36,7 +36,19 @@ | ||
| 36 | field: ComponentConfigFieldEnum.FONT_SIZE, | 36 | field: ComponentConfigFieldEnum.FONT_SIZE, |
| 37 | label: '文本字体大小', | 37 | label: '文本字体大小', |
| 38 | component: 'InputNumber', | 38 | component: 'InputNumber', |
| 39 | - defaultValue: option.fontSize, | 39 | + defaultValue: 14, |
| 40 | + componentProps: { | ||
| 41 | + min: 0, | ||
| 42 | + max: 100, | ||
| 43 | + formatter: (e) => { | ||
| 44 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 45 | + if (value) { | ||
| 46 | + return value.replace(/^0/g, ''); | ||
| 47 | + } else { | ||
| 48 | + return 0; | ||
| 49 | + } | ||
| 50 | + }, | ||
| 51 | + }, | ||
| 40 | }, | 52 | }, |
| 41 | { | 53 | { |
| 42 | field: ComponentConfigFieldEnum.PASS_WORD, | 54 | field: ComponentConfigFieldEnum.PASS_WORD, |
| @@ -22,7 +22,19 @@ | @@ -22,7 +22,19 @@ | ||
| 22 | field: ComponentConfigFieldEnum.FONT_SIZE, | 22 | field: ComponentConfigFieldEnum.FONT_SIZE, |
| 23 | label: '文本字体大小', | 23 | label: '文本字体大小', |
| 24 | component: 'InputNumber', | 24 | component: 'InputNumber', |
| 25 | - defaultValue: option.fontSize, | 25 | + defaultValue: 14, |
| 26 | + componentProps: { | ||
| 27 | + min: 0, | ||
| 28 | + max: 100, | ||
| 29 | + formatter: (e) => { | ||
| 30 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 31 | + if (value) { | ||
| 32 | + return value.replace(/^0/g, ''); | ||
| 33 | + } else { | ||
| 34 | + return 0; | ||
| 35 | + } | ||
| 36 | + }, | ||
| 37 | + }, | ||
| 26 | }, | 38 | }, |
| 27 | { | 39 | { |
| 28 | field: ComponentConfigFieldEnum.PASS_WORD, | 40 | field: ComponentConfigFieldEnum.PASS_WORD, |
| @@ -18,14 +18,38 @@ | @@ -18,14 +18,38 @@ | ||
| 18 | field: ComponentConfigFieldEnum.VALUE_SIZE, | 18 | field: ComponentConfigFieldEnum.VALUE_SIZE, |
| 19 | label: '数值字体大小', | 19 | label: '数值字体大小', |
| 20 | component: 'InputNumber', | 20 | component: 'InputNumber', |
| 21 | - defaultValue: option.fontSize, | 21 | + defaultValue: 14, |
| 22 | + componentProps: { | ||
| 23 | + min: 0, | ||
| 24 | + max: 100, | ||
| 25 | + formatter: (e) => { | ||
| 26 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 27 | + if (value) { | ||
| 28 | + return value.replace(/^0/g, ''); | ||
| 29 | + } else { | ||
| 30 | + return 0; | ||
| 31 | + } | ||
| 32 | + }, | ||
| 33 | + }, | ||
| 22 | }, | 34 | }, |
| 23 | { | 35 | { |
| 24 | field: ComponentConfigFieldEnum.TEXT_COLOR, | 36 | field: ComponentConfigFieldEnum.TEXT_COLOR, |
| 25 | label: '文本字体颜色', | 37 | label: '文本字体颜色', |
| 26 | component: 'ColorPicker', | 38 | component: 'ColorPicker', |
| 27 | changeEvent: 'update:value', | 39 | changeEvent: 'update:value', |
| 28 | - defaultValue: option.fontColor, | 40 | + defaultValue: 14, |
| 41 | + componentProps: { | ||
| 42 | + min: 0, | ||
| 43 | + max: 100, | ||
| 44 | + formatter: (e) => { | ||
| 45 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 46 | + if (value) { | ||
| 47 | + return value.replace(/^0/g, ''); | ||
| 48 | + } else { | ||
| 49 | + return 0; | ||
| 50 | + } | ||
| 51 | + }, | ||
| 52 | + }, | ||
| 29 | }, | 53 | }, |
| 30 | { | 54 | { |
| 31 | field: ComponentConfigFieldEnum.FONT_SIZE, | 55 | field: ComponentConfigFieldEnum.FONT_SIZE, |
| @@ -30,7 +30,19 @@ | @@ -30,7 +30,19 @@ | ||
| 30 | field: ComponentConfigFieldEnum.FONT_SIZE, | 30 | field: ComponentConfigFieldEnum.FONT_SIZE, |
| 31 | label: '文本字体大小', | 31 | label: '文本字体大小', |
| 32 | component: 'InputNumber', | 32 | component: 'InputNumber', |
| 33 | - defaultValue: option.fontSize, | 33 | + defaultValue: 14, |
| 34 | + componentProps: { | ||
| 35 | + min: 0, | ||
| 36 | + max: 100, | ||
| 37 | + formatter: (e) => { | ||
| 38 | + const value = e?.toString().replace(/^0/g, ''); | ||
| 39 | + if (value) { | ||
| 40 | + return value.replace(/^0/g, ''); | ||
| 41 | + } else { | ||
| 42 | + return 0; | ||
| 43 | + } | ||
| 44 | + }, | ||
| 45 | + }, | ||
| 34 | }, | 46 | }, |
| 35 | { | 47 | { |
| 36 | field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, | 48 | field: ComponentConfigFieldEnum.SHOW_DEVICE_NAME, |
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | min: 0, | 58 | min: 0, |
| 59 | max: 100, | 59 | max: 100, |
| 60 | formatter: (e) => { | 60 | formatter: (e) => { |
| 61 | - const value = e.replace(/^0/g, ''); | 61 | + const value = e?.toString().replace(/^0/g, ''); |
| 62 | if (value) { | 62 | if (value) { |
| 63 | return value.replace(/^0/g, ''); | 63 | return value.replace(/^0/g, ''); |
| 64 | } else { | 64 | } else { |
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | min: 0, | 76 | min: 0, |
| 77 | max: 100, | 77 | max: 100, |
| 78 | formatter: (e) => { | 78 | formatter: (e) => { |
| 79 | - const value = e.replace(/^0/g, ''); | 79 | + const value = e?.toString().replace(/^0/g, ''); |
| 80 | if (value) { | 80 | if (value) { |
| 81 | return value.replace(/^0/g, ''); | 81 | return value.replace(/^0/g, ''); |
| 82 | } else { | 82 | } else { |
| @@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
| 64 | min: 0, | 64 | min: 0, |
| 65 | max: 100, | 65 | max: 100, |
| 66 | formatter: (e) => { | 66 | formatter: (e) => { |
| 67 | - const value = e.replace(/^0/g, ''); | 67 | + const value = e?.toString().replace(/^0/g, ''); |
| 68 | if (value) { | 68 | if (value) { |
| 69 | return value.replace(/^0/g, ''); | 69 | return value.replace(/^0/g, ''); |
| 70 | } else { | 70 | } else { |
| @@ -82,7 +82,7 @@ | @@ -82,7 +82,7 @@ | ||
| 82 | min: 0, | 82 | min: 0, |
| 83 | max: 100, | 83 | max: 100, |
| 84 | formatter: (e) => { | 84 | formatter: (e) => { |
| 85 | - const value = e.replace(/^0/g, ''); | 85 | + const value = e?.toString().replace(/^0/g, ''); |
| 86 | if (value) { | 86 | if (value) { |
| 87 | return value.replace(/^0/g, ''); | 87 | return value.replace(/^0/g, ''); |
| 88 | } else { | 88 | } else { |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | import { ComponentConfigFieldEnum } from '/@/views/visual/packages/enum'; | 2 | import { ComponentConfigFieldEnum } from '/@/views/visual/packages/enum'; |
| 3 | import { useForm, BasicForm } from '/@/components/Form'; | 3 | import { useForm, BasicForm } from '/@/components/Form'; |
| 4 | import { PublicFormInstaceType } from '/@/views/visual/dataSourceBindPanel/index.type'; | 4 | import { PublicFormInstaceType } from '/@/views/visual/dataSourceBindPanel/index.type'; |
| 5 | + import { nextTick } from 'vue'; | ||
| 5 | 6 | ||
| 6 | const [register, { getFieldsValue, setFieldsValue, resetFields }] = useForm({ | 7 | const [register, { getFieldsValue, setFieldsValue, resetFields }] = useForm({ |
| 7 | schemas: [ | 8 | schemas: [ |
| @@ -28,7 +29,7 @@ | @@ -28,7 +29,7 @@ | ||
| 28 | min: 0, | 29 | min: 0, |
| 29 | max: 100, | 30 | max: 100, |
| 30 | formatter: (e) => { | 31 | formatter: (e) => { |
| 31 | - const value = e.replace(/^0/g, ''); | 32 | + const value = e?.toString().replace(/^0/g, ''); |
| 32 | if (value) { | 33 | if (value) { |
| 33 | return value.replace(/^0/g, ''); | 34 | return value.replace(/^0/g, ''); |
| 34 | } else { | 35 | } else { |
| @@ -58,7 +58,7 @@ | @@ -58,7 +58,7 @@ | ||
| 58 | min: 0, | 58 | min: 0, |
| 59 | max: 100, | 59 | max: 100, |
| 60 | formatter: (e) => { | 60 | formatter: (e) => { |
| 61 | - const value = e.replace(/^0/g, ''); | 61 | + const value = e?.toString().replace(/^0/g, ''); |
| 62 | if (value) { | 62 | if (value) { |
| 63 | return value.replace(/^0/g, ''); | 63 | return value.replace(/^0/g, ''); |
| 64 | } else { | 64 | } else { |
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | min: 0, | 76 | min: 0, |
| 77 | max: 100, | 77 | max: 100, |
| 78 | formatter: (e) => { | 78 | formatter: (e) => { |
| 79 | - const value = e.replace(/^0/g, ''); | 79 | + const value = e?.toString().replace(/^0/g, ''); |
| 80 | if (value) { | 80 | if (value) { |
| 81 | return value.replace(/^0/g, ''); | 81 | return value.replace(/^0/g, ''); |
| 82 | } else { | 82 | } else { |
| @@ -72,7 +72,7 @@ | @@ -72,7 +72,7 @@ | ||
| 72 | min: 0, | 72 | min: 0, |
| 73 | max: 100, | 73 | max: 100, |
| 74 | formatter: (e) => { | 74 | formatter: (e) => { |
| 75 | - const value = e.replace(/^0/g, ''); | 75 | + const value = e?.toString().replace(/^0/g, ''); |
| 76 | if (value) { | 76 | if (value) { |
| 77 | return value.replace(/^0/g, ''); | 77 | return value.replace(/^0/g, ''); |
| 78 | } else { | 78 | } else { |
| @@ -90,7 +90,7 @@ | @@ -90,7 +90,7 @@ | ||
| 90 | min: 0, | 90 | min: 0, |
| 91 | max: 100, | 91 | max: 100, |
| 92 | formatter: (e) => { | 92 | formatter: (e) => { |
| 93 | - const value = e.replace(/^0/g, ''); | 93 | + const value = e?.toString().replace(/^0/g, ''); |
| 94 | if (value) { | 94 | if (value) { |
| 95 | return value.replace(/^0/g, ''); | 95 | return value.replace(/^0/g, ''); |
| 96 | } else { | 96 | } else { |
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | min: 0, | 51 | min: 0, |
| 52 | max: 100, | 52 | max: 100, |
| 53 | formatter: (e) => { | 53 | formatter: (e) => { |
| 54 | - const value = e.replace(/^0/g, ''); | 54 | + const value = e?.toString().replace(/^0/g, ''); |
| 55 | if (value) { | 55 | if (value) { |
| 56 | return value.replace(/^0/g, ''); | 56 | return value.replace(/^0/g, ''); |
| 57 | } else { | 57 | } else { |
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | min: 0, | 69 | min: 0, |
| 70 | max: 100, | 70 | max: 100, |
| 71 | formatter: (e) => { | 71 | formatter: (e) => { |
| 72 | - const value = e.replace(/^0/g, ''); | 72 | + const value = e?.toString().replace(/^0/g, ''); |
| 73 | if (value) { | 73 | if (value) { |
| 74 | return value.replace(/^0/g, ''); | 74 | return value.replace(/^0/g, ''); |
| 75 | } else { | 75 | } else { |
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | min: 0, | 62 | min: 0, |
| 63 | max: 100, | 63 | max: 100, |
| 64 | formatter: (e) => { | 64 | formatter: (e) => { |
| 65 | - const value = e.replace(/^0/g, ''); | 65 | + const value = e?.toString().replace(/^0/g, ''); |
| 66 | if (value) { | 66 | if (value) { |
| 67 | return value.replace(/^0/g, ''); | 67 | return value.replace(/^0/g, ''); |
| 68 | } else { | 68 | } else { |
| @@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
| 80 | min: 0, | 80 | min: 0, |
| 81 | max: 100, | 81 | max: 100, |
| 82 | formatter: (e) => { | 82 | formatter: (e) => { |
| 83 | - const value = e.replace(/^0/g, ''); | 83 | + const value = e?.toString().replace(/^0/g, ''); |
| 84 | if (value) { | 84 | if (value) { |
| 85 | return value.replace(/^0/g, ''); | 85 | return value.replace(/^0/g, ''); |
| 86 | } else { | 86 | } else { |
| @@ -85,7 +85,7 @@ | @@ -85,7 +85,7 @@ | ||
| 85 | min: 0, | 85 | min: 0, |
| 86 | max: 100, | 86 | max: 100, |
| 87 | formatter: (e) => { | 87 | formatter: (e) => { |
| 88 | - const value = e.replace(/^0/g, ''); | 88 | + const value = e?.toString().replace(/^0/g, ''); |
| 89 | if (value) { | 89 | if (value) { |
| 90 | return value.replace(/^0/g, ''); | 90 | return value.replace(/^0/g, ''); |
| 91 | } else { | 91 | } else { |
| @@ -103,7 +103,7 @@ | @@ -103,7 +103,7 @@ | ||
| 103 | min: 0, | 103 | min: 0, |
| 104 | max: 100, | 104 | max: 100, |
| 105 | formatter: (e) => { | 105 | formatter: (e) => { |
| 106 | - const value = e.replace(/^0/g, ''); | 106 | + const value = e?.toString().replace(/^0/g, ''); |
| 107 | if (value) { | 107 | if (value) { |
| 108 | return value.replace(/^0/g, ''); | 108 | return value.replace(/^0/g, ''); |
| 109 | } else { | 109 | } else { |
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | min: 0, | 33 | min: 0, |
| 34 | max: 100, | 34 | max: 100, |
| 35 | formatter: (e) => { | 35 | formatter: (e) => { |
| 36 | - const value = e.replace(/^0/g, ''); | 36 | + const value = e?.toString().replace(/^0/g, ''); |
| 37 | if (value) { | 37 | if (value) { |
| 38 | return value.replace(/^0/g, ''); | 38 | return value.replace(/^0/g, ''); |
| 39 | } else { | 39 | } else { |
| @@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
| 55 | min: 0, | 55 | min: 0, |
| 56 | max: 100, | 56 | max: 100, |
| 57 | formatter: (e) => { | 57 | formatter: (e) => { |
| 58 | - const value = e.replace(/^0/g, ''); | 58 | + const value = e?.toString().replace(/^0/g, ''); |
| 59 | if (value) { | 59 | if (value) { |
| 60 | return value.replace(/^0/g, ''); | 60 | return value.replace(/^0/g, ''); |
| 61 | } else { | 61 | } else { |
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | min: 0, | 28 | min: 0, |
| 29 | max: 100, | 29 | max: 100, |
| 30 | formatter: (e) => { | 30 | formatter: (e) => { |
| 31 | - const value = e.replace(/^0/g, ''); | 31 | + const value = e?.toString().replace(/^0/g, ''); |
| 32 | if (value) { | 32 | if (value) { |
| 33 | return value.replace(/^0/g, ''); | 33 | return value.replace(/^0/g, ''); |
| 34 | } else { | 34 | } else { |
| @@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
| 45 | componentProps: { | 45 | componentProps: { |
| 46 | min: 0, | 46 | min: 0, |
| 47 | formatter: (e) => { | 47 | formatter: (e) => { |
| 48 | - const value = e.replace(/^0/g, ''); | 48 | + const value = e?.toString().replace(/^0/g, ''); |
| 49 | if (value) { | 49 | if (value) { |
| 50 | return value.replace(/^0/g, ''); | 50 | return value.replace(/^0/g, ''); |
| 51 | } else { | 51 | } else { |
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | min: 0, | 28 | min: 0, |
| 29 | max: 100, | 29 | max: 100, |
| 30 | formatter: (e) => { | 30 | formatter: (e) => { |
| 31 | - const value = e.replace(/^0/g, ''); | 31 | + const value = e?.toString().replace(/^0/g, ''); |
| 32 | if (value) { | 32 | if (value) { |
| 33 | return value.replace(/^0/g, ''); | 33 | return value.replace(/^0/g, ''); |
| 34 | } else { | 34 | } else { |
| @@ -46,7 +46,7 @@ | @@ -46,7 +46,7 @@ | ||
| 46 | min: 0, | 46 | min: 0, |
| 47 | max: 100, | 47 | max: 100, |
| 48 | formatter: (e) => { | 48 | formatter: (e) => { |
| 49 | - const value = e.replace(/^0/g, ''); | 49 | + const value = e?.toString().replace(/^0/g, ''); |
| 50 | if (value) { | 50 | if (value) { |
| 51 | return value.replace(/^0/g, ''); | 51 | return value.replace(/^0/g, ''); |
| 52 | } else { | 52 | } else { |
| @@ -33,7 +33,7 @@ | @@ -33,7 +33,7 @@ | ||
| 33 | min: 0, | 33 | min: 0, |
| 34 | max: 100, | 34 | max: 100, |
| 35 | formatter: (e) => { | 35 | formatter: (e) => { |
| 36 | - const value = e.replace(/^0/g, ''); | 36 | + const value = e?.toString().replace(/^0/g, ''); |
| 37 | if (value) { | 37 | if (value) { |
| 38 | return value.replace(/^0/g, ''); | 38 | return value.replace(/^0/g, ''); |
| 39 | } else { | 39 | } else { |
| @@ -51,7 +51,7 @@ | @@ -51,7 +51,7 @@ | ||
| 51 | min: 0, | 51 | min: 0, |
| 52 | max: 100, | 52 | max: 100, |
| 53 | formatter: (e) => { | 53 | formatter: (e) => { |
| 54 | - const value = e.replace(/^0/g, ''); | 54 | + const value = e?.toString().replace(/^0/g, ''); |
| 55 | if (value) { | 55 | if (value) { |
| 56 | return value.replace(/^0/g, ''); | 56 | return value.replace(/^0/g, ''); |
| 57 | } else { | 57 | } else { |
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | min: 0, | 32 | min: 0, |
| 33 | max: 100, | 33 | max: 100, |
| 34 | formatter: (e) => { | 34 | formatter: (e) => { |
| 35 | - const value = e.replace(/^0/g, ''); | 35 | + const value = e?.toString().replace(/^0/g, ''); |
| 36 | if (value) { | 36 | if (value) { |
| 37 | return value.replace(/^0/g, ''); | 37 | return value.replace(/^0/g, ''); |
| 38 | } else { | 38 | } else { |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | min: 0, | 50 | min: 0, |
| 51 | max: 100, | 51 | max: 100, |
| 52 | formatter: (e) => { | 52 | formatter: (e) => { |
| 53 | - const value = e.replace(/^0/g, ''); | 53 | + const value = e?.toString().replace(/^0/g, ''); |
| 54 | if (value) { | 54 | if (value) { |
| 55 | return value.replace(/^0/g, ''); | 55 | return value.replace(/^0/g, ''); |
| 56 | } else { | 56 | } else { |
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | min: 0, | 34 | min: 0, |
| 35 | max: 100, | 35 | max: 100, |
| 36 | formatter: (e) => { | 36 | formatter: (e) => { |
| 37 | - const value = e.replace(/^0/g, ''); | 37 | + const value = e?.toString().replace(/^0/g, ''); |
| 38 | if (value) { | 38 | if (value) { |
| 39 | return value.replace(/^0/g, ''); | 39 | return value.replace(/^0/g, ''); |
| 40 | } else { | 40 | } else { |
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | min: 0, | 52 | min: 0, |
| 53 | max: 100, | 53 | max: 100, |
| 54 | formatter: (e) => { | 54 | formatter: (e) => { |
| 55 | - const value = e.replace(/^0/g, ''); | 55 | + const value = e?.toString().replace(/^0/g, ''); |
| 56 | if (value) { | 56 | if (value) { |
| 57 | return value.replace(/^0/g, ''); | 57 | return value.replace(/^0/g, ''); |
| 58 | } else { | 58 | } else { |
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | componentProps: { | 32 | componentProps: { |
| 33 | min: 0, | 33 | min: 0, |
| 34 | formatter: (e) => { | 34 | formatter: (e) => { |
| 35 | - const value = e.replace(/^0/g, ''); | 35 | + const value = e?.toString().replace(/^0/g, ''); |
| 36 | if (value) { | 36 | if (value) { |
| 37 | return value.replace(/^0/g, ''); | 37 | return value.replace(/^0/g, ''); |
| 38 | } else { | 38 | } else { |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | min: 0, | 50 | min: 0, |
| 51 | max: 100, | 51 | max: 100, |
| 52 | formatter: (e) => { | 52 | formatter: (e) => { |
| 53 | - const value = e.replace(/^0/g, ''); | 53 | + const value = e?.toString().replace(/^0/g, ''); |
| 54 | if (value) { | 54 | if (value) { |
| 55 | return value.replace(/^0/g, ''); | 55 | return value.replace(/^0/g, ''); |
| 56 | } else { | 56 | } else { |