Commit 62064562a056aa1634416f4fe7189392be3bb2f7

Authored by fengwotao
1 parent d3e66a31

perf(external/Composes): 修复组合下的所有没有自适应拉长问题

... ... @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
2 2 import { CreateComponentType } from '@/packages/index.d'
3 3 import { LeftCenterRightHeadConfig } from './index'
4 4 import cloneDeep from 'lodash/cloneDeep'
  5 +import { chartInitConfig } from '@/settings/designSetting'
5 6
6 7 export const option = {
7 8 dataset: '物联网平台数据统计',
... ... @@ -20,6 +21,7 @@ export const option = {
20 21
21 22 export default class Config extends PublicConfigClass implements CreateComponentType {
22 23 public key = LeftCenterRightHeadConfig.key
  24 + public attr = { ...chartInitConfig, zIndex: 1, w: 1920, h: 100 }
23 25 public chartConfig = cloneDeep(LeftCenterRightHeadConfig)
24 26 public option = cloneDeep(option)
25 27 }
... ...
... ... @@ -65,11 +65,8 @@ let nowData = ref('08:00:00')
65 65 let newData = ref('2021-2-3 08:00:00')
66 66
67 67 let timer: any = null
68   -const { w, h } = toRefs(props.chartConfig.attr)
69 68
70   -//修改默认宽高
71   -props.chartConfig.attr.w = 1920
72   -props.chartConfig.attr.h = 100
  69 +const { w, h } = toRefs(props.chartConfig.attr)
73 70
74 71 watch(
75 72 () => props.chartConfig.option,
... ...
... ... @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
2 2 import { CreateComponentType } from '@/packages/index.d'
3 3 import { LeftCenterRightHeadAnimatConfig } from './index'
4 4 import cloneDeep from 'lodash/cloneDeep'
  5 +import { chartInitConfig } from '@/settings/designSetting'
5 6
6 7 export const option = {
7 8 dataset: '我是标题',
... ... @@ -26,6 +27,7 @@ export const option = {
26 27
27 28 export default class Config extends PublicConfigClass implements CreateComponentType {
28 29 public key = LeftCenterRightHeadAnimatConfig.key
  30 + public attr = { ...chartInitConfig, zIndex: 1, w: 1920, h: 130 }
29 31 public chartConfig = cloneDeep(LeftCenterRightHeadAnimatConfig)
30 32 public option = cloneDeep(option)
31 33 }
... ...
... ... @@ -64,10 +64,6 @@ const props = defineProps({
64 64 }
65 65 })
66 66
67   -//修改默认宽高
68   -props.chartConfig.attr.w=1920
69   -props.chartConfig.attr.h=130
70   -
71 67 const { w, h } = toRefs(props.chartConfig.attr)
72 68
73 69 const { animat, dataset } = toRefs(props.chartConfig.option)
... ...
... ... @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
2 2 import { CreateComponentType } from '@/packages/index.d'
3 3 import { Title1Config } from './index'
4 4 import cloneDeep from 'lodash/cloneDeep'
  5 +import { chartInitConfig } from '@/settings/designSetting'
5 6
6 7 export const option = {
7 8 dataset: '我是标题',
... ... @@ -18,6 +19,7 @@ export const option = {
18 19
19 20 export default class Config extends PublicConfigClass implements CreateComponentType {
20 21 public key = Title1Config.key
  22 + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 }
21 23 public chartConfig = cloneDeep(Title1Config)
22 24 public option = cloneDeep(option)
23 25 }
... ...
... ... @@ -108,11 +108,6 @@ const props = defineProps({
108 108 }
109 109 })
110 110
111   -//修改默认宽高
112   -props.chartConfig.attr.w=550
113   -props.chartConfig.attr.h=60
114   -
115   -
116 111 const { dataset, attribute } = toRefs(props.chartConfig.option)
117 112
118 113 const { w, h } = toRefs(props.chartConfig.attr)
... ...
... ... @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
2 2 import { CreateComponentType } from '@/packages/index.d'
3 3 import { Title2Config } from './index'
4 4 import cloneDeep from 'lodash/cloneDeep'
  5 +import { chartInitConfig } from '@/settings/designSetting'
5 6
6 7 export const option = {
7 8 dataset: '我是标题',
... ... @@ -18,6 +19,7 @@ export const option = {
18 19
19 20 export default class Config extends PublicConfigClass implements CreateComponentType {
20 21 public key = Title2Config.key
  22 + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 }
21 23 public chartConfig = cloneDeep(Title2Config)
22 24 public option = cloneDeep(option)
23 25 }
... ...
... ... @@ -76,9 +76,7 @@ const props = defineProps({
76 76 })
77 77
78 78 const { dataset, attribute } = toRefs(props.chartConfig.option)
79   -//修改默认宽高
80   -props.chartConfig.attr.w=550
81   -props.chartConfig.attr.h=60
  79 +
82 80 const { w, h } = toRefs(props.chartConfig.attr)
83 81 </script>
84 82
... ...
... ... @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public'
2 2 import { CreateComponentType } from '@/packages/index.d'
3 3 import { Title3Config } from './index'
4 4 import cloneDeep from 'lodash/cloneDeep'
  5 +import { chartInitConfig } from '@/settings/designSetting'
5 6
6 7 export const option = {
7 8 dataset: '我是标题',
... ... @@ -31,6 +32,7 @@ export const option = {
31 32
32 33 export default class Config extends PublicConfigClass implements CreateComponentType {
33 34 public key = Title3Config.key
  35 + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 }
34 36 public chartConfig = cloneDeep(Title3Config)
35 37 public option = cloneDeep(option)
36 38 }
... ...
... ... @@ -117,9 +117,6 @@ const { dataset, attribute } = toRefs(props.chartConfig.option)
117 117
118 118 const { w, h } = toRefs(props.chartConfig.attr)
119 119
120   -//修改默认宽高
121   -props.chartConfig.attr.w=550
122   -props.chartConfig.attr.h=60
123 120 </script>
124 121
125 122 <style lang="scss" scoped>
... ...