mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
rebuilt: control store to pinia
This commit is contained in:
parent
8511593052
commit
7dbc09b8fe
@ -29,6 +29,7 @@ export type TImageSetting = {
|
|||||||
ratio: number
|
ratio: number
|
||||||
left: number
|
left: number
|
||||||
}
|
}
|
||||||
|
cropEdit?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const setting: TImageSetting = {
|
const setting: TImageSetting = {
|
||||||
|
@ -89,6 +89,8 @@ import imageCutout from '@/components/business/image-cutout'
|
|||||||
import { useSetupMapGetters } from '@/common/hooks/mapGetters'
|
import { useSetupMapGetters } from '@/common/hooks/mapGetters'
|
||||||
import wImageSetting, { TImageSetting } from './wImageSetting'
|
import wImageSetting, { TImageSetting } from './wImageSetting'
|
||||||
import { TGetImageListResult } from '@/api/material'
|
import { TGetImageListResult } from '@/api/material'
|
||||||
|
import { storeToRefs } from 'pinia'
|
||||||
|
import { useControlStore } from '@/pinia'
|
||||||
|
|
||||||
type TState = {
|
type TState = {
|
||||||
picBoxShow: boolean
|
picBoxShow: boolean
|
||||||
@ -132,8 +134,9 @@ const imageCutoutRef = ref<typeof imageCutout | null>(null)
|
|||||||
|
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const {
|
const {
|
||||||
dActiveElement, dMoving, dWidgets
|
dActiveElement, dWidgets
|
||||||
} = useSetupMapGetters(['dActiveElement', 'dMoving', 'dWidgets'])
|
} = useSetupMapGetters(['dActiveElement', 'dWidgets'])
|
||||||
|
const { dMoving } = storeToRefs(useControlStore())
|
||||||
// computed: {
|
// computed: {
|
||||||
// ...mapGetters(['dActiveElement', 'dMoving', 'dWidgets']),
|
// ...mapGetters(['dActiveElement', 'dMoving', 'dWidgets']),
|
||||||
// },
|
// },
|
||||||
|
@ -10,10 +10,12 @@ import useBaseStore from "./base";
|
|||||||
import useUserStore from "./base/user";
|
import useUserStore from "./base/user";
|
||||||
import usePageStore from "./design/page"
|
import usePageStore from "./design/page"
|
||||||
import useCanvasStore from "./design/canvas"
|
import useCanvasStore from "./design/canvas"
|
||||||
|
import useControlStore from './design/control'
|
||||||
|
|
||||||
export {
|
export {
|
||||||
useBaseStore,
|
useBaseStore,
|
||||||
useUserStore,
|
useUserStore,
|
||||||
usePageStore,
|
usePageStore,
|
||||||
useCanvasStore,
|
useCanvasStore,
|
||||||
|
useControlStore
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user