Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
wangjiahao
2021-06-11 16:53:40 +08:00
5 changed files with 35 additions and 24 deletions

View File

@@ -48,13 +48,14 @@ export default {
watch: {
'options.attrs.multiple': function(value) {
const sourceValue = this.options.value
const sourceValid = !!sourceValue && Object.keys(sourceValue).length > 0
if (value) {
!sourceValue && (this.options.value = [])
sourceValue && !Array.isArray(sourceValue) && (this.options.value = sourceValue.split(','))
!sourceValid && (this.options.value = [])
sourceValid && !Array.isArray(sourceValue) && (this.options.value = sourceValue.split(','))
!this.inDraw && (this.options.value = [])
} else {
!sourceValue && (this.options.value = null)
sourceValue && Array.isArray(sourceValue) && (this.options.value = sourceValue[0])
!sourceValid && (this.options.value = null)
sourceValid && Array.isArray(sourceValue) && (this.options.value = sourceValue[0])
!this.inDraw && (this.options.value = null)
}
}
@@ -68,7 +69,7 @@ export default {
// this.$nextTick(() => {
// this.options && this.options.value && this.changeValue(this.options.value)
// })
this.options && this.options.value && this.changeValue(this.options.value)
this.options && this.options.value && Object.keys(this.options.value).length > 0 && this.changeValue(this.options.value)
},
methods: {
changeValue(value) {

View File

@@ -6,13 +6,13 @@
id="label-content"
:style="content_class"
>
<p v-if="dimensionShow" :style="label_class">
<!-- {{ chart.data.x[0] }}-->
{{ chart.data.series[0].name }}
<p v-for="item in chart.data.series" :key="item.name" :style="label_content_class">
{{ item.data[0] }}
</p>
<span v-if="quotaShow" :style="label_space">
<p v-for="item in chart.data.series" :key="item.name" :style="label_content_class">
{{ item.data[0] }}
<p v-if="dimensionShow" :style="label_class">
<!-- {{ chart.data.x[0] }}-->
{{ chart.data.series[0].name }}
</p>
</span>
</div>