fix: 修改类型报错的问题
This commit is contained in:
parent
edfdcee3a4
commit
8e9905816e
@ -246,7 +246,7 @@ import {
|
|||||||
} from '@/components/ChartItemSetting/index'
|
} from '@/components/ChartItemSetting/index'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
optiondata: {
|
||||||
type: Object as PropType<GlobalThemeJsonType>,
|
type: Object as PropType<GlobalThemeJsonType>,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
@ -258,19 +258,19 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const title = computed(() => {
|
const title = computed(() => {
|
||||||
return props.data.title
|
return props.optiondata.title
|
||||||
})
|
})
|
||||||
|
|
||||||
const xAxis = computed(() => {
|
const xAxis = computed(() => {
|
||||||
return props.data.xAxis
|
return props.optiondata.xAxis
|
||||||
})
|
})
|
||||||
|
|
||||||
const yAxis = computed(() => {
|
const yAxis = computed(() => {
|
||||||
return props.data.yAxis
|
return props.optiondata.yAxis
|
||||||
})
|
})
|
||||||
|
|
||||||
const legend = computed(() => {
|
const legend = computed(() => {
|
||||||
return props.data.legend
|
return props.optiondata.legend
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
3
src/packages/index.d.ts
vendored
3
src/packages/index.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
import { Component } from '@/router/types'
|
import { Component } from '@/router/types'
|
||||||
|
import { GlobalThemeJsonType } from '@/settings/chartThemes/index'
|
||||||
|
|
||||||
// 组件配置
|
// 组件配置
|
||||||
export type ConfigType = {
|
export type ConfigType = {
|
||||||
@ -21,7 +22,7 @@ export interface PublicConfigType {
|
|||||||
export interface CreateComponentType extends PublicConfigType {
|
export interface CreateComponentType extends PublicConfigType {
|
||||||
key: string
|
key: string
|
||||||
chartConfig: Omit<ConfigType, 'node'>
|
chartConfig: Omit<ConfigType, 'node'>
|
||||||
option: object
|
option: GlobalThemeJsonType
|
||||||
}
|
}
|
||||||
|
|
||||||
// 包分类枚举
|
// 包分类枚举
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"title": {
|
"title": {
|
||||||
|
"show": true,
|
||||||
"textStyle": {
|
"textStyle": {
|
||||||
"color": "#BFBFBF",
|
"color": "#BFBFBF",
|
||||||
"fontSize": 18
|
"fontSize": 18
|
||||||
@ -10,10 +11,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xAxis": {
|
"xAxis": {
|
||||||
|
"show": true,
|
||||||
"nameTextStyle": {
|
"nameTextStyle": {
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
"axisLabel": {
|
"axisLabel": {
|
||||||
|
"show": true,
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
"position": "bottom",
|
"position": "bottom",
|
||||||
@ -25,9 +28,11 @@
|
|||||||
"onZero": true
|
"onZero": true
|
||||||
},
|
},
|
||||||
"axisTick": {
|
"axisTick": {
|
||||||
|
"show": true,
|
||||||
"length": 5
|
"length": 5
|
||||||
},
|
},
|
||||||
"splitLine": {
|
"splitLine": {
|
||||||
|
"show": true,
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#484753",
|
"color": "#484753",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
@ -36,14 +41,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yAxis": {
|
"yAxis": {
|
||||||
|
"show": true,
|
||||||
"nameTextStyle": {
|
"nameTextStyle": {
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
"axisLabel": {
|
"axisLabel": {
|
||||||
|
"show": true,
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
"position": "left",
|
"position": "left",
|
||||||
"axisLine": {
|
"axisLine": {
|
||||||
|
"show": true,
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#B9B8CE",
|
"color": "#B9B8CE",
|
||||||
"width": 1
|
"width": 1
|
||||||
@ -51,9 +59,11 @@
|
|||||||
"onZero": true
|
"onZero": true
|
||||||
},
|
},
|
||||||
"axisTick": {
|
"axisTick": {
|
||||||
|
"show": true,
|
||||||
"length": 5
|
"length": 5
|
||||||
},
|
},
|
||||||
"splitLine": {
|
"splitLine": {
|
||||||
|
"show": true,
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#484753",
|
"color": "#484753",
|
||||||
"width": 1,
|
"width": 1,
|
||||||
@ -62,6 +72,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"legend": {
|
"legend": {
|
||||||
|
"show": true,
|
||||||
"top": "5%",
|
"top": "5%",
|
||||||
"textStyle": {
|
"textStyle": {
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
/>
|
/>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
</div>
|
</div>
|
||||||
<GlobalSetting :data="targetData.option" :in-chart="true" />
|
<GlobalSetting :optionData="targetData.option" :in-chart="true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user