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 | 7 | export const option = { |
8 | 8 | dataset: '我是标题', |
9 | 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 | 11 | fontSize: 20, |
23 | 12 | fontPos: { |
24 | 13 | x: 0, | ... | ... |
... | ... | @@ -20,22 +20,12 @@ |
20 | 20 | <n-button size="small" @click="optionData.attribute.fontColor = '#2AFFFF'"> 恢复默认 </n-button> |
21 | 21 | </SettingItem> |
22 | 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 | 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 | 26 | </SettingItem> |
35 | 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 | 29 | </SettingItem> |
40 | 30 | </SettingItemBox> |
41 | 31 | </CollapseItem> | ... | ... |
... | ... | @@ -9,14 +9,14 @@ |
9 | 9 | > |
10 | 10 | <defs> |
11 | 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 | 14 | </linearGradient> |
15 | 15 | </defs> |
16 | 16 | <g opacity="1" :transform="`translate(0 ${h / 2 - 10}) rotate(0 248 17.5)`"> |
17 | 17 | <path |
18 | 18 | id="路径 13" |
19 | - :style="{ stroke: attribute.linearColors[2], strokeWidth: 1, strokeOpacity: 1 }" | |
19 | + :style="{ stroke: attribute.bgColor1, strokeWidth: 1, strokeOpacity: 1 }" | |
20 | 20 | :transform="`translate(8 12) rotate(0 243.5 8)`" |
21 | 21 | :d="`M0,0 L14.01,16 L${w},16`" |
22 | 22 | /> |
... | ... | @@ -39,27 +39,27 @@ |
39 | 39 | <path |
40 | 40 | id="圆形 15" |
41 | 41 | fill-rule="evenodd" |
42 | - :style="{ fill: attribute.linearColors[3] }" | |
42 | + :style="{ fill: attribute.bgColor1 }" | |
43 | 43 | transform="translate(6 10) rotate(0 2.5 2.5)" |
44 | 44 | opacity="1" |
45 | 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 | 47 | <path |
48 | 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 | 50 | transform="translate(3 7) rotate(0 5.5 5.5)" |
51 | 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 | 53 | <path |
54 | 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 | 56 | transform="translate(0 4) rotate(0 8.5 8.5)" |
57 | 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 | 59 | <path |
60 | 60 | id="圆形 16" |
61 | 61 | fill-rule="evenodd" |
62 | - :style="{ fill: attribute.linearColors[6] }" | |
62 | + :style="{ fill: attribute.bgColor1 }" | |
63 | 63 | transform="translate(2.5 12) rotate(0 1 1)" |
64 | 64 | opacity="1" |
65 | 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 | 67 | <path |
68 | 68 | id="圆形 16" |
69 | 69 | fill-rule="evenodd" |
70 | - :style="{ fill: attribute.linearColors[7] }" | |
70 | + :style="{ fill: attribute.bgColor1 }" | |
71 | 71 | transform="translate(12.5 12) rotate(0 1 1)" |
72 | 72 | opacity="1" |
73 | 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 | 75 | <path |
76 | 76 | id="圆形 16" |
77 | 77 | fill-rule="evenodd" |
78 | - :style="{ fill: attribute.linearColors[8] }" | |
78 | + :style="{ fill: attribute.bgColor1 }" | |
79 | 79 | transform="translate(8 6.5) rotate(0 1 1)" |
80 | 80 | opacity="1" |
81 | 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 | 83 | <path |
84 | 84 | id="圆形 17" |
85 | 85 | fill-rule="evenodd" |
86 | - :style="{ fill: attribute.linearColors[9] }" | |
86 | + :style="{ fill: attribute.bgColor1 }" | |
87 | 87 | :transform="`translate(${w - 5} 26) rotate(0 2 2)`" |
88 | 88 | opacity="1" |
89 | 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 " | ... | ... |