forked from github/dataease
Merge pull request #11832 from dataease/pr@dev-v2@chart-flow-map-style-fix
style(图表-流向地图): 标注文本及标注点样式调整
This commit is contained in:
commit
ba3a89be49
@ -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'
|
||||
|
@ -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 = {
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user