From c4713097a0dbe588436f2354359d6436460919e6 Mon Sep 17 00:00:00 2001 From: lxr-cel <756422071@qq.com> Date: Thu, 4 Jan 2024 23:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=82=B9=E6=B8=90=E5=8F=98=E8=89=B2we?= =?UTF-8?q?b=E7=A4=BA=E4=BE=8B=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/lang/zh_cn.js | 5 +- web/src/pages/Edit/components/Style.vue | 76 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index 5482a1e7..1d748513 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -200,7 +200,10 @@ export default { line: '线条', nodePadding: '节点内边距', horizontal: '水平', - vertical: '垂直' + vertical: '垂直', + gradientStyle: '渐变', + startColor: '起始', + endColor: '结束' }, theme: { title: '主题', diff --git a/web/src/pages/Edit/components/Style.vue b/web/src/pages/Edit/components/Style.vue index 197728e4..3106b487 100644 --- a/web/src/pages/Edit/components/Style.vue +++ b/web/src/pages/Edit/components/Style.vue @@ -249,6 +249,48 @@ +
+
+ {{ $t('style.gradientStyle') }} +
+ {{style.gradientStyle ? '渐变' : '单一'}} +
+
+
+ {{ $t('style.startColor') }} + + + + +
+
+ {{ $t('style.endColor') }} + + + + +
+
{{ $t('style.shape') }}
@@ -601,6 +643,40 @@ export default { changeFillColor(color) { this.style.fillColor = color this.update('fillColor') + }, + + /** + * @Author: lxr_cel + * @Date: 2024-01-02 10:28:17 + * @Desc: 切换渐变背景 + */ + toggleGradientStyle() { + if (this.style.gradientStyle === false) { + this.style.gradientStyle = true + } else { + this.style.gradientStyle = false + } + this.update('gradientStyle') + }, + + /** + * @Author: lxr_cel + * @Date: 2024-01-02 11:09:27 + * @Desc: 切换渐变开始颜色 + */ + changeStartColor(color) { + this.style.startColor = color; + this.update('startColor') + }, + + /** + * @Author: lxr_cel + * @Date: 2024-01-02 10:10:34 + * @Desc: 切换渐变结束颜色 + */ + changeEndColor(color) { + this.style.endColor = color; + this.update('endColor') } } }