Commit 1da5a8e64b042e73bfab7b2cf852e115070a98d9

Authored by fengwotao
2 parents e7f13c7c 02b6e9cc

Merge branch 'main_dev' into ft

... ... @@ -104,7 +104,7 @@
104 104 </svg>
105 105
106 106 <div
107   - class="absolute w-full h-full top-0 left-0 text-center text-lg flex items-center justify-center flex-col"
  107 + class="absolute w-full h-full top-0 left-0 text-center text-lg flex items-center justify-center"
108 108 :style="{ color: getDesign.fontColor }"
109 109 >
110 110 <div>{{ currentValue }}</div>
... ...
... ... @@ -97,7 +97,7 @@
97 97 />
98 98 </svg>
99 99 <div
100   - class="absolute w-full h-full top-0 left-0 text-center text-lg flex items-center justify-center flex-col"
  100 + class="absolute w-full h-full top-0 left-0 text-center text-lg flex items-center justify-center"
101 101 :style="{ color: getDesign.fontColor }"
102 102 >
103 103 <div>{{ currentValue }}</div>
... ...
... ... @@ -30,6 +30,16 @@
30 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 43 const updateFn: DataFetchUpdateFn = (message, attribute) => {
34 44 const { data = {} } = message;
35 45 const [latest] = data[attribute] || [];
... ... @@ -226,12 +236,15 @@
226 236 </g>
227 237 </g>
228 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 244 <span>{{ currentValue }}</span>
232 245 <span>{{ '℃' }}</span>
233 246 </div>
234   - </div> -->
  247 + </div>
235 248 </main>
236 249 </template>
237 250
... ...