forked from github/dataease
Merge pull request #10642 from dataease/pr@dev-v2@fix_group-show
fix(数据大屏): 修复时组合图可能显示不出来的问题
This commit is contained in:
commit
f9dfcbb20f
@ -77,6 +77,7 @@ const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo,
|
|||||||
:prop-value="element.propValue"
|
:prop-value="element.propValue"
|
||||||
:show-position="showPosition"
|
:show-position="showPosition"
|
||||||
:scale="scale * 100"
|
:scale="scale * 100"
|
||||||
|
:canvas-view-info="canvasViewInfo"
|
||||||
></group-preview>
|
></group-preview>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import CanvasGroup from '@/custom-component/common/CanvasGroup.vue'
|
|||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
import { DEFAULT_CANVAS_STYLE_DATA_DARK } from '@/views/chart/components/editor/util/dataVisualiztion'
|
import { DEFAULT_CANVAS_STYLE_DATA_DARK } from '@/views/chart/components/editor/util/dataVisualiztion'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
const dvMainStore = dvMainStoreWithOut()
|
||||||
const { canvasViewInfo, canvasStyleData, curComponent } = storeToRefs(dvMainStore)
|
const { canvasStyleData, curComponent } = storeToRefs(dvMainStore)
|
||||||
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
|
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -50,10 +50,14 @@ const props = defineProps({
|
|||||||
active: {
|
active: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
canvasViewInfo: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const { propValue, dvInfo, element, scale } = toRefs(props)
|
const { propValue, dvInfo, element, scale, canvasViewInfo } = toRefs(props)
|
||||||
const customCanvasStyle = computed(() => {
|
const customCanvasStyle = computed(() => {
|
||||||
const result = sourceCanvasStyle
|
const result = sourceCanvasStyle
|
||||||
result.scale = canvasStyleData.value.scale
|
result.scale = canvasStyleData.value.scale
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { toRefs } from 'vue'
|
import { toRefs } from 'vue'
|
||||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
|
||||||
import { storeToRefs } from 'pinia'
|
|
||||||
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
import ComponentWrapper from '@/components/data-visualization/canvas/ComponentWrapper.vue'
|
||||||
import { toPercent } from '@/utils/translate'
|
import { toPercent } from '@/utils/translate'
|
||||||
const dvMainStore = dvMainStoreWithOut()
|
|
||||||
const { canvasViewInfo } = storeToRefs(dvMainStore)
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
propValue: {
|
propValue: {
|
||||||
@ -39,10 +35,14 @@ const props = defineProps({
|
|||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: 1
|
default: 1
|
||||||
|
},
|
||||||
|
canvasViewInfo: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const { propValue, dvInfo, searchCount, scale } = toRefs(props)
|
const { propValue, dvInfo, searchCount, scale, canvasViewInfo } = toRefs(props)
|
||||||
|
|
||||||
const customGroupStyle = item => {
|
const customGroupStyle = item => {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user