Commit 8e013295cceebcb95dfffdf5ca464ba6b07646b6

Authored by fengwotao
1 parent f9b8509f

fix(src/packages/): 优化小组件下装饰10右边配置装饰

@@ -7,20 +7,12 @@ import { chartInitConfig } from '@/settings/designSetting' @@ -7,20 +7,12 @@ import { chartInitConfig } from '@/settings/designSetting'
7 export const option = { 7 export const option = {
8 dataset: '', 8 dataset: '',
9 attribute: { 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 <template> 1 <template>
2 <CollapseItem name="配置" :expanded="true"> 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 <SettingItem name="颜色"> 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 </SettingItem> 6 </SettingItem>
15 <SettingItem> 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 </SettingItem> 49 </SettingItem>
20 </SettingItemBox> 50 </SettingItemBox>
21 </CollapseItem> 51 </CollapseItem>
@@ -67,8 +67,8 @@ @@ -67,8 +67,8 @@
67 y2="97.23011363636364%" 67 y2="97.23011363636364%"
68 gradientUnits="objectBoundingBox" 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 </linearGradient> 72 </linearGradient>
73 <linearGradient 73 <linearGradient
74 id="decorates10_linear_1" 74 id="decorates10_linear_1"
@@ -78,8 +78,8 @@ @@ -78,8 +78,8 @@
78 y2="39.858217592598066%" 78 y2="39.858217592598066%"
79 gradientUnits="objectBoundingBox" 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 </linearGradient> 83 </linearGradient>
84 <linearGradient 84 <linearGradient
85 id="decorates10_linear_2" 85 id="decorates10_linear_2"
@@ -89,8 +89,8 @@ @@ -89,8 +89,8 @@
89 y2="39.858217592598066%" 89 y2="39.858217592598066%"
90 gradientUnits="objectBoundingBox" 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 </linearGradient> 94 </linearGradient>
95 <linearGradient 95 <linearGradient
96 id="linear_3" 96 id="linear_3"
@@ -100,8 +100,8 @@ @@ -100,8 +100,8 @@
100 y2="98.39106206293707%" 100 y2="98.39106206293707%"
101 gradientUnits="objectBoundingBox" 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 </linearGradient> 105 </linearGradient>
106 <filter 106 <filter
107 id="decorates10_filter_6" 107 id="decorates10_filter_6"
@@ -135,8 +135,8 @@ @@ -135,8 +135,8 @@
135 y2="98.39106206293707%" 135 y2="98.39106206293707%"
136 gradientUnits="objectBoundingBox" 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 </linearGradient> 140 </linearGradient>
141 <filter 141 <filter
142 id="decorates10_filter_7" 142 id="decorates10_filter_7"
@@ -170,8 +170,8 @@ @@ -170,8 +170,8 @@
170 y2="98.39106206293707%" 170 y2="98.39106206293707%"
171 gradientUnits="objectBoundingBox" 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 </linearGradient> 175 </linearGradient>
176 <filter 176 <filter
177 id="decorates10_filter_8" 177 id="decorates10_filter_8"