mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 图片裁剪后不能撤回
This commit is contained in:
parent
55a7f07218
commit
fb6ed86228
@ -64,6 +64,7 @@ import { ImageClipedEmitData } from '@/types/edit'
|
|||||||
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
import { ContextmenuItem } from '@/components/Contextmenu/types'
|
||||||
import useElementShadow from '@/views/components/element/hooks/useElementShadow'
|
import useElementShadow from '@/views/components/element/hooks/useElementShadow'
|
||||||
import useElementFlip from '@/views/components/element/hooks/useElementFlip'
|
import useElementFlip from '@/views/components/element/hooks/useElementFlip'
|
||||||
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
import useClipImage from './useClipImage'
|
import useClipImage from './useClipImage'
|
||||||
import useFilter from './useFilter'
|
import useFilter from './useFilter'
|
||||||
|
|
||||||
@ -94,6 +95,8 @@ export default defineComponent({
|
|||||||
const clipingImageElementId = computed(() => store.state.clipingImageElementId)
|
const clipingImageElementId = computed(() => store.state.clipingImageElementId)
|
||||||
const isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)
|
const isCliping = computed(() => clipingImageElementId.value === props.elementInfo.id)
|
||||||
|
|
||||||
|
const { addHistorySnapshot } = useHistorySnapshot()
|
||||||
|
|
||||||
const shadow = computed(() => props.elementInfo.shadow)
|
const shadow = computed(() => props.elementInfo.shadow)
|
||||||
const { shadowStyle } = useElementShadow(shadow)
|
const { shadowStyle } = useElementShadow(shadow)
|
||||||
|
|
||||||
@ -129,6 +132,8 @@ export default defineComponent({
|
|||||||
height: props.elementInfo.height + position.height,
|
height: props.elementInfo.height + position.height,
|
||||||
}
|
}
|
||||||
store.commit(MutationTypes.UPDATE_ELEMENT, { id: props.elementInfo.id, props: _props })
|
store.commit(MutationTypes.UPDATE_ELEMENT, { id: props.elementInfo.id, props: _props })
|
||||||
|
|
||||||
|
addHistorySnapshot()
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user