mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
fix: psd editor add groups
This commit is contained in:
parent
4f4aeb3388
commit
1b704ee1d2
@ -19,7 +19,7 @@ import zoomControl from '@/components/modules/layout/zoomControl/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
// import { wGroupSetting } from '@/components/modules/widgets/wGroup/groupSetting'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useGroupStore, useCanvasStore, useWidgetStore } from '@/store'
|
||||
import { useCanvasStore, useWidgetStore } from '@/store'
|
||||
|
||||
type TState = {
|
||||
style: StyleValue
|
||||
@ -32,14 +32,10 @@ const state = reactive<TState>({
|
||||
},
|
||||
})
|
||||
const pageStore = useCanvasStore()
|
||||
// const groupStore = useGroupStore()
|
||||
const widgetStore = useWidgetStore()
|
||||
const { dPage } = storeToRefs(pageStore)
|
||||
|
||||
onMounted(() => {
|
||||
// groupStore.initGroupJson(JSON.stringify(wGroupSetting))
|
||||
// store.dispatch('initGroupJson', JSON.stringify(wGroupSetting))
|
||||
// initGroupJson(JSON.stringify(wGroup.setting))
|
||||
nextTick(() => {
|
||||
load()
|
||||
})
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @Date: 2022-01-10 14:57:53
|
||||
* @Description: Psd文件解析
|
||||
* @LastEditors: ShawnPhang <https://m.palxp.cn>
|
||||
* @LastEditTime: 2024-04-11 15:37:38
|
||||
* @LastEditTime: 2024-08-15 18:00:32
|
||||
-->
|
||||
<template>
|
||||
<div id="page-design-index" ref="pageDesignIndex">
|
||||
@ -72,8 +72,9 @@ import ProgressLoading from '@/components/common/ProgressLoading/index.vue'
|
||||
import { processPSD2Page } from '@/utils/plugins/psd'
|
||||
// import { useSetupMapGetters } from '@/common/hooks/mapGetters'
|
||||
import { wTextSetting } from '@/components/modules/widgets/wText/wTextSetting'
|
||||
import { useCanvasStore, useControlStore, useWidgetStore } from '@/store'
|
||||
import { useCanvasStore, useControlStore, useWidgetStore, useGroupStore } from '@/store'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { wGroupSetting } from '@/components/modules/widgets/wGroup/groupSetting'
|
||||
|
||||
type TState = {
|
||||
isDone: boolean
|
||||
@ -97,6 +98,7 @@ const controlStore = useControlStore()
|
||||
const route = useRoute()
|
||||
|
||||
// const { dZoom } = useSetupMapGetters(['dZoom'])
|
||||
const groupStore = useGroupStore()
|
||||
const pageStore = useCanvasStore()
|
||||
const { dPage } = storeToRefs(pageStore)
|
||||
const { dZoom } = storeToRefs(useCanvasStore())
|
||||
@ -107,6 +109,7 @@ let loading: ReturnType<typeof useLoading> | null = null
|
||||
// const myWorker = new MyWorker('loadPSD')
|
||||
|
||||
onMounted(async () => {
|
||||
groupStore.initGroupJson(JSON.stringify(wGroupSetting))
|
||||
await nextTick()
|
||||
if (zoomControlRef.value){
|
||||
zoomControlRef.value.screenChange()
|
||||
|
Loading…
x
Reference in New Issue
Block a user