Commit ccda0ebf787eb4dc01d5a1fa48fe08cc014c944c

Authored by fengtao
1 parent e66bae5f

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

@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 ></rect> 22 ></rect>
23 </g> 23 </g>
24 </g> 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 <g filter="url(#filter_d39fec7c-b2c4-483b-a0f9-e184380ce12e)"> 26 <g filter="url(#filter_d39fec7c-b2c4-483b-a0f9-e184380ce12e)">
27 <rect x="9" y="1" width="402" height="134" stroke="rgba(11, 97, 184, 1)" stroke-width="2"></rect> 27 <rect x="9" y="1" width="402" height="134" stroke="rgba(11, 97, 184, 1)" stroke-width="2"></rect>
28 </g> 28 </g>
@@ -167,6 +167,7 @@ import { CreateComponentType } from '@/packages/index.d' @@ -167,6 +167,7 @@ import { CreateComponentType } from '@/packages/index.d'
167 import { option } from './config' 167 import { option } from './config'
168 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' 168 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
169 import { useChartDataFetch } from '@/hooks' 169 import { useChartDataFetch } from '@/hooks'
  170 +import { isObject } from '@/utils/external/is'
170 171
171 const props = defineProps({ 172 const props = defineProps({
172 chartConfig: { 173 chartConfig: {
@@ -181,6 +182,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option @@ -181,6 +182,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
181 182
182 // 预览更新 183 // 预览更新
183 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => { 184 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  185 + if (isObject(newData)) return
184 dataset.value = newData as string 186 dataset.value = newData as string
185 }) 187 })
186 </script> 188 </script>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 viewBox="0 0 428.1663818359375 121.5" 8 viewBox="0 0 428.1663818359375 121.5"
9 fill="none" 9 fill="none"
10 > 10 >
11 - <g opacity="0.3"> 11 + <g>
12 <g filter="url(#filter_98d03be6-b8cb-4e27-b332-bc2820d07903)"> 12 <g filter="url(#filter_98d03be6-b8cb-4e27-b332-bc2820d07903)">
13 <path 13 <path
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" 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,6 +318,7 @@ import { CreateComponentType } from '@/packages/index.d'
318 import { option } from './config' 318 import { option } from './config'
319 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' 319 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
320 import { useChartDataFetch } from '@/hooks' 320 import { useChartDataFetch } from '@/hooks'
  321 +import { isObject } from '@/utils/external/is'
321 322
322 const props = defineProps({ 323 const props = defineProps({
323 chartConfig: { 324 chartConfig: {
@@ -332,6 +333,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option @@ -332,6 +333,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
332 333
333 // 预览更新 334 // 预览更新
334 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => { 335 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  336 + if (isObject(newData)) return
335 dataset.value = newData as string 337 dataset.value = newData as string
336 }) 338 })
337 </script> 339 </script>
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 ></path> 18 ></path>
19 <rect x="109" y="163" width="516" height="2" fill="url(#linear_fill_5bbe4e01-073b-4a63-b060-4cb8ef016116)"></rect> 19 <rect x="109" y="163" width="516" height="2" fill="url(#linear_fill_5bbe4e01-073b-4a63-b060-4cb8ef016116)"></rect>
20 <rect x="109" y="23" width="516" height="2" fill="url(#linear_fill_009e1028-4c17-4ca5-9439-a3ea85c86a5e)"></rect> 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 <path 22 <path
23 fill="#063475" 23 fill="#063475"
24 fill-opacity="0.6" 24 fill-opacity="0.6"
@@ -302,6 +302,7 @@ import { CreateComponentType } from '@/packages/index.d' @@ -302,6 +302,7 @@ import { CreateComponentType } from '@/packages/index.d'
302 import { option } from './config' 302 import { option } from './config'
303 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' 303 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
304 import { useChartDataFetch } from '@/hooks' 304 import { useChartDataFetch } from '@/hooks'
  305 +import { isObject } from '@/utils/external/is'
305 306
306 const props = defineProps({ 307 const props = defineProps({
307 chartConfig: { 308 chartConfig: {
@@ -316,6 +317,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option @@ -316,6 +317,7 @@ const { dataset, fontConfig } = toRefs(props.chartConfig.option as typeof option
316 317
317 // 预览更新 318 // 预览更新
318 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => { 319 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  320 + if (isObject(newData)) return
319 dataset.value = newData as string 321 dataset.value = newData as string
320 }) 322 })
321 </script> 323 </script>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 viewBox="0 0 442 141" 8 viewBox="0 0 442 141"
9 fill="none" 9 fill="none"
10 > 10 >
11 - <g opacity="0.5"> 11 + <g>
12 <g filter="url(#filter_95b2f60e-40ab-42fb-81a1-c50e11e63c01)"> 12 <g filter="url(#filter_95b2f60e-40ab-42fb-81a1-c50e11e63c01)">
13 <rect x="11" y="19" width="429" height="120" fill="#012651" fill-opacity="0.5"></rect> 13 <rect x="11" y="19" width="429" height="120" fill="#012651" fill-opacity="0.5"></rect>
14 <path 14 <path
@@ -273,6 +273,7 @@ import { CreateComponentType } from '@/packages/index.d' @@ -273,6 +273,7 @@ import { CreateComponentType } from '@/packages/index.d'
273 import { option } from './config' 273 import { option } from './config'
274 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' 274 import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
275 import { useChartDataFetch } from '@/hooks' 275 import { useChartDataFetch } from '@/hooks'
  276 +import { isObject } from '@/utils/external/is'
276 277
277 const props = defineProps({ 278 const props = defineProps({
278 chartConfig: { 279 chartConfig: {
@@ -287,6 +288,7 @@ const { dataset, fontConfig, unitStr, titleStr } = toRefs(props.chartConfig.opti @@ -287,6 +288,7 @@ const { dataset, fontConfig, unitStr, titleStr } = toRefs(props.chartConfig.opti
287 288
288 // 预览更新 289 // 预览更新
289 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => { 290 useChartDataFetch(props.chartConfig, useChartEditStore, (newData: string) => {
  291 + if (isObject(newData)) return
290 dataset.value = newData as string 292 dataset.value = newData as string
291 }) 293 })
292 </script> 294 </script>