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')
}
}
}