Commit 62064562a056aa1634416f4fe7189392be3bb2f7
1 parent
d3e66a31
perf(external/Composes): 修复组合下的所有没有自适应拉长问题
Showing
10 changed files
with
12 additions
and
19 deletions
@@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | ||
2 | import { CreateComponentType } from '@/packages/index.d' | 2 | import { CreateComponentType } from '@/packages/index.d' |
3 | import { LeftCenterRightHeadConfig } from './index' | 3 | import { LeftCenterRightHeadConfig } from './index' |
4 | import cloneDeep from 'lodash/cloneDeep' | 4 | import cloneDeep from 'lodash/cloneDeep' |
5 | +import { chartInitConfig } from '@/settings/designSetting' | ||
5 | 6 | ||
6 | export const option = { | 7 | export const option = { |
7 | dataset: '物联网平台数据统计', | 8 | dataset: '物联网平台数据统计', |
@@ -20,6 +21,7 @@ export const option = { | @@ -20,6 +21,7 @@ export const option = { | ||
20 | 21 | ||
21 | export default class Config extends PublicConfigClass implements CreateComponentType { | 22 | export default class Config extends PublicConfigClass implements CreateComponentType { |
22 | public key = LeftCenterRightHeadConfig.key | 23 | public key = LeftCenterRightHeadConfig.key |
24 | + public attr = { ...chartInitConfig, zIndex: 1, w: 1920, h: 100 } | ||
23 | public chartConfig = cloneDeep(LeftCenterRightHeadConfig) | 25 | public chartConfig = cloneDeep(LeftCenterRightHeadConfig) |
24 | public option = cloneDeep(option) | 26 | public option = cloneDeep(option) |
25 | } | 27 | } |
@@ -65,11 +65,8 @@ let nowData = ref('08:00:00') | @@ -65,11 +65,8 @@ let nowData = ref('08:00:00') | ||
65 | let newData = ref('2021-2-3 08:00:00') | 65 | let newData = ref('2021-2-3 08:00:00') |
66 | 66 | ||
67 | let timer: any = null | 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 | watch( | 71 | watch( |
75 | () => props.chartConfig.option, | 72 | () => props.chartConfig.option, |
@@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | ||
2 | import { CreateComponentType } from '@/packages/index.d' | 2 | import { CreateComponentType } from '@/packages/index.d' |
3 | import { LeftCenterRightHeadAnimatConfig } from './index' | 3 | import { LeftCenterRightHeadAnimatConfig } from './index' |
4 | import cloneDeep from 'lodash/cloneDeep' | 4 | import cloneDeep from 'lodash/cloneDeep' |
5 | +import { chartInitConfig } from '@/settings/designSetting' | ||
5 | 6 | ||
6 | export const option = { | 7 | export const option = { |
7 | dataset: '我是标题', | 8 | dataset: '我是标题', |
@@ -26,6 +27,7 @@ export const option = { | @@ -26,6 +27,7 @@ export const option = { | ||
26 | 27 | ||
27 | export default class Config extends PublicConfigClass implements CreateComponentType { | 28 | export default class Config extends PublicConfigClass implements CreateComponentType { |
28 | public key = LeftCenterRightHeadAnimatConfig.key | 29 | public key = LeftCenterRightHeadAnimatConfig.key |
30 | + public attr = { ...chartInitConfig, zIndex: 1, w: 1920, h: 130 } | ||
29 | public chartConfig = cloneDeep(LeftCenterRightHeadAnimatConfig) | 31 | public chartConfig = cloneDeep(LeftCenterRightHeadAnimatConfig) |
30 | public option = cloneDeep(option) | 32 | public option = cloneDeep(option) |
31 | } | 33 | } |
@@ -64,10 +64,6 @@ const props = defineProps({ | @@ -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 | const { w, h } = toRefs(props.chartConfig.attr) | 67 | const { w, h } = toRefs(props.chartConfig.attr) |
72 | 68 | ||
73 | const { animat, dataset } = toRefs(props.chartConfig.option) | 69 | const { animat, dataset } = toRefs(props.chartConfig.option) |
@@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | ||
2 | import { CreateComponentType } from '@/packages/index.d' | 2 | import { CreateComponentType } from '@/packages/index.d' |
3 | import { Title1Config } from './index' | 3 | import { Title1Config } from './index' |
4 | import cloneDeep from 'lodash/cloneDeep' | 4 | import cloneDeep from 'lodash/cloneDeep' |
5 | +import { chartInitConfig } from '@/settings/designSetting' | ||
5 | 6 | ||
6 | export const option = { | 7 | export const option = { |
7 | dataset: '我是标题', | 8 | dataset: '我是标题', |
@@ -18,6 +19,7 @@ export const option = { | @@ -18,6 +19,7 @@ export const option = { | ||
18 | 19 | ||
19 | export default class Config extends PublicConfigClass implements CreateComponentType { | 20 | export default class Config extends PublicConfigClass implements CreateComponentType { |
20 | public key = Title1Config.key | 21 | public key = Title1Config.key |
22 | + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 } | ||
21 | public chartConfig = cloneDeep(Title1Config) | 23 | public chartConfig = cloneDeep(Title1Config) |
22 | public option = cloneDeep(option) | 24 | public option = cloneDeep(option) |
23 | } | 25 | } |
@@ -108,11 +108,6 @@ const props = defineProps({ | @@ -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 | const { dataset, attribute } = toRefs(props.chartConfig.option) | 111 | const { dataset, attribute } = toRefs(props.chartConfig.option) |
117 | 112 | ||
118 | const { w, h } = toRefs(props.chartConfig.attr) | 113 | const { w, h } = toRefs(props.chartConfig.attr) |
@@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | ||
2 | import { CreateComponentType } from '@/packages/index.d' | 2 | import { CreateComponentType } from '@/packages/index.d' |
3 | import { Title2Config } from './index' | 3 | import { Title2Config } from './index' |
4 | import cloneDeep from 'lodash/cloneDeep' | 4 | import cloneDeep from 'lodash/cloneDeep' |
5 | +import { chartInitConfig } from '@/settings/designSetting' | ||
5 | 6 | ||
6 | export const option = { | 7 | export const option = { |
7 | dataset: '我是标题', | 8 | dataset: '我是标题', |
@@ -18,6 +19,7 @@ export const option = { | @@ -18,6 +19,7 @@ export const option = { | ||
18 | 19 | ||
19 | export default class Config extends PublicConfigClass implements CreateComponentType { | 20 | export default class Config extends PublicConfigClass implements CreateComponentType { |
20 | public key = Title2Config.key | 21 | public key = Title2Config.key |
22 | + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 } | ||
21 | public chartConfig = cloneDeep(Title2Config) | 23 | public chartConfig = cloneDeep(Title2Config) |
22 | public option = cloneDeep(option) | 24 | public option = cloneDeep(option) |
23 | } | 25 | } |
@@ -76,9 +76,7 @@ const props = defineProps({ | @@ -76,9 +76,7 @@ const props = defineProps({ | ||
76 | }) | 76 | }) |
77 | 77 | ||
78 | const { dataset, attribute } = toRefs(props.chartConfig.option) | 78 | const { dataset, attribute } = toRefs(props.chartConfig.option) |
79 | -//修改默认宽高 | ||
80 | -props.chartConfig.attr.w=550 | ||
81 | -props.chartConfig.attr.h=60 | 79 | + |
82 | const { w, h } = toRefs(props.chartConfig.attr) | 80 | const { w, h } = toRefs(props.chartConfig.attr) |
83 | </script> | 81 | </script> |
84 | 82 |
@@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | @@ -2,6 +2,7 @@ import { PublicConfigClass } from '@/packages/public' | ||
2 | import { CreateComponentType } from '@/packages/index.d' | 2 | import { CreateComponentType } from '@/packages/index.d' |
3 | import { Title3Config } from './index' | 3 | import { Title3Config } from './index' |
4 | import cloneDeep from 'lodash/cloneDeep' | 4 | import cloneDeep from 'lodash/cloneDeep' |
5 | +import { chartInitConfig } from '@/settings/designSetting' | ||
5 | 6 | ||
6 | export const option = { | 7 | export const option = { |
7 | dataset: '我是标题', | 8 | dataset: '我是标题', |
@@ -31,6 +32,7 @@ export const option = { | @@ -31,6 +32,7 @@ export const option = { | ||
31 | 32 | ||
32 | export default class Config extends PublicConfigClass implements CreateComponentType { | 33 | export default class Config extends PublicConfigClass implements CreateComponentType { |
33 | public key = Title3Config.key | 34 | public key = Title3Config.key |
35 | + public attr = { ...chartInitConfig, zIndex: 1, w: 550, h: 60 } | ||
34 | public chartConfig = cloneDeep(Title3Config) | 36 | public chartConfig = cloneDeep(Title3Config) |
35 | public option = cloneDeep(option) | 37 | public option = cloneDeep(option) |
36 | } | 38 | } |
@@ -117,9 +117,6 @@ const { dataset, attribute } = toRefs(props.chartConfig.option) | @@ -117,9 +117,6 @@ const { dataset, attribute } = toRefs(props.chartConfig.option) | ||
117 | 117 | ||
118 | const { w, h } = toRefs(props.chartConfig.attr) | 118 | const { w, h } = toRefs(props.chartConfig.attr) |
119 | 119 | ||
120 | -//修改默认宽高 | ||
121 | -props.chartConfig.attr.w=550 | ||
122 | -props.chartConfig.attr.h=60 | ||
123 | </script> | 120 | </script> |
124 | 121 | ||
125 | <style lang="scss" scoped> | 122 | <style lang="scss" scoped> |