Commit 8e013295cceebcb95dfffdf5ca464ba6b07646b6
1 parent
f9b8509f
fix(src/packages/): 优化小组件下装饰10右边配置装饰
Showing
3 changed files
with
61 additions
and
39 deletions
... | ... | @@ -7,20 +7,12 @@ import { chartInitConfig } from '@/settings/designSetting' |
7 | 7 | export const option = { |
8 | 8 | dataset: '', |
9 | 9 | attribute: { |
10 | - colors: [ | |
11 | - '#22EB5F', | |
12 | - '#C48613', | |
13 | - '#FFFFFF', | |
14 | - '#39EF71', | |
15 | - '#FFFFFF', | |
16 | - '#39EF71', | |
17 | - '#CAFFE1', | |
18 | - '#04E848', | |
19 | - '#CAFFE1', | |
20 | - '#04E848', | |
21 | - '#CAFFE1', | |
22 | - '#04E848' | |
23 | - ] | |
10 | + bgColor1:'#22EB5F', | |
11 | + bgColor2:'#C48613', | |
12 | + bgColor3:'#FFFFFF', | |
13 | + bgColor4:'#39EF71', | |
14 | + bgColor5:'#CAFFE1', | |
15 | + bgColor6:'#04E848', | |
24 | 16 | } |
25 | 17 | } |
26 | 18 | ... | ... |
1 | 1 | <template> |
2 | 2 | <CollapseItem name="配置" :expanded="true"> |
3 | - <SettingItemBox | |
4 | - :name="`装饰颜色-${index + 1}`" | |
5 | - v-for="(item, index) in optionData.attribute.colors" | |
6 | - :key="index" | |
7 | - > | |
3 | + <SettingItemBox :name="`装饰1`"> | |
8 | 4 | <SettingItem name="颜色"> |
9 | - <n-color-picker | |
10 | - size="small" | |
11 | - :modes="['hex']" | |
12 | - v-model:value="optionData.attribute.colors[index]" | |
13 | - ></n-color-picker> | |
5 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor1"></n-color-picker> | |
14 | 6 | </SettingItem> |
15 | 7 | <SettingItem> |
16 | - <n-button size="small" @click="optionData.attribute.colors[index] = option.attribute.colors[index]"> | |
17 | - 恢复默认 | |
18 | - </n-button> | |
8 | + <n-button size="small" @click="optionData.attribute.bgColor1 = '#22EB5F'"> 恢复默认 </n-button> | |
9 | + </SettingItem> | |
10 | + </SettingItemBox> | |
11 | + <SettingItemBox :name="`装饰2`"> | |
12 | + <SettingItem name="颜色"> | |
13 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor2"></n-color-picker> | |
14 | + </SettingItem> | |
15 | + <SettingItem> | |
16 | + <n-button size="small" @click="optionData.attribute.bgColor2 = '#C48613'"> 恢复默认 </n-button> | |
17 | + </SettingItem> | |
18 | + </SettingItemBox> | |
19 | + <SettingItemBox :name="`装饰3`"> | |
20 | + <SettingItem name="颜色"> | |
21 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor3"></n-color-picker> | |
22 | + </SettingItem> | |
23 | + <SettingItem> | |
24 | + <n-button size="small" @click="optionData.attribute.bgColor3 = '#FFFFFF'"> 恢复默认 </n-button> | |
25 | + </SettingItem> | |
26 | + </SettingItemBox> | |
27 | + <SettingItemBox :name="`装饰4`"> | |
28 | + <SettingItem name="颜色"> | |
29 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor4"></n-color-picker> | |
30 | + </SettingItem> | |
31 | + <SettingItem> | |
32 | + <n-button size="small" @click="optionData.attribute.bgColor4 = '#39EF71'"> 恢复默认 </n-button> | |
33 | + </SettingItem> | |
34 | + </SettingItemBox> | |
35 | + <SettingItemBox :name="`装饰5`"> | |
36 | + <SettingItem name="颜色"> | |
37 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor5"></n-color-picker> | |
38 | + </SettingItem> | |
39 | + <SettingItem> | |
40 | + <n-button size="small" @click="optionData.attribute.bgColor5 = '#CAFFE1'"> 恢复默认 </n-button> | |
41 | + </SettingItem> | |
42 | + </SettingItemBox> | |
43 | + <SettingItemBox :name="`装饰6`"> | |
44 | + <SettingItem name="颜色"> | |
45 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgColor6"></n-color-picker> | |
46 | + </SettingItem> | |
47 | + <SettingItem> | |
48 | + <n-button size="small" @click="optionData.attribute.bgColor6 = '#04E848'"> 恢复默认 </n-button> | |
19 | 49 | </SettingItem> |
20 | 50 | </SettingItemBox> |
21 | 51 | </CollapseItem> | ... | ... |
... | ... | @@ -67,8 +67,8 @@ |
67 | 67 | y2="97.23011363636364%" |
68 | 68 | gradientUnits="objectBoundingBox" |
69 | 69 | > |
70 | - <stop offset="0" :stop-color="attribute.colors[0]" stop-opacity="1" /> | |
71 | - <stop offset="1" :stop-color="attribute.colors[1]" stop-opacity="0" /> | |
70 | + <stop offset="0" :stop-color="attribute.bgColor1" stop-opacity="1" /> | |
71 | + <stop offset="1" :stop-color="attribute.bgColor2" stop-opacity="0" /> | |
72 | 72 | </linearGradient> |
73 | 73 | <linearGradient |
74 | 74 | id="decorates10_linear_1" |
... | ... | @@ -78,8 +78,8 @@ |
78 | 78 | y2="39.858217592598066%" |
79 | 79 | gradientUnits="objectBoundingBox" |
80 | 80 | > |
81 | - <stop offset="0" :stop-color="attribute.colors[2]" stop-opacity="0.15" /> | |
82 | - <stop offset="1" :stop-color="attribute.colors[3]" stop-opacity="1" /> | |
81 | + <stop offset="0" :stop-color="attribute.bgColor3" stop-opacity="0.15" /> | |
82 | + <stop offset="1" :stop-color="attribute.bgColor4" stop-opacity="1" /> | |
83 | 83 | </linearGradient> |
84 | 84 | <linearGradient |
85 | 85 | id="decorates10_linear_2" |
... | ... | @@ -89,8 +89,8 @@ |
89 | 89 | y2="39.858217592598066%" |
90 | 90 | gradientUnits="objectBoundingBox" |
91 | 91 | > |
92 | - <stop offset="0" :stop-color="attribute.colors[4]" stop-opacity="0.15" /> | |
93 | - <stop offset="1" :stop-color="attribute.colors[5]" stop-opacity="1" /> | |
92 | + <stop offset="0" :stop-color="attribute.bgColor3" stop-opacity="0.15" /> | |
93 | + <stop offset="1" :stop-color="attribute.bgColor4" stop-opacity="1" /> | |
94 | 94 | </linearGradient> |
95 | 95 | <linearGradient |
96 | 96 | id="linear_3" |
... | ... | @@ -100,8 +100,8 @@ |
100 | 100 | y2="98.39106206293707%" |
101 | 101 | gradientUnits="objectBoundingBox" |
102 | 102 | > |
103 | - <stop offset="0" :stop-color="attribute.colors[6]" stop-opacity="1" /> | |
104 | - <stop offset="1" :stop-color="attribute.colors[7]" stop-opacity="1" /> | |
103 | + <stop offset="0" :stop-color="attribute.bgColor5" stop-opacity="1" /> | |
104 | + <stop offset="1" :stop-color="attribute.bgColor6" stop-opacity="1" /> | |
105 | 105 | </linearGradient> |
106 | 106 | <filter |
107 | 107 | id="decorates10_filter_6" |
... | ... | @@ -135,8 +135,8 @@ |
135 | 135 | y2="98.39106206293707%" |
136 | 136 | gradientUnits="objectBoundingBox" |
137 | 137 | > |
138 | - <stop offset="0" :stop-color="attribute.colors[8]" stop-opacity="1" /> | |
139 | - <stop offset="1" :stop-color="attribute.colors[9]" stop-opacity="1" /> | |
138 | + <stop offset="0" :stop-color="attribute.bgColor5" stop-opacity="1" /> | |
139 | + <stop offset="1" :stop-color="attribute.bgColor6" stop-opacity="1" /> | |
140 | 140 | </linearGradient> |
141 | 141 | <filter |
142 | 142 | id="decorates10_filter_7" |
... | ... | @@ -170,8 +170,8 @@ |
170 | 170 | y2="98.39106206293707%" |
171 | 171 | gradientUnits="objectBoundingBox" |
172 | 172 | > |
173 | - <stop offset="0" :stop-color="attribute.colors[10]" stop-opacity="1" /> | |
174 | - <stop offset="1" :stop-color="attribute.colors[11]" stop-opacity="1" /> | |
173 | + <stop offset="0" :stop-color="attribute.bgColor5" stop-opacity="1" /> | |
174 | + <stop offset="1" :stop-color="attribute.bgColor6" stop-opacity="1" /> | |
175 | 175 | </linearGradient> |
176 | 176 | <filter |
177 | 177 | id="decorates10_filter_8" | ... | ... |