Commit 6aa9ce7057bcb960edb07869eedeaed53cc6a397
1 parent
c063a479
fix(src/packages/): 优化小组件下小标题1右边配置装饰
Showing
3 changed files
with
25 additions
and
26 deletions
@@ -7,14 +7,15 @@ import { chartInitConfig } from '@/settings/designSetting' | @@ -7,14 +7,15 @@ import { chartInitConfig } from '@/settings/designSetting' | ||
7 | export const option = { | 7 | export const option = { |
8 | dataset: '我是标题', | 8 | dataset: '我是标题', |
9 | attribute: { | 9 | attribute: { |
10 | - linearColors: ['#0559A3', '#0654A3', '#2AFFFF', '#2AFFFF', '#2affff', ' #2affff', '#16d9d9'], | 10 | + bgColor:'#0559A3', |
11 | + bgRightColor:'#2AFFFF', | ||
12 | + rect17:'#16D9D9', | ||
11 | fontSize: 20, | 13 | fontSize: 20, |
12 | fontPos: { | 14 | fontPos: { |
13 | x: 0, | 15 | x: 0, |
14 | y: 20 | 16 | y: 20 |
15 | }, | 17 | }, |
16 | fontColor: '#2AFFFF', | 18 | fontColor: '#2AFFFF', |
17 | - lineColor: '#2AFFFF' | ||
18 | } | 19 | } |
19 | } | 20 | } |
20 | 21 |
@@ -20,30 +20,28 @@ | @@ -20,30 +20,28 @@ | ||
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.bgColor"></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.bgColor = '#0559A3'"> 恢复默认 </n-button> |
39 | </SettingItem> | 29 | </SettingItem> |
40 | </SettingItemBox> | 30 | </SettingItemBox> |
41 | - <SettingItemBox :name="`装饰颜色8`"> | 31 | + <SettingItemBox :name="`右边装饰`"> |
42 | <SettingItem name="颜色"> | 32 | <SettingItem name="颜色"> |
43 | - <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.lineColor"></n-color-picker> | 33 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgRightColor"></n-color-picker> |
44 | </SettingItem> | 34 | </SettingItem> |
45 | <SettingItem> | 35 | <SettingItem> |
46 | - <n-button size="small" @click="optionData.attribute.lineColor = '#2AFFFF'"> 恢复默认 </n-button> | 36 | + <n-button size="small" @click="optionData.attribute.bgRightColor = '#2AFFFF'"> 恢复默认 </n-button> |
37 | + </SettingItem> | ||
38 | + </SettingItemBox> | ||
39 | + <SettingItemBox :name="`装饰`"> | ||
40 | + <SettingItem name="颜色"> | ||
41 | + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.rect17"></n-color-picker> | ||
42 | + </SettingItem> | ||
43 | + <SettingItem> | ||
44 | + <n-button size="small" @click="optionData.attribute.rect17 = '#16D9D9'"> 恢复默认 </n-button> | ||
47 | </SettingItem> | 45 | </SettingItem> |
48 | </SettingItemBox> | 46 | </SettingItemBox> |
49 | </CollapseItem> | 47 | </CollapseItem> |
@@ -9,12 +9,12 @@ | @@ -9,12 +9,12 @@ | ||
9 | > | 9 | > |
10 | <defs> | 10 | <defs> |
11 | <linearGradient id="linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 11 | <linearGradient id="linear_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
12 | - <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" /> | ||
13 | - <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="0" /> | 12 | + <stop offset="0" :stop-color="attribute.bgColor" stop-opacity="1" /> |
13 | + <stop offset="1" :stop-color="attribute.bgColor" stop-opacity="0" /> | ||
14 | </linearGradient> | 14 | </linearGradient> |
15 | <linearGradient id="linear_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> | 15 | <linearGradient id="linear_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox"> |
16 | - <stop offset="0" :stop-color="attribute.linearColors[2]" stop-opacity="0" /> | ||
17 | - <stop offset="1" :stop-color="attribute.linearColors[3]" stop-opacity="0.2" /> | 16 | + <stop offset="0" :stop-color="attribute.bgRightColor" stop-opacity="0" /> |
17 | + <stop offset="1" :stop-color="attribute.bgRightColor" stop-opacity="0.2" /> | ||
18 | </linearGradient> | 18 | </linearGradient> |
19 | </defs> | 19 | </defs> |
20 | <g opacity="1" transform="translate(0 0) rotate(0 246 15)"> | 20 | <g opacity="1" transform="translate(0 0) rotate(0 246 15)"> |
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | <path | 45 | <path |
46 | id="矩形 21" | 46 | id="矩形 21" |
47 | fill-rule="evenodd" | 47 | fill-rule="evenodd" |
48 | - :style="{ fill: attribute.lineColor }" | 48 | + :style="{ fill: attribute.bgRightColor }" |
49 | transform="translate(0 0) rotate(0 0.5 15)" | 49 | transform="translate(0 0) rotate(0 0.5 15)" |
50 | opacity="1" | 50 | opacity="1" |
51 | :d="`M0,${h}L1,${h}L1,0L0,0L0,${h}Z`" | 51 | :d="`M0,${h}L1,${h}L1,0L0,0L0,${h}Z`" |
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <path | 54 | <path |
55 | id="矩形 22" | 55 | id="矩形 22" |
56 | fill-rule="evenodd" | 56 | fill-rule="evenodd" |
57 | - :style="{ fill: attribute.linearColors[4] }" | 57 | + :style="{ fill: attribute.rect17 }" |
58 | transform="translate(2 0) rotate(0 5.5 3.5)" | 58 | transform="translate(2 0) rotate(0 5.5 3.5)" |
59 | opacity="1" | 59 | opacity="1" |
60 | :d="`M6,7 L11,7 L5,0 L0,0 L6,7 Z`" | 60 | :d="`M6,7 L11,7 L5,0 L0,0 L6,7 Z`" |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | <path | 62 | <path |
63 | id="圆形 7" | 63 | id="圆形 7" |
64 | fill-rule="evenodd" | 64 | fill-rule="evenodd" |
65 | - :style="{ fill: attribute.linearColors[5] }" | 65 | + :style="{ fill: attribute.rect17 }" |
66 | transform="translate(0 5) rotate(0 2 2)" | 66 | transform="translate(0 5) rotate(0 2 2)" |
67 | opacity="1" | 67 | opacity="1" |
68 | :d="`M2,0 C0.9,0 0,0.9 0,2 C0,3.1 0.9,4 2,4 C3.1,4 4,3.1 4,2 C4,0.9 3.1,0 2,0 Z`" | 68 | :d="`M2,0 C0.9,0 0,0.9 0,2 C0,3.1 0.9,4 2,4 C3.1,4 4,3.1 4,2 C4,0.9 3.1,0 2,0 Z`" |
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | <path | 70 | <path |
71 | id="矩形 22" | 71 | id="矩形 22" |
72 | fill-rule="evenodd" | 72 | fill-rule="evenodd" |
73 | - :style="{ fill: attribute.linearColors[6] }" | 73 | + :style="{ fill: attribute.rect17 }" |
74 | transform="translate(2 7) rotate(0 5.5 3.5)" | 74 | transform="translate(2 7) rotate(0 5.5 3.5)" |
75 | opacity="1" | 75 | opacity="1" |
76 | :d="`M6,0L0,7L5,7L11,0L6,0Z `" | 76 | :d="`M6,0L0,7L5,7L11,0L6,0Z `" |