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
7cb07dd240
commit
b07b56054e
@ -59,7 +59,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, PropType } from 'vue'
|
import { computed, defineComponent, PropType } from 'vue'
|
||||||
import { MutationTypes, useStore } from '@/store'
|
import { MutationTypes, useStore } from '@/store'
|
||||||
import { PPTImageElement } from '@/types/slides'
|
import { ImageElementClip, PPTImageElement } from '@/types/slides'
|
||||||
import { ImageClipedEmitData } from '@/types/edit'
|
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'
|
||||||
@ -118,7 +118,7 @@ export default defineComponent({
|
|||||||
if (!data) return
|
if (!data) return
|
||||||
|
|
||||||
const { range, position } = data
|
const { range, position } = data
|
||||||
const originClip = props.elementInfo.clip || {}
|
const originClip: ImageElementClip = props.elementInfo.clip || { shape: 'rect', range: [[0, 0], [100, 100]] }
|
||||||
|
|
||||||
const _props = {
|
const _props = {
|
||||||
clip: { ...originClip, range },
|
clip: { ...originClip, range },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user