Commit 28db8b03cd5c9b34858b27ec4cab973334ce5d71
Merge branch 'ww' into 'main'
perf: data component visualization configuration setting default selected first item See merge request huang/yun-teng-iot-front!317
Showing
2 changed files
with
11 additions
and
4 deletions
@@ -110,6 +110,8 @@ | @@ -110,6 +110,8 @@ | ||
110 | 110 | ||
111 | watch(() => props.layout.componentType, updateChartType); | 111 | watch(() => props.layout.componentType, updateChartType); |
112 | 112 | ||
113 | + // watch(() => props.value.gradientInfo, updateChartType); | ||
114 | + | ||
113 | let timeout: Nullable<number> = null; | 115 | let timeout: Nullable<number> = null; |
114 | 116 | ||
115 | function handleRandomValue() { | 117 | function handleRandomValue() { |
@@ -139,7 +141,10 @@ | @@ -139,7 +141,10 @@ | ||
139 | <div class="flex flex-col w-full h-full min-w-3 min-h-3"> | 141 | <div class="flex flex-col w-full h-full min-w-3 min-h-3"> |
140 | <div :id="getControlsWidgetId()" class="widget-charts w-full h-full flex-auto"></div> | 142 | <div :id="getControlsWidgetId()" class="widget-charts w-full h-full flex-auto"></div> |
141 | <div> | 143 | <div> |
142 | - <div class="text-center" :style="{ fontSize: fontSize({ radio: getRadio, basic: 16 }) }"> | 144 | + <div |
145 | + class="text-center" | ||
146 | + :style="{ fontSize: fontSize({ radio: getRadio, basic: 16, max: 18 }), color: '#666' }" | ||
147 | + > | ||
143 | {{ props.value.name }} | 148 | {{ props.value.name }} |
144 | </div> | 149 | </div> |
145 | <Tooltip | 150 | <Tooltip |
@@ -12,6 +12,7 @@ | @@ -12,6 +12,7 @@ | ||
12 | import { decode } from '../../config/config'; | 12 | import { decode } from '../../config/config'; |
13 | import { ComponentInfo } from '/@/api/dataBoard/model'; | 13 | import { ComponentInfo } from '/@/api/dataBoard/model'; |
14 | import { useCalcGridLayout } from '../../hook/useCalcGridLayout'; | 14 | import { useCalcGridLayout } from '../../hook/useCalcGridLayout'; |
15 | + import { FrontComponent } from '../config/help'; | ||
15 | 16 | ||
16 | interface DataComponentRouteParams extends RouteParams { | 17 | interface DataComponentRouteParams extends RouteParams { |
17 | id: string; | 18 | id: string; |
@@ -31,7 +32,7 @@ | @@ -31,7 +32,7 @@ | ||
31 | return decode((ROUTE.params as DataComponentRouteParams).boardId as string); | 32 | return decode((ROUTE.params as DataComponentRouteParams).boardId as string); |
32 | }); | 33 | }); |
33 | 34 | ||
34 | - const frontId = ref(''); | 35 | + const frontId = ref(FrontComponent.TEXT_COMPONENT_1); |
35 | 36 | ||
36 | const isEdit = ref(false); | 37 | const isEdit = ref(false); |
37 | 38 | ||
@@ -42,7 +43,8 @@ | @@ -42,7 +43,8 @@ | ||
42 | const [register, { closeModal, changeOkLoading }] = useModalInner( | 43 | const [register, { closeModal, changeOkLoading }] = useModalInner( |
43 | (data: { isEdit: boolean; record?: DataBoardLayoutInfo }) => { | 44 | (data: { isEdit: boolean; record?: DataBoardLayoutInfo }) => { |
44 | componentRecord.value = data.record || ({} as unknown as DataBoardLayoutInfo); | 45 | componentRecord.value = data.record || ({} as unknown as DataBoardLayoutInfo); |
45 | - frontId.value = data.record?.record?.frontId || ''; | 46 | + frontId.value = |
47 | + (data.record?.record?.frontId as FrontComponent) || FrontComponent.TEXT_COMPONENT_1; | ||
46 | isEdit.value = data.isEdit || false; | 48 | isEdit.value = data.isEdit || false; |
47 | } | 49 | } |
48 | ); | 50 | ); |
@@ -54,7 +56,7 @@ | @@ -54,7 +56,7 @@ | ||
54 | 56 | ||
55 | const resetForm = () => { | 57 | const resetForm = () => { |
56 | isEdit.value = false; | 58 | isEdit.value = false; |
57 | - frontId.value = ''; | 59 | + frontId.value = FrontComponent.TEXT_COMPONENT_1; |
58 | componentRecord.value = {} as unknown as DataBoardLayoutInfo; | 60 | componentRecord.value = {} as unknown as DataBoardLayoutInfo; |
59 | componentDefaultConfig.value = {}; | 61 | componentDefaultConfig.value = {}; |
60 | }; | 62 | }; |