forked from github/dataease
Merge pull request #11539 from dataease/refactor_tab-move
Refactor tab move
This commit is contained in:
commit
0bdc710e1b
@ -116,7 +116,7 @@ import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
|||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { guid } from '@/views/visualized/data/dataset/form/util'
|
import { guid } from '@/views/visualized/data/dataset/form/util'
|
||||||
import eventBus from '@/utils/eventBus'
|
import eventBus from '@/utils/eventBus'
|
||||||
import { canvasChangeAdaptor, findComponentIndexById } from '@/utils/canvasUtils'
|
import { canvasChangeAdaptor, findComponentIndexById, isDashboard } from '@/utils/canvasUtils'
|
||||||
import DeCustomTab from '@/custom-component/de-tabs/DeCustomTab.vue'
|
import DeCustomTab from '@/custom-component/de-tabs/DeCustomTab.vue'
|
||||||
import DePreview from '@/components/data-visualization/canvas/DePreview.vue'
|
import DePreview from '@/components/data-visualization/canvas/DePreview.vue'
|
||||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||||
@ -281,16 +281,18 @@ const componentMoveIn = component => {
|
|||||||
if (refInstance) {
|
if (refInstance) {
|
||||||
const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小
|
const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小
|
||||||
canvasChangeAdaptor(component, matrixBase)
|
canvasChangeAdaptor(component, matrixBase)
|
||||||
tabItem.componentData.push(component)
|
|
||||||
nextTick(() => {
|
|
||||||
component.x = 1
|
component.x = 1
|
||||||
component.y = 1
|
component.y = 200
|
||||||
component.style.left = 0
|
component.style.left = 0
|
||||||
component.style.top = 0
|
component.style.top = 0
|
||||||
|
tabItem.componentData.push(component)
|
||||||
|
if (isDashboard()) {
|
||||||
|
nextTick(() => {
|
||||||
refInstance.addItemBox(component) //在适当的时候初始化布局组件
|
refInstance.addItemBox(component) //在适当的时候初始化布局组件
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
reloadLinkage()
|
reloadLinkage()
|
||||||
|
@ -170,10 +170,10 @@ const initOpenHandler = newWindow => {
|
|||||||
>PDF</el-dropdown-item
|
>PDF</el-dropdown-item
|
||||||
>
|
>
|
||||||
<el-dropdown-item style="width: 118px" @click="downloadAsAppTemplate('template')"
|
<el-dropdown-item style="width: 118px" @click="downloadAsAppTemplate('template')"
|
||||||
>模板</el-dropdown-item
|
>样式模板</el-dropdown-item
|
||||||
>
|
>
|
||||||
<el-dropdown-item style="width: 118px" @click="downloadAsAppTemplate('app')"
|
<el-dropdown-item style="width: 118px" @click="downloadAsAppTemplate('app')"
|
||||||
>应用</el-dropdown-item
|
>应用模板</el-dropdown-item
|
||||||
>
|
>
|
||||||
<el-dropdown-item @click="download('img')">{{
|
<el-dropdown-item @click="download('img')">{{
|
||||||
t('chart.image')
|
t('chart.image')
|
||||||
|
Loading…
Reference in New Issue
Block a user