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' }
|
{ name: t('chart.map_line_type_arc_3d'), value: 'arc3d' }
|
||||||
]
|
]
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
lineForm: {
|
lineForm: {},
|
||||||
...JSON.parse(JSON.stringify(DEFAULT_MISC.flowMapConfig.lineConfig))
|
basicStyleForm: {}
|
||||||
},
|
|
||||||
basicStyleForm: {
|
|
||||||
...JSON.parse(JSON.stringify(DEFAULT_BASIC_STYLE))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
const toolTip = computed(() => {
|
const toolTip = computed(() => {
|
||||||
return props.themes === 'dark' ? 'ndark' : 'dark'
|
return props.themes === 'dark' ? 'ndark' : 'dark'
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<script lang="tsx" setup>
|
<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 { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { COLOR_PANEL, DEFAULT_MISC } from '@/views/chart/components/editor/util/chart'
|
import { COLOR_PANEL, DEFAULT_MISC } from '@/views/chart/components/editor/util/chart'
|
||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||||
import { ElSpace } from 'element-plus-secondary'
|
import { ElSpace } from 'element-plus-secondary'
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
@ -63,7 +64,11 @@ const init = () => {
|
|||||||
customAttr = JSON.parse(chart.customAttr)
|
customAttr = JSON.parse(chart.customAttr)
|
||||||
}
|
}
|
||||||
if (customAttr.misc.flowMapConfig.lineConfig) {
|
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 {
|
} else {
|
||||||
// 新增图表
|
// 新增图表
|
||||||
state.pointForm = {
|
state.pointForm = {
|
||||||
|
@ -282,8 +282,8 @@ export const DEFAULT_MISC: ChartMiscAttr = {
|
|||||||
mapLineWidth: 1,
|
mapLineWidth: 1,
|
||||||
mapLineAnimateDuration: 3,
|
mapLineAnimateDuration: 3,
|
||||||
mapLineGradient: false,
|
mapLineGradient: false,
|
||||||
mapLineSourceColor: '#146C94',
|
mapLineSourceColor: '#1E90FF',
|
||||||
mapLineTargetColor: '#576CBC',
|
mapLineTargetColor: '#90EE90',
|
||||||
alpha: 100
|
alpha: 100
|
||||||
},
|
},
|
||||||
pointConfig: {
|
pointConfig: {
|
||||||
|
Loading…
Reference in New Issue
Block a user