forked from github/dataease
feat(仪表板、数据大屏): 复用组件主体适配组件伸缩方式优化,支持原尺寸
This commit is contained in:
parent
e755f70d74
commit
86f49da257
@ -397,10 +397,13 @@ const calcData = (view: Chart, callback) => {
|
||||
state.viewDataInfo = {}
|
||||
state.totalItems = 0
|
||||
const curViewInfo = canvasViewInfo.value[element.value.id]
|
||||
curViewInfo['curFields'] = []
|
||||
dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo)
|
||||
if (curViewInfo) {
|
||||
curViewInfo['curFields'] = []
|
||||
dvMainStore.setViewDataDetails(element.value.id, state.viewDataInfo)
|
||||
initReady.value = true
|
||||
initCurFields(curViewInfo)
|
||||
}
|
||||
initReady.value = true
|
||||
initCurFields(curViewInfo)
|
||||
callback?.()
|
||||
nextTick(() => {
|
||||
initReady.value = true
|
||||
|
@ -13,6 +13,7 @@ const dvMainStore = dvMainStoreWithOut()
|
||||
const composeStore = composeStoreWithOut()
|
||||
const contextmenuStore = contextmenuStoreWithOut()
|
||||
const {
|
||||
multiplexingStyleAdapt,
|
||||
curComponent,
|
||||
curComponentIndex,
|
||||
curMultiplexingComponents,
|
||||
@ -52,13 +53,17 @@ export const copyStore = defineStore('copy', {
|
||||
// dashboard 平铺2个
|
||||
const xPositionOffset = index % 2
|
||||
const yPositionOffset = index % 2
|
||||
newComponent.sizeX = pcMatrixCount.value.x / 2
|
||||
newComponent.sizeY = 14
|
||||
if (!(copyFrom === 'multiplexing' && !multiplexingStyleAdapt.value)) {
|
||||
newComponent.sizeX = pcMatrixCount.value.x / 2
|
||||
newComponent.sizeY = 14
|
||||
// dataV 数据大屏
|
||||
newComponent.style.width = ((canvasStyleData.value.width / 3) * scale) / 100
|
||||
newComponent.style.height = ((canvasStyleData.value.height / 3) * scale) / 100
|
||||
}
|
||||
// dataV 数据大屏
|
||||
newComponent.x = newComponent.sizeX * xPositionOffset + 1
|
||||
newComponent.y = 200
|
||||
// dataV 数据大屏
|
||||
newComponent.style.width = (width * scale) / 400
|
||||
newComponent.style.height = (height * scale) / 400
|
||||
newComponent.style.left = 0
|
||||
newComponent.style.top = 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user