style(图表-流向地图): 标注文本及标注点样式调整

This commit is contained in:
jianneng-fit2cloud 2024-08-29 10:49:28 +08:00
parent 4bdb0e2600
commit 613ee0881b
3 changed files with 11 additions and 10 deletions

View File

@ -31,12 +31,8 @@ const flowLineTypeOptions = [
{ name: t('chart.map_line_type_arc_3d'), value: 'arc3d' }
]
const state = reactive({
lineForm: {
...JSON.parse(JSON.stringify(DEFAULT_MISC.flowMapConfig.lineConfig))
},
basicStyleForm: {
...JSON.parse(JSON.stringify(DEFAULT_BASIC_STYLE))
}
lineForm: {},
basicStyleForm: {}
})
const toolTip = computed(() => {
return props.themes === 'dark' ? 'ndark' : 'dark'

View File

@ -1,9 +1,10 @@
<script lang="tsx" setup>
import { computed, onMounted, PropType, reactive, watch } from 'vue'
import { computed, nextTick, onMounted, PropType, reactive, watch } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import { COLOR_PANEL, DEFAULT_MISC } from '@/views/chart/components/editor/util/chart'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { ElSpace } from 'element-plus-secondary'
import { cloneDeep } from 'lodash-es'
const { t } = useI18n()
const dvMainStore = dvMainStoreWithOut()
@ -63,7 +64,11 @@ const init = () => {
customAttr = JSON.parse(chart.customAttr)
}
if (customAttr.misc.flowMapConfig.lineConfig) {
state.pointForm = customAttr.misc.flowMapConfig.pointConfig
state.pointForm = cloneDeep(customAttr.misc.flowMapConfig.pointConfig)
nextTick(() => {
state.pointForm.point.color = customAttr.misc.flowMapConfig.pointConfig.point.color
state.pointForm.text.color = customAttr.misc.flowMapConfig.pointConfig.text.color
})
} else {
//
state.pointForm = {

View File

@ -282,8 +282,8 @@ export const DEFAULT_MISC: ChartMiscAttr = {
mapLineWidth: 1,
mapLineAnimateDuration: 3,
mapLineGradient: false,
mapLineSourceColor: '#146C94',
mapLineTargetColor: '#576CBC',
mapLineSourceColor: '#1E90FF',
mapLineTargetColor: '#90EE90',
alpha: 100
},
pointConfig: {