Merge pull request #10642 from dataease/pr@dev-v2@fix_group-show

fix(数据大屏): 修复时组合图可能显示不出来的问题
This commit is contained in:
王嘉豪 2024-07-01 11:37:51 +08:00 committed by GitHub
commit f9dfcbb20f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 7 deletions

View File

@ -77,6 +77,7 @@ const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo,
:prop-value="element.propValue"
:show-position="showPosition"
:scale="scale * 100"
:canvas-view-info="canvasViewInfo"
></group-preview>
</template>

View File

@ -6,7 +6,7 @@ import CanvasGroup from '@/custom-component/common/CanvasGroup.vue'
import { deepCopy } from '@/utils/utils'
import { DEFAULT_CANVAS_STYLE_DATA_DARK } from '@/views/chart/components/editor/util/dataVisualiztion'
const dvMainStore = dvMainStoreWithOut()
const { canvasViewInfo, canvasStyleData, curComponent } = storeToRefs(dvMainStore)
const { canvasStyleData, curComponent } = storeToRefs(dvMainStore)
const sourceCanvasStyle = deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK)
const props = defineProps({
@ -50,10 +50,14 @@ const props = defineProps({
active: {
type: Boolean,
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 result = sourceCanvasStyle
result.scale = canvasStyleData.value.scale

View File

@ -1,11 +1,7 @@
<script setup lang="ts">
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 { toPercent } from '@/utils/translate'
const dvMainStore = dvMainStoreWithOut()
const { canvasViewInfo } = storeToRefs(dvMainStore)
const props = defineProps({
propValue: {
@ -39,10 +35,14 @@ const props = defineProps({
type: Number,
required: false,
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 => {
return {