|
@@ -30,6 +30,16 @@ |
|
@@ -30,6 +30,16 @@ |
30
|
: transformValue;
|
30
|
: transformValue;
|
31
|
});
|
31
|
});
|
32
|
|
32
|
|
|
|
33
|
+ const getDesign = computed(() => {
|
|
|
34
|
+ const { persetOption, option } = props.config;
|
|
|
35
|
+ const { fontColor: presetFontColor } = persetOption || {};
|
|
|
36
|
+ const { componentInfo } = option || {};
|
|
|
37
|
+ const { fontColor } = componentInfo || {};
|
|
|
38
|
+ return {
|
|
|
39
|
+ fontColor: fontColor ?? presetFontColor,
|
|
|
40
|
+ };
|
|
|
41
|
+ });
|
|
|
42
|
+
|
33
|
const updateFn: DataFetchUpdateFn = (message, attribute) => {
|
43
|
const updateFn: DataFetchUpdateFn = (message, attribute) => {
|
34
|
const { data = {} } = message;
|
44
|
const { data = {} } = message;
|
35
|
const [latest] = data[attribute] || [];
|
45
|
const [latest] = data[attribute] || [];
|
|
@@ -226,12 +236,15 @@ |
|
@@ -226,12 +236,15 @@ |
226
|
</g>
|
236
|
</g>
|
227
|
</g>
|
237
|
</g>
|
228
|
</svg>
|
238
|
</svg>
|
229
|
- <!-- <div class="absolute w-full h-full flex justify-center items-center bg-transparent">
|
|
|
230
|
- <div class="transform translate-x-full text-lg text-gray-500">
|
239
|
+ <div class="absolute w-full h-full flex justify-center items-center bg-transparent">
|
|
|
240
|
+ <div
|
|
|
241
|
+ class="transform translate-x-full text-lg text-gray-500"
|
|
|
242
|
+ :style="{ color: getDesign.fontColor }"
|
|
|
243
|
+ >
|
231
|
<span>{{ currentValue }}</span>
|
244
|
<span>{{ currentValue }}</span>
|
232
|
<span>{{ '℃' }}</span>
|
245
|
<span>{{ '℃' }}</span>
|
233
|
</div>
|
246
|
</div>
|
234
|
- </div> -->
|
247
|
+ </div>
|
235
|
</main>
|
248
|
</main>
|
236
|
</template>
|
249
|
</template>
|
237
|
|
250
|
|