fix: 修改闭合组件不规范的问题

This commit is contained in:
MTrun
2022-03-14 16:07:35 +08:00
parent 3747771078
commit 3a9f68384f
77 changed files with 395 additions and 332 deletions
@@ -1,27 +1,38 @@
<template>
<CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`柱状图-${index+1}`" :expanded="true">
<CollapseItem
v-for="(item, index) in seriesList"
:key="index"
:name="`柱状图-${index + 1}`"
:expanded="true"
>
<SettingItemBox name="图形">
<SettingItem name="颜色">
<n-color-picker size="small" :modes="['hex']" v-model:value="item.itemStyle.color" />
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="item.itemStyle.color"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="item.itemStyle.color = null">恢复默认</n-button>
<n-button size="small" @click="item.itemStyle.color = null">
恢复默认
</n-button>
</SettingItem>
<SettingItem name="宽度">
<n-input-number
<n-input-number
v-model:value="item.barWidth"
:min="1"
:max="100"
size="small"
placeholder="自动计算"
/>
></n-input-number>
</SettingItem>
<SettingItem name="圆角">
<n-input-number
<n-input-number
v-model:value="item.itemStyle.borderRadius"
:min="0"
size="small"
/>
></n-input-number>
</SettingItem>
</SettingItemBox>
</CollapseItem>
@@ -29,7 +40,11 @@
<script setup lang="ts">
import { PropType, computed } from 'vue'
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/ChartItemSetting/index'
import {
CollapseItem,
SettingItemBox,
SettingItem
} from '@/components/ChartItemSetting/index'
import { option } from './config'
const props = defineProps({
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option" autoresize />
<VChart :theme="themeColor" :option="option" autoresize></VChart>
</template>
<script setup lang="ts">
@@ -2,7 +2,7 @@
<CollapseItem v-for="(item, index) in seriesList" :key="index" :name="`柱状图-${index+1}`" :expanded="true">
<SettingItemBox name="图形">
<SettingItem name="颜色">
<n-color-picker size="small" :modes="['hex']" v-model:value="item.itemStyle.color" />
<n-color-picker size="small" :modes="['hex']" v-model:value="item.itemStyle.color"></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="item.itemStyle.color = null">恢复默认</n-button>
@@ -14,14 +14,14 @@
:max="100"
size="small"
placeholder="自动计算"
/>
></n-input-number>
</SettingItem>
<SettingItem name="圆角">
<n-input-number
v-model:value="item.itemStyle.borderRadius"
:min="0"
size="small"
/>
></n-input-number>
</SettingItem>
</SettingItemBox>
</CollapseItem>
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option" autoresize />
<VChart :theme="themeColor" :option="option" autoresize></VChart>
</template>
<script setup lang="ts">
@@ -11,14 +11,14 @@
size="small"
:modes="['hex']"
v-model:value="item.lineStyle.color.colorStops[0].color"
/>
></n-color-picker>
</SettingItem>
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="item.lineStyle.color.colorStops[1].color"
/>
></n-color-picker>
</SettingItem>
<SettingItem name="宽度">
<n-input-number
@@ -27,21 +27,21 @@
:max="100"
size="small"
placeholder="自动计算"
/>
></n-input-number>
</SettingItem>
<SettingItem name="类型">
<n-select
v-model:value="item.lineStyle.type"
size="small"
:options="lineConf.lineStyle.type"
/>
></n-select>
</SettingItem>
<SettingItem name="类型">
<n-select
v-model:value="item.lineStyle.type"
size="small"
:options="lineConf.lineStyle.type"
/>
></n-select>
</SettingItem>
</SettingItemBox>
<SettingItemBox name="阴影" :alone="true">
@@ -50,7 +50,7 @@
size="small"
:modes="['hex']"
v-model:value="item.lineStyle.shadowColor"
/>
></n-color-picker>
</SettingItem>
</SettingItemBox>
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option.options" autoresize />
<VChart :theme="themeColor" :option="option.options" autoresize></VChart>
</template>
<script setup lang="ts">
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option.options" autoresize />
<VChart :theme="themeColor" :option="option.options" autoresize></VChart>
</template>
<script setup lang="ts">
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option.options" autoresize />
<VChart :theme="themeColor" :option="option.options" autoresize></VChart>
</template>
<script setup lang="ts">
@@ -1,5 +1,5 @@
<template>
<VChart :theme="themeColor" :option="option" autoresize />
<VChart :theme="themeColor" :option="option" autoresize></VChart>
</template>
<script setup lang="ts">