fix(数据大屏): 修复数据大屏中的组合组件内部视图标题缩放比例不正确问题

This commit is contained in:
wangjiahao 2024-03-04 13:51:40 +08:00
parent afc2877c0f
commit f98c89c24a
3 changed files with 14 additions and 1 deletions

View File

@ -46,6 +46,11 @@ const props = defineProps({
type: Number, type: Number,
required: false, required: false,
default: 0 default: 0
},
scale: {
type: Number,
required: false,
default: 1
} }
}) })
const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo, componentData } = const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo, componentData } =
@ -71,6 +76,7 @@ const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo,
:search-count="searchCount" :search-count="searchCount"
:prop-value="element.propValue" :prop-value="element.propValue"
:show-position="showPosition" :show-position="showPosition"
:scale="scale * 100"
></group-preview> ></group-preview>
</template> </template>

View File

@ -99,6 +99,7 @@ watch(
:canvas-view-info="canvasViewInfo" :canvas-view-info="canvasViewInfo"
:is-edit="isEdit" :is-edit="isEdit"
:element="element" :element="element"
:scale="scale"
> >
</canvas-group> </canvas-group>
</div> </div>

View File

@ -34,10 +34,15 @@ const props = defineProps({
type: Number, type: Number,
required: false, required: false,
default: 0 default: 0
},
scale: {
type: Number,
required: false,
default: 1
} }
}) })
const { propValue, dvInfo, searchCount } = toRefs(props) const { propValue, dvInfo, searchCount, scale } = toRefs(props)
const customGroupStyle = item => { const customGroupStyle = item => {
return { return {
@ -63,6 +68,7 @@ const customGroupStyle = item => {
:style="customGroupStyle(item)" :style="customGroupStyle(item)"
:show-position="showPosition" :show-position="showPosition"
:search-count="searchCount" :search-count="searchCount"
:scale="scale"
/> />
</div> </div>
</div> </div>