From 6c8236c76bd5a1b78cd8fd51c685121e05e936db Mon Sep 17 00:00:00 2001 From: ryannz Date: Thu, 26 Mar 2020 00:17:21 +0800 Subject: [PATCH] feat: add label background --- src/shape/shapeBase.ts | 2 +- src/types/index.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/shape/shapeBase.ts b/src/shape/shapeBase.ts index 96799305a3..5f59462b46 100644 --- a/src/shape/shapeBase.ts +++ b/src/shape/shapeBase.ts @@ -310,7 +310,7 @@ export const shapeBase: ShapeOptions = { } else { // 所有生效的 state 的样式 const enableStatesStyle = clone(item.getCurrentStatesStyle()); - + // 原始样式 const originStyle = clone(item.getOriginStyle()); diff --git a/src/types/index.ts b/src/types/index.ts index a72a6b7c72..d28854d517 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -142,6 +142,12 @@ export type LabelStyle = Partial<{ position: string; textBaseline: string; offset: number; + background?: { + fill?: string; + stroke?: string; + radius?: number[] | number; + padding?: number[] | number; + }; }>; export type Easeing =