Commit a3a4a3bef21feabe23540020c3c045964ffab916
1 parent
e6227706
fix(src/packages/): 优化小组件下小标题4右边配置装饰
Showing
3 changed files
with
14 additions
and
35 deletions
@@ -7,18 +7,7 @@ import { chartInitConfig } from '@/settings/designSetting' | @@ -7,18 +7,7 @@ import { chartInitConfig } from '@/settings/designSetting' | ||
7 | export const option = { | 7 | export const option = { |
8 | dataset: '我是标题', | 8 | dataset: '我是标题', |
9 | attribute: { | 9 | attribute: { |
10 | - linearColors: [ | ||
11 | - '#2AFFFF', | ||
12 | - '#2AFFFF', | ||
13 | - '#2affff', | ||
14 | - '#2affff', | ||
15 | - '#2affff', | ||
16 | - '#2affff', | ||
17 | - '#2affff', | ||
18 | - '#2affff', | ||
19 | - '#2affff', | ||
20 | - '#2affff', | ||
21 | - ], | 10 | + bgColor1:'#2AFFFF', |
22 | fontSize: 20, | 11 | fontSize: 20, |
23 | fontPos: { | 12 | fontPos: { |
24 | x: 0, | 13 | x: 0, |
@@ -20,22 +20,12 @@ | @@ -20,22 +20,12 @@ | ||
20 | <n-button size="small" @click="optionData.attribute.fontColor = '#2AFFFF'"> 恢复默认 </n-button> | 20 | <n-button size="small" @click="optionData.attribute.fontColor = '#2AFFFF'"> 恢复默认 </n-button> |
21 | </SettingItem> | 21 | </SettingItem> |
22 | </SettingItemBox> | 22 | </SettingItemBox> |
23 | - <SettingItemBox | ||
24 | - :name="`装饰颜色-${index + 1}`" | ||
25 | - v-for="(item, index) in optionData.attribute.linearColors" | ||
26 | - :key="index" | ||
27 | - > | 23 | + <SettingItemBox :name="`装饰`"> |
28 | <SettingItem name="颜色"> | 24 | <SettingItem name="颜色"> |
29 | - <n-color-picker | ||
30 | - size="small" | ||
31 | - :modes="['hex']" | ||
32 | - v-model:value="optionData.attribute.linearColors[index]" | ||
33 | - ></n-color-picker> | 25 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor1"></n-color-picker> |
34 | </SettingItem> | 26 | </SettingItem> |
35 | <SettingItem> | 27 | <SettingItem> |
36 | - <n-button size="small" @click="optionData.attribute.linearColors[index] = option.attribute.linearColors[index]"> | ||
37 | - 恢复默认 | ||
38 | - </n-button> | 28 | + <n-button size="small" @click="optionData.attribute.bgColor1 = '#2AFFFF'"> 恢复默认 </n-button> |
39 | </SettingItem> | 29 | </SettingItem> |
40 | </SettingItemBox> | 30 | </SettingItemBox> |
41 | </CollapseItem> | 31 | </CollapseItem> |
@@ -9,14 +9,14 @@ | @@ -9,14 +9,14 @@ | ||
9 | > | 9 | > |
10 | <defs> | 10 | <defs> |
11 | <linearGradient id="subtitle4_linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 11 | <linearGradient id="subtitle4_linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
12 | - <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="0.5" /> | ||
13 | - <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="0" /> | 12 | + <stop offset="0" :stop-color="attribute.bgColor1" stop-opacity="0.5" /> |
13 | + <stop offset="1" :stop-color="attribute.bgColor1" stop-opacity="0" /> | ||
14 | </linearGradient> | 14 | </linearGradient> |
15 | </defs> | 15 | </defs> |
16 | <g opacity="1" :transform="`translate(0 ${h / 2 - 10}) rotate(0 248 17.5)`"> | 16 | <g opacity="1" :transform="`translate(0 ${h / 2 - 10}) rotate(0 248 17.5)`"> |
17 | <path | 17 | <path |
18 | id="路径 13" | 18 | id="路径 13" |
19 | - :style="{ stroke: attribute.linearColors[2], strokeWidth: 1, strokeOpacity: 1 }" | 19 | + :style="{ stroke: attribute.bgColor1, strokeWidth: 1, strokeOpacity: 1 }" |
20 | :transform="`translate(8 12) rotate(0 243.5 8)`" | 20 | :transform="`translate(8 12) rotate(0 243.5 8)`" |
21 | :d="`M0,0 L14.01,16 L${w},16`" | 21 | :d="`M0,0 L14.01,16 L${w},16`" |
22 | /> | 22 | /> |
@@ -39,27 +39,27 @@ | @@ -39,27 +39,27 @@ | ||
39 | <path | 39 | <path |
40 | id="圆形 15" | 40 | id="圆形 15" |
41 | fill-rule="evenodd" | 41 | fill-rule="evenodd" |
42 | - :style="{ fill: attribute.linearColors[3] }" | 42 | + :style="{ fill: attribute.bgColor1 }" |
43 | transform="translate(6 10) rotate(0 2.5 2.5)" | 43 | transform="translate(6 10) rotate(0 2.5 2.5)" |
44 | opacity="1" | 44 | opacity="1" |
45 | d="M2.5,0C1.12,0 0,1.12 0,2.5C0,3.88 1.12,5 2.5,5C3.88,5 5,3.88 5,2.5C5,1.12 3.88,0 2.5,0Z " | 45 | d="M2.5,0C1.12,0 0,1.12 0,2.5C0,3.88 1.12,5 2.5,5C3.88,5 5,3.88 5,2.5C5,1.12 3.88,0 2.5,0Z " |
46 | /> | 46 | /> |
47 | <path | 47 | <path |
48 | id="圆形 15" | 48 | id="圆形 15" |
49 | - :style="{ stroke: attribute.linearColors[4], strokeWidth: 0.5, strokeOpacity: 0.5 }" | 49 | + :style="{ stroke: attribute.bgColor1, strokeWidth: 0.5, strokeOpacity: 0.5 }" |
50 | transform="translate(3 7) rotate(0 5.5 5.5)" | 50 | transform="translate(3 7) rotate(0 5.5 5.5)" |
51 | d="M5.5,0C2.46,0 0,2.46 0,5.5C0,8.54 2.46,11 5.5,11C8.54,11 11,8.54 11,5.5C11,2.46 8.54,0 5.5,0Z " | 51 | d="M5.5,0C2.46,0 0,2.46 0,5.5C0,8.54 2.46,11 5.5,11C8.54,11 11,8.54 11,5.5C11,2.46 8.54,0 5.5,0Z " |
52 | /> | 52 | /> |
53 | <path | 53 | <path |
54 | id="圆形 15" | 54 | id="圆形 15" |
55 | - :style="{ stroke: attribute.linearColors[5], strokeWidth: 0.5, strokeOpacity: 0.19 }" | 55 | + :style="{ stroke: attribute.bgColor1, strokeWidth: 0.5, strokeOpacity: 0.19 }" |
56 | transform="translate(0 4) rotate(0 8.5 8.5)" | 56 | transform="translate(0 4) rotate(0 8.5 8.5)" |
57 | d="M8.5,0C3.81,0 0,3.81 0,8.5C0,13.19 3.81,17 8.5,17C13.19,17 17,13.19 17,8.5C17,3.81 13.19,0 8.5,0Z " | 57 | d="M8.5,0C3.81,0 0,3.81 0,8.5C0,13.19 3.81,17 8.5,17C13.19,17 17,13.19 17,8.5C17,3.81 13.19,0 8.5,0Z " |
58 | /> | 58 | /> |
59 | <path | 59 | <path |
60 | id="圆形 16" | 60 | id="圆形 16" |
61 | fill-rule="evenodd" | 61 | fill-rule="evenodd" |
62 | - :style="{ fill: attribute.linearColors[6] }" | 62 | + :style="{ fill: attribute.bgColor1 }" |
63 | transform="translate(2.5 12) rotate(0 1 1)" | 63 | transform="translate(2.5 12) rotate(0 1 1)" |
64 | opacity="1" | 64 | opacity="1" |
65 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " | 65 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " |
@@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
67 | <path | 67 | <path |
68 | id="圆形 16" | 68 | id="圆形 16" |
69 | fill-rule="evenodd" | 69 | fill-rule="evenodd" |
70 | - :style="{ fill: attribute.linearColors[7] }" | 70 | + :style="{ fill: attribute.bgColor1 }" |
71 | transform="translate(12.5 12) rotate(0 1 1)" | 71 | transform="translate(12.5 12) rotate(0 1 1)" |
72 | opacity="1" | 72 | opacity="1" |
73 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " | 73 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " |
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | <path | 75 | <path |
76 | id="圆形 16" | 76 | id="圆形 16" |
77 | fill-rule="evenodd" | 77 | fill-rule="evenodd" |
78 | - :style="{ fill: attribute.linearColors[8] }" | 78 | + :style="{ fill: attribute.bgColor1 }" |
79 | transform="translate(8 6.5) rotate(0 1 1)" | 79 | transform="translate(8 6.5) rotate(0 1 1)" |
80 | opacity="1" | 80 | opacity="1" |
81 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " | 81 | d="M1,0C0.45,0 0,0.45 0,1C0,1.55 0.45,2 1,2C1.55,2 2,1.55 2,1C2,0.45 1.55,0 1,0Z " |
@@ -83,7 +83,7 @@ | @@ -83,7 +83,7 @@ | ||
83 | <path | 83 | <path |
84 | id="圆形 17" | 84 | id="圆形 17" |
85 | fill-rule="evenodd" | 85 | fill-rule="evenodd" |
86 | - :style="{ fill: attribute.linearColors[9] }" | 86 | + :style="{ fill: attribute.bgColor1 }" |
87 | :transform="`translate(${w - 5} 26) rotate(0 2 2)`" | 87 | :transform="`translate(${w - 5} 26) rotate(0 2 2)`" |
88 | opacity="1" | 88 | opacity="1" |
89 | d="M2,0C0.9,0 0,0.9 0,2C0,3.1 0.9,4 2,4C3.1,4 4,3.1 4,2C4,0.9 3.1,0 2,0Z " | 89 | d="M2,0C0.9,0 0,0.9 0,2C0,3.1 0.9,4 2,4C3.1,4 4,3.1 4,2C4,0.9 3.1,0 2,0Z " |