From 8025a298a2af08ad62464469553968bf8a651245 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Fri, 22 Aug 2025 14:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BA=BF=E6=AE=B5=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E8=83=8C=E6=99=AF=E4=BF=AE=E6=94=B9=E6=97=A0=E6=95=88?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/PolylineObject/index.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/Obj/Base/PolylineObject/index.js b/src/Obj/Base/PolylineObject/index.js index e184417..df4e412 100644 --- a/src/Obj/Base/PolylineObject/index.js +++ b/src/Obj/Base/PolylineObject/index.js @@ -825,7 +825,6 @@ class PolylineObject extends Base { set labelLineColor(v) { this.options.label.lineColor = v this.label.lineColor = v - let _this = this if (this._elms.labelLineColor) { this._elms.labelLineColor.forEach((item, i) => { let lineColorPicker = new YJColorPicker({ @@ -840,6 +839,29 @@ class PolylineObject extends Base { }, //点击确认按钮事件回调 clear: () => { this.labelLineColor = 'rgba(0,255,255,0.5)' + } //点击清空按钮事件回调 + }) + this._elms.labelLineColor[i] = lineColorPicker + }) + } + } + + get labelBackgroundColorStart() { + return this.options.label.backgroundColor[0] + } + set labelBackgroundColorStart(v) { + this.options.label.backgroundColor[0] = v + this.label.backgroundColor = [v, this.label.backgroundColor[1]] + if (this._elms.labelBackgroundColorStart) { + this._elms.labelBackgroundColorStart.forEach((item, i) => { + let labelBackgroundColorStartPicker = new YJColorPicker({ + el: item.el, + size: 'mini', //颜色box类型 + alpha: true, //是否开启透明度 + defaultColor: this.labelBackgroundColorStart, + disabled: false, //是否禁止打开颜色选择器 + openPickerAni: 'opacity', //打开颜色选择器动画 + sure: color => { this.labelBackgroundColorStart = color }, //点击确认按钮事件回调 clear: () => { @@ -848,7 +870,7 @@ class PolylineObject extends Base { }) this._elms.labelBackgroundColorStart[ i - ] = _this.labelBackgroundColorStartPicker + ] = labelBackgroundColorStartPicker }) } }