mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 修改文件结构
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { onUnmounted, onMounted } from 'vue'
|
||||
import { getChartEditStore } from './useStore.hook'
|
||||
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
||||
|
||||
const chartEditStore = getChartEditStore()
|
||||
|
||||
export const useLayout = () => {
|
||||
onMounted(() => {
|
||||
// 设置 Dom 值(ref 不生效先用 document)
|
||||
chartEditStore.setEditCanvasItem(
|
||||
EditCanvasTypeEnum.EDIT_LAYOUT_DOM,
|
||||
document.getElementById('go-chart-edit-layout')
|
||||
)
|
||||
chartEditStore.setEditCanvasItem(
|
||||
EditCanvasTypeEnum.EDIT_CONTENT_DOM,
|
||||
document.getElementById('go-chart-edit-content')
|
||||
)
|
||||
|
||||
// 大小初始化
|
||||
chartEditStore.setPageSize()
|
||||
|
||||
// 监听初始化
|
||||
const removeScale = chartEditStore.listenerScale()
|
||||
|
||||
onUnmounted(() => {
|
||||
removeScale()
|
||||
})
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user