|
|
@@ -23,32 +23,10 @@ import { onUnmounted, onMounted } from 'vue'
|
|
|
import { ContentBox } from '../ContentBox/index'
|
|
|
import { EditRange } from './components/EditRange'
|
|
|
import { EditBottom } from './components/EditBottom'
|
|
|
-import { getChartEditStore } from './hooks/useStore'
|
|
|
-import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
|
|
+import { useLayout } from './hooks/useLayout.hook'
|
|
|
|
|
|
-const chartEditStore = getChartEditStore()
|
|
|
-
|
|
|
-onMounted(() => {
|
|
|
- // 设置 Dom 值(ref 不生效先用document)
|
|
|
- chartEditStore.setEditCanvasItem(
|
|
|
- EditCanvasTypeEnum.EDITLAYOUTDOM,
|
|
|
- document.getElementById('go-chart-edit-layout')
|
|
|
- )
|
|
|
- chartEditStore.setEditCanvasItem(
|
|
|
- EditCanvasTypeEnum.EDITCONTENTDON,
|
|
|
- document.getElementById('go-chart-edit-content')
|
|
|
- )
|
|
|
-
|
|
|
- // 大小初始化
|
|
|
- chartEditStore.setPageSize()
|
|
|
-
|
|
|
- // 监听初始化
|
|
|
- const removeScale = chartEditStore.listenerScale()
|
|
|
-
|
|
|
- onUnmounted(() => {
|
|
|
- removeScale()
|
|
|
- })
|
|
|
-})
|
|
|
+// 布局处理
|
|
|
+useLayout()
|
|
|
|
|
|
</script>
|
|
|
|