Commit 43378e43f59865e340fd82b60fd98a3d8a3d414e

Authored by fengwotao
1 parent 6aa9ce70

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

... ... @@ -36,7 +36,7 @@
36 36 <n-button size="small" @click="optionData.attribute.bgRightColor = '#2AFFFF'"> 恢复默认 </n-button>
37 37 </SettingItem>
38 38 </SettingItemBox>
39   - <SettingItemBox :name="`装饰`">
  39 + <SettingItemBox :name="`矩形装饰`">
40 40 <SettingItem name="颜色">
41 41 <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.rect17"></n-color-picker>
42 42 </SettingItem>
... ...
... ... @@ -7,7 +7,11 @@ import { chartInitConfig } from '@/settings/designSetting'
7 7 export const option = {
8 8 dataset: '我是标题',
9 9 attribute: {
10   - linearColors: ['#21649C', '#060F1E', '#2AFFFF', '#000000', '#ffcc33', '#ffcc33'],
  10 + bgLeftColor1:'#21649C',
  11 + bgLeftColor2:'#060F1E',
  12 + bgLeftColor3:'#2AFFFF',
  13 + bgLeftColor4:'#000000',
  14 + rect19:'#FFCC33',
11 15 fontSize: 20,
12 16 fontPos: {
13 17 x: 0,
... ...
... ... @@ -20,22 +20,44 @@
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="`左边装饰1`">
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.bgLeftColor1"></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.bgLeftColor1 = '#21649C'"> 恢复默认 </n-button>
  29 + </SettingItem>
  30 + </SettingItemBox>
  31 + <SettingItemBox :name="`右边装饰1`">
  32 + <SettingItem name="颜色">
  33 + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgLeftColor2"></n-color-picker>
  34 + </SettingItem>
  35 + <SettingItem>
  36 + <n-button size="small" @click="optionData.attribute.bgLeftColor2 = '#060F1E'"> 恢复默认 </n-button>
  37 + </SettingItem>
  38 + </SettingItemBox>
  39 + <SettingItemBox :name="`右边装饰3`">
  40 + <SettingItem name="颜色">
  41 + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgLeftColor3"></n-color-picker>
  42 + </SettingItem>
  43 + <SettingItem>
  44 + <n-button size="small" @click="optionData.attribute.bgLeftColor3 = '#2AFFFF'"> 恢复默认 </n-button>
  45 + </SettingItem>
  46 + </SettingItemBox>
  47 + <SettingItemBox :name="`右边装饰4`">
  48 + <SettingItem name="颜色">
  49 + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.bgLeftColor4"></n-color-picker>
  50 + </SettingItem>
  51 + <SettingItem>
  52 + <n-button size="small" @click="optionData.attribute.bgLeftColor4 = '#000000'"> 恢复默认 </n-button>
  53 + </SettingItem>
  54 + </SettingItemBox>
  55 + <SettingItemBox :name="`矩形装饰`">
  56 + <SettingItem name="颜色">
  57 + <n-color-picker size="small" :modes="['hex']" v-model:value="optionData.attribute.rect19"></n-color-picker>
  58 + </SettingItem>
  59 + <SettingItem>
  60 + <n-button size="small" @click="optionData.attribute.rect19 = '#FFCC33'"> 恢复默认 </n-button>
39 61 </SettingItem>
40 62 </SettingItemBox>
41 63 </CollapseItem>
... ...
... ... @@ -3,12 +3,12 @@
3 3 <svg :width="w" :height="h" fill="none">
4 4 <defs xmlns="http://www.w3.org/2000/svg">
5 5 <linearGradient id="title2_0" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox">
6   - <stop offset="0" :stop-color="attribute.linearColors[0]" stop-opacity="1" />
7   - <stop offset="1" :stop-color="attribute.linearColors[1]" stop-opacity="1" />
  6 + <stop offset="0" :stop-color="attribute.bgLeftColor1" stop-opacity="1" />
  7 + <stop offset="1" :stop-color="attribute.bgLeftColor2" stop-opacity="1" />
8 8 </linearGradient>
9 9 <linearGradient id="title2_1" x1="0%" y1="50%" x2="100%" y2="50%" gradientUnits="objectBoundingBox">
10   - <stop offset="0" :stop-color="attribute.linearColors[3]" stop-opacity="1" />
11   - <stop offset="1" :stop-color="attribute.linearColors[4]" stop-opacity="0" />
  10 + <stop offset="0" :stop-color="attribute.bgLeftColor3" stop-opacity="1" />
  11 + <stop offset="1" :stop-color="attribute.bgLeftColor4" stop-opacity="0" />
12 12 </linearGradient>
13 13 </defs>
14 14 <g opacity="1" transform="translate(0 0) rotate(0 160 15)">
... ... @@ -47,7 +47,7 @@
47 47 <path
48 48 id="矩形 title2_d"
49 49 fill-rule="evenodd"
50   - :style="{ fill: attribute.linearColors[4] }"
  50 + :style="{ fill: attribute.rect19 }"
51 51 :transform="`translate(9 ${h / 2 - 15 / 2}) rotate(0 3.5 7.5)`"
52 52 opacity="1"
53 53 d="M0,15L2,15L7,0L5,0L0,15Z "
... ... @@ -55,7 +55,7 @@
55 55 <path
56 56 id="矩形 title2_d"
57 57 fill-rule="evenodd"
58   - :style="{ fill: attribute.linearColors[5] }"
  58 + :style="{ fill: attribute.rect19}"
59 59 :transform="`translate(15 ${h / 2 - 15 / 2}) rotate(0 3.5 7.5)`"
60 60 opacity="1"
61 61 d="M0,15L2,15L7,0L5,0L0,15Z "
... ...