Commit ccda0ebf787eb4dc01d5a1fa48fe08cc014c944c

Authored by fengtao
1 parent e66bae5f

perf(src/views): 优化装饰27到30,去除自带的透明度

... ... @@ -22,7 +22,7 @@
22 22 ></rect>
23 23 </g>
24 24 </g>
25   - <rect x="9" y="1" width="402" height="134" fill="#022C5B" fill-opacity="0.6"></rect>
  25 + <rect x="9" y="1" width="402" height="134" fill="#022C5B"></rect>
26 26 <g filter="url(#filter_d39fec7c-b2c4-483b-a0f9-e184380ce12e)">
27 27 <rect x="9" y="1" width="402" height="134" stroke="rgba(11, 97, 184, 1)" stroke-width="2"></rect>
28 28 </g>
... ... @@ -167,6 +167,7 @@ import { CreateComponentType } from '@/packages/index.d'
167 167 import { option } from './config'
168 168 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
169 169 import { useChartDataFetch } from '@/hooks'
  170 +import { isObject } from '@/utils/external/is'
170 171
171 172 const props = defineProps({
172 173 chartConfig: {
... ... @@ -181,6 +182,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
181 182
182 183 // 预览更新
183 184 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  185 + if (isObject(newData)) return
184 186 dataset.value = newData as string
185 187 })
186 188 </script>
... ...
... ... @@ -8,7 +8,7 @@
8 8 viewBox="0 0 428.1663818359375 121.5"
9 9 fill="none"
10 10 >
11   - <g opacity="0.3">
  11 + <g>
12 12 <g filter="url(#filter_98d03be6-b8cb-4e27-b332-bc2820d07903)">
13 13 <path
14 14 d="M409.722 14.36C409.342 13.82 408.732 13.5 408.072 13.5L44.8918 13.5C44.1218 13.5 43.4118 13.94 43.0818 14.64L12.9417 78.35C12.6517 78.95 12.6917 79.66 13.0317 80.23L35.8918 118.53C36.2518 119.13 36.9118 119.5 37.6118 119.5L385.422 119.5C386.182 119.5 386.882 119.06 387.212 118.38L425.962 39.67C426.282 39.02 426.222 38.25 425.812 37.65L409.722 14.36Z"
... ... @@ -318,6 +318,7 @@ import { CreateComponentType } from '@/packages/index.d'
318 318 import { option } from './config'
319 319 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
320 320 import { useChartDataFetch } from '@/hooks'
  321 +import { isObject } from '@/utils/external/is'
321 322
322 323 const props = defineProps({
323 324 chartConfig: {
... ... @@ -332,6 +333,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
332 333
333 334 // 预览更新
334 335 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  336 + if (isObject(newData)) return
335 337 dataset.value = newData as string
336 338 })
337 339 </script>
... ...
... ... @@ -18,7 +18,7 @@
18 18 ></path>
19 19 <rect x="109" y="163" width="516" height="2" fill="url(#linear_fill_5bbe4e01-073b-4a63-b060-4cb8ef016116)"></rect>
20 20 <rect x="109" y="23" width="516" height="2" fill="url(#linear_fill_009e1028-4c17-4ca5-9439-a3ea85c86a5e)"></rect>
21   - <g opacity="0.3">
  21 + <g>
22 22 <path
23 23 fill="#063475"
24 24 fill-opacity="0.6"
... ... @@ -302,6 +302,7 @@ import { CreateComponentType } from '@/packages/index.d'
302 302 import { option } from './config'
303 303 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
304 304 import { useChartDataFetch } from '@/hooks'
  305 +import { isObject } from '@/utils/external/is'
305 306
306 307 const props = defineProps({
307 308 chartConfig: {
... ... @@ -316,6 +317,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
316 317
317 318 // 预览更新
318 319 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  320 + if (isObject(newData)) return
319 321 dataset.value = newData as string
320 322 })
321 323 </script>
... ...
... ... @@ -8,7 +8,7 @@
8 8 viewBox="0 0 442 141"
9 9 fill="none"
10 10 >
11   - <g opacity="0.5">
  11 + <g>
12 12 <g filter="url(#filter_95b2f60e-40ab-42fb-81a1-c50e11e63c01)">
13 13 <rect x="11" y="19" width="429" height="120" fill="#012651" fill-opacity="0.5"></rect>
14 14 <path
... ... @@ -273,6 +273,7 @@ import { CreateComponentType } from '@/packages/index.d'
273 273 import { option } from './config'
274 274 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
275 275 import { useChartDataFetch } from '@/hooks'
  276 +import { isObject } from '@/utils/external/is'
276 277
277 278 const props = defineProps({
278 279 chartConfig: {
... ... @@ -287,6 +288,7 @@ const { dataset, fontConfig, unitStr, titleStr } = toRefs(props.chartConfig.opti
287 288
288 289 // 预览更新
289 290 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  291 + if (isObject(newData)) return
290 292 dataset.value = newData as string
291 293 })
292 294 </script>
... ...