From 99171297dfa9be099be8810d0f11e76b50fdb867 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu <1171051090@qq.com> Date: Wed, 20 Jan 2021 18:02:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BD=A2=E7=8A=B6=E6=B8=90?= =?UTF-8?q?=E5=8F=98=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/slides.ts | 6 ++ .../ChartStylePanel/index.vue | 7 +- .../ElementStylePanel/ShapeStylePanel.vue | 93 ++++++++++++++++++- .../element/ShapeElement/BaseShapeElement.vue | 16 +++- .../element/ShapeElement/GradientDefs.vue | 48 ++++++++++ .../components/element/ShapeElement/index.vue | 16 +++- 6 files changed, 177 insertions(+), 9 deletions(-) create mode 100644 src/views/components/element/ShapeElement/GradientDefs.vue diff --git a/src/types/slides.ts b/src/types/slides.ts index ac091abf..de9cfe5c 100644 --- a/src/types/slides.ts +++ b/src/types/slides.ts @@ -72,6 +72,11 @@ export interface PPTImageElement { shadow?: PPTElementShadow; } +export interface ShapeGradient { + type: 'line' | 'radial'; + color: [string, string]; + rotate: number; +} export interface PPTShapeElement { type: 'shape'; id: string; @@ -85,6 +90,7 @@ export interface PPTShapeElement { path: string; fixedRatio: boolean; fill: string; + gradient?: ShapeGradient; rotate?: number; outline?: PPTElementOutline; opacity?: number; diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue index ecfcd297..b1f491a1 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/index.vue @@ -53,7 +53,7 @@
主题配色:
- +