diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/DimensionItem.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/DimensionItem.vue index f9be2dd653..df68aec8ac 100644 --- a/core/core-frontend/src/views/chart/components/editor/drag-item/DimensionItem.vue +++ b/core/core-frontend/src/views/chart/components/editor/drag-item/DimensionItem.vue @@ -192,17 +192,25 @@ const showCustomSort = item => { } return !item.chartId && (item.deType === 0 || item.deType === 5) } -const showSort = () => { + +const NOT_SUPPORT_SORT = ['word-cloud', 'stock-line', 'treemap', 'circle-packing'] +const showSort = computed(() => { const { type: chartType } = props.chart const { type: propType } = props - const notShowSort = ['word-cloud', 'stock-line', 'treemap'].includes(chartType) + const notShowSort = NOT_SUPPORT_SORT.includes(chartType) if (notShowSort || propType === 'extColor') { return false } const isChartMix = chartType.includes('chart-mix') const isDimensionType = ['dimension', 'dimensionStack', 'dimensionExt'].includes(propType) return !isChartMix || isDimensionType -} +}) +const showSortPriority = computed(() => { + if (props.chart.type.includes('chart-mix')) { + return false + } + return showSort.value +}) const toggleHide = () => { item.value.index = props.index item.value.hide = !item.value.hide @@ -227,17 +235,17 @@ onMounted(() => { :style="{ backgroundColor: tagType + '0a', border: '1px solid ' + tagType }" > - + - + - + @@ -284,7 +292,7 @@ onMounted(() => { class="item-span-style" :class="{ 'hidden-status': showHideIcon, - 'sort-status': showSort() && item.sort !== 'none' + 'sort-status': showSort && item.sort !== 'none' }" > {{ item.chartShowName ? item.chartShowName : item.name }} @@ -313,7 +321,7 @@ onMounted(() => { class="drop-style" :class="themes === 'dark' ? 'dark-dimension-quota' : ''" > - + { diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue index 5575601869..9d4888a50e 100644 --- a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue +++ b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue @@ -315,14 +315,22 @@ const showHideIcon = computed(() => { return ['tale-info', 'table-normal'].includes(props.chart.type) && item.value.hide }) +const NOT_SUPPORT_SORT = [ + 'circle-packing', + 'indicator', + 'liquid', + 'gauge', + 'word-cloud', + 'stock-line', + 'treemap' +] + const showSort = computed(() => { return ( props.type !== 'extLabel' && props.type !== 'extTooltip' && props.type !== 'extBubble' && - !['indicator', 'liquid', 'gauge', 'word-cloud', 'stock-line', 'treemap'].includes( - chart.value.type - ) && + !NOT_SUPPORT_SORT.includes(chart.value.type) && !chart.value.type.includes('chart-mix') ) })