From d57cdafa5d0030c00ee8c43dd9c43f0a2e15807b Mon Sep 17 00:00:00 2001
From: pipipi-pikachu <1171051090@qq.com>
Date: Thu, 17 Dec 2020 21:13:55 +0800
Subject: [PATCH] update
---
.../Contextmenu/ContextmenuContent.vue | 2 +-
src/configs/imageClip.ts | 10 +
src/types/slides.ts | 2 +-
src/views/Editor/Canvas/index.vue | 84 +++++-
.../_common/_element/EditableElement.vue | 10 +-
src/views/_common/_element/ElementBorder.vue | 7 +-
.../ImageElement/ImageClipHandler.vue | 5 +
.../ImageElement/ImageEllipseBorder.vue | 5 +
.../ImageElement/ImagePolygonBorder.vue | 5 +
.../_element/ImageElement/ImageRectBorder.vue | 5 +
.../_common/_element/ImageElement/index.vue | 16 +-
.../_common/_element/TextElement/index.vue | 266 ++++++++++++++++++
12 files changed, 404 insertions(+), 13 deletions(-)
diff --git a/src/components/Contextmenu/ContextmenuContent.vue b/src/components/Contextmenu/ContextmenuContent.vue
index b2835d9..fc3240a 100644
--- a/src/components/Contextmenu/ContextmenuContent.vue
+++ b/src/components/Contextmenu/ContextmenuContent.vue
@@ -101,7 +101,7 @@ $subMenuWidth: 120px;
}
.contextmenu-item {
padding: 0 20px;
- color: #666;
+ color: #555;
font-size: 12px;
transition: all 0.3s;
white-space: nowrap;
diff --git a/src/configs/imageClip.ts b/src/configs/imageClip.ts
index fcc5bca..893d614 100644
--- a/src/configs/imageClip.ts
+++ b/src/configs/imageClip.ts
@@ -4,6 +4,16 @@ export enum ClipPathTypes {
POLYGON = 'polygon',
}
+export enum ClipPaths {
+ RECT = 'rect',
+ ROUNDRECT = 'roundRect',
+ ELLIPSE = 'ellipse',
+ TRIANGLE = 'triangle',
+ PENTAGON = 'pentagon',
+ RHOMBUS = 'rhombus',
+ STAR = 'star',
+}
+
export const CLIPPATHS = {
rect: {
name: '矩形',
diff --git a/src/types/slides.ts b/src/types/slides.ts
index 3c63f5b..b43f55e 100644
--- a/src/types/slides.ts
+++ b/src/types/slides.ts
@@ -39,7 +39,7 @@ export interface PPTImageElement extends PPTElementBaseProps, PPTElementSizeProp
filter?: string;
clip?: {
range: [[number, number], [number, number]];
- shape: 'rect' | 'ellipse' | 'polygon';
+ shape: 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'pentagon' | 'rhombus' | 'star';
};
flip?: { x?: number, y?: number };
shadow?: string;
diff --git a/src/views/Editor/Canvas/index.vue b/src/views/Editor/Canvas/index.vue
index d138971..3112cc4 100644
--- a/src/views/Editor/Canvas/index.vue
+++ b/src/views/Editor/Canvas/index.vue
@@ -35,12 +35,35 @@
v-for="(line, index) in alignmentLines" :key="index"
:type="line.type" :axis="line.axis" :length="line.length"
/>
+
+
+
+