|
|
@@ -1,18 +1,26 @@
|
|
|
<template>
|
|
|
- <CollapseItem name="颜色" :expanded="true">
|
|
|
- <!-- <SettingItemBox
|
|
|
- name="图形"
|
|
|
- v-for="(item, index) in optionData.borderOptions.colors"
|
|
|
+ <CollapseItem name="边框" :expanded="true">
|
|
|
+ <SettingItemBox
|
|
|
+ :name="`颜色-${index + 1}`"
|
|
|
+ v-for="(item, index) in optionData.colors"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <SettingItem :name="`颜色-${index + 1}`">
|
|
|
+ <SettingItem name="颜色">
|
|
|
<n-color-picker
|
|
|
size="small"
|
|
|
:modes="['hex']"
|
|
|
- v-model:value="optionData.borderOptions.colors[index]"
|
|
|
+ v-model:value="optionData.colors[index]"
|
|
|
></n-color-picker>
|
|
|
</SettingItem>
|
|
|
- </SettingItemBox> -->
|
|
|
+ <SettingItem>
|
|
|
+ <n-button
|
|
|
+ size="small"
|
|
|
+ @click="optionData.colors[index] = option.colors[index]"
|
|
|
+ >
|
|
|
+ 恢复默认
|
|
|
+ </n-button>
|
|
|
+ </SettingItem>
|
|
|
+ </SettingItemBox>
|
|
|
</CollapseItem>
|
|
|
</template>
|
|
|
|
|
|
@@ -23,11 +31,11 @@ import {
|
|
|
SettingItemBox,
|
|
|
SettingItem
|
|
|
} from '@/components/ChartItemSetting/index'
|
|
|
-import Config from './config'
|
|
|
+import { option } from './config'
|
|
|
|
|
|
const props = defineProps({
|
|
|
optionData: {
|
|
|
- type: Object as PropType<Config>,
|
|
|
+ type: Object as PropType<typeof option>,
|
|
|
required: true
|
|
|
}
|
|
|
})
|