forked from github/dataease
Merge pull request #10094 from dataease/pr@dev-v2@chart-labelSelector-position-fix
fix(图表): 修复水平条形图标签位置配置项不显示的问题
This commit is contained in:
commit
049c661fd5
@ -220,6 +220,24 @@ const isBarRangeTime = computed<boolean>(() => {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
const showPositionH = computed(() => {
|
||||||
|
if (showProperty('hPosition')) {
|
||||||
|
if (props.chart.type !== 'bidirectional-bar') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return props.chart.customAttr.basicStyle.layout === 'horizontal'
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
const showPositionV = computed(() => {
|
||||||
|
if (showProperty('vPosition')) {
|
||||||
|
if (props.chart.type !== 'bidirectional-bar') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return props.chart.customAttr.basicStyle.layout === 'vertical'
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
watch(
|
watch(
|
||||||
() => props.chart.customAttr.basicStyle.layout,
|
() => props.chart.customAttr.basicStyle.layout,
|
||||||
() => {
|
() => {
|
||||||
@ -245,12 +263,6 @@ watch(
|
|||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
const isBarBidirectionalAndVertical = computed(() => {
|
|
||||||
if (props.chart.type !== 'bidirectional-bar') {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return props.chart.customAttr.basicStyle.layout === 'vertical'
|
|
||||||
})
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
@ -328,7 +340,7 @@ onMounted(() => {
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="showProperty('hPosition') && !isBarBidirectionalAndVertical"
|
v-if="showPositionH"
|
||||||
:label="t('chart.label_position')"
|
:label="t('chart.label_position')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:class="'form-item-' + themes"
|
:class="'form-item-' + themes"
|
||||||
@ -349,7 +361,7 @@ onMounted(() => {
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="showProperty('vPosition') && isBarBidirectionalAndVertical"
|
v-if="showPositionV"
|
||||||
:label="t('chart.label_position')"
|
:label="t('chart.label_position')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
:class="'form-item-' + themes"
|
:class="'form-item-' + themes"
|
||||||
|
Loading…
Reference in New Issue
Block a user