forked from github/dataease
Merge pull request #7344 from dataease/pr@dev-v2@refactor_layer
Pr@dev v2@refactor layer
This commit is contained in:
commit
e8a0ebd538
@ -205,6 +205,10 @@ const curScale = computed(() => {
|
||||
return canvasStyleData.value.scale / 100
|
||||
})
|
||||
|
||||
const curBaseScale = computed(() => {
|
||||
return dvMainStore.canvasStyleData.scale / 100
|
||||
})
|
||||
|
||||
const pointShadowShow = computed(() => {
|
||||
return (
|
||||
canvasId.value === 'canvas-main' &&
|
||||
@ -1314,7 +1318,7 @@ defineExpose({
|
||||
:id="'component' + item.id"
|
||||
:active="item.id === curComponentId"
|
||||
:dv-type="dvInfo.type"
|
||||
:scale="curScale"
|
||||
:scale="curBaseScale"
|
||||
:style="getComponentStyle(item.style)"
|
||||
:prop-value="item.propValue"
|
||||
:is-edit="true"
|
||||
|
@ -232,7 +232,7 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => {
|
||||
})
|
||||
} else if (cmd === 'edit') {
|
||||
resourceEdit(data.id)
|
||||
} else {
|
||||
} else if (cmd === 'copy') {
|
||||
const targetPid = findParentIdByChildIdRecursive(state.resourceTree, data.id)
|
||||
const params: ResourceOrFolder = {
|
||||
nodeType: nodeType as 'folder' | 'leaf',
|
||||
@ -248,6 +248,8 @@ const operation = (cmd: string, data: BusiTreeNode, nodeType: string) => {
|
||||
: `#/dashboard?opt=copy&pid=${params.pid}&resourceId=${data.data}`
|
||||
window.open(baseUrl, '_blank')
|
||||
})
|
||||
} else {
|
||||
resourceGroupOpt.value.optInit(nodeType, data, cmd, ['copy'].includes(cmd))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ const handleDrop = e => {
|
||||
component.style.left = e.clientX - rectInfo.x
|
||||
component.id = guid()
|
||||
changeComponentSizeWithScale(component)
|
||||
dvMainStore.addComponent({ component: component, index: 0 })
|
||||
dvMainStore.addComponent({ component: component, index: undefined })
|
||||
adaptCurThemeCommonStyle(component)
|
||||
snapshotStore.recordSnapshotCache('renderChart', component.id)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user