refactor: 文本、形状、图片的rotate改为必选属性

This commit is contained in:
pipipi-pikachu 2021-04-26 19:48:58 +08:00
parent 2279547c20
commit 5a95639ea1
2 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ export default () => {
left: (VIEWPORT_SIZE - width) / 2, left: (VIEWPORT_SIZE - width) / 2,
top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2, top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,
fixedRatio: true, fixedRatio: true,
rotate: 0 rotate: 0,
}) })
}) })
} }
@ -148,7 +148,7 @@ export default () => {
width, width,
height, height,
content, content,
rotate: 0 rotate: 0,
}) })
} }
@ -170,7 +170,7 @@ export default () => {
path: data.path, path: data.path,
fill: themeColor.value, fill: themeColor.value,
fixedRatio: false, fixedRatio: false,
rotate: 0 rotate: 0,
}) })
} }

View File

@ -35,7 +35,7 @@ interface PPTBaseElement {
export interface PPTTextElement extends PPTBaseElement{ export interface PPTTextElement extends PPTBaseElement{
type: 'text'; type: 'text';
content: string; content: string;
rotate?: number; rotate: number;
outline?: PPTElementOutline; outline?: PPTElementOutline;
fill?: string; fill?: string;
lineHeight?: number; lineHeight?: number;
@ -65,7 +65,7 @@ export interface PPTImageElement extends PPTBaseElement{
type: 'image'; type: 'image';
fixedRatio: boolean; fixedRatio: boolean;
src: string; src: string;
rotate?: number; rotate: number;
outline?: PPTElementOutline; outline?: PPTElementOutline;
filters?: ImageElementFilters; filters?: ImageElementFilters;
clip?: ImageElementClip; clip?: ImageElementClip;
@ -85,7 +85,7 @@ export interface PPTShapeElement extends PPTBaseElement{
fixedRatio: boolean; fixedRatio: boolean;
fill: string; fill: string;
gradient?: ShapeGradient; gradient?: ShapeGradient;
rotate?: number; rotate: number;
outline?: PPTElementOutline; outline?: PPTElementOutline;
opacity?: number; opacity?: number;
flip?: ImageOrShapeFlip; flip?: ImageOrShapeFlip;