mirror of
https://gitee.com/dromara/go-view.git
synced 2024-11-29 18:28:28 +08:00
fix: 修改命名
This commit is contained in:
parent
151ec13904
commit
08a24b9e3c
@ -1,7 +1,7 @@
|
|||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
import { renderLang, renderIcon } from '@/utils'
|
import { renderLang, renderIcon } from '@/utils'
|
||||||
import { themeColor, setItem, getCharts } from './layoutHook'
|
import { themeColor, setItem, getCharts } from './useLayout.hook'
|
||||||
import { PackagesCategoryEnum, PackagesCategoryName } from '@/packages/index.d'
|
import { PackagesCategoryEnum, PackagesCategoryName } from '@/packages/index.d'
|
||||||
// 图表
|
// 图表
|
||||||
import { usePackagesStore } from '@/store/modules/packagesStore/packagesStore'
|
import { usePackagesStore } from '@/store/modules/packagesStore/packagesStore'
|
@ -54,7 +54,7 @@ import {
|
|||||||
selectValue,
|
selectValue,
|
||||||
clickItemHandle,
|
clickItemHandle,
|
||||||
menuOptions
|
menuOptions
|
||||||
} from './hooks/asideHook'
|
} from './hooks/useAside.hook'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -59,7 +59,7 @@ import { reactive, ref, toRefs, shallowReactive, watchEffect } from 'vue'
|
|||||||
import { icon } from '@/plugins'
|
import { icon } from '@/plugins'
|
||||||
const { LockClosedOutlineIcon, LockOpenOutlineIcon } = icon.ionicons5
|
const { LockClosedOutlineIcon, LockOpenOutlineIcon } = icon.ionicons5
|
||||||
const { DicomOverlayIcon } = icon.carbon
|
const { DicomOverlayIcon } = icon.carbon
|
||||||
import { getChartEditStore, getChartEditStoreEnum } from '../../hooks/useStore'
|
import { getChartEditStore, getChartEditStoreEnum } from '../../hooks/useStore.hook'
|
||||||
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
import { useDesignStore } from '@/store/modules/designStore/designStore'
|
||||||
|
|
||||||
// 全局颜色
|
// 全局颜色
|
||||||
|
@ -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.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()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
@ -23,32 +23,10 @@ import { onUnmounted, onMounted } from 'vue'
|
|||||||
import { ContentBox } from '../ContentBox/index'
|
import { ContentBox } from '../ContentBox/index'
|
||||||
import { EditRange } from './components/EditRange'
|
import { EditRange } from './components/EditRange'
|
||||||
import { EditBottom } from './components/EditBottom'
|
import { EditBottom } from './components/EditBottom'
|
||||||
import { getChartEditStore } from './hooks/useStore'
|
import { useLayout } from './hooks/useLayout.hook'
|
||||||
import { EditCanvasTypeEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
|
|
||||||
|
|
||||||
const chartEditStore = getChartEditStore()
|
// 布局处理
|
||||||
|
useLayout()
|
||||||
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()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user