config.vue
3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
<collapse-item name="下拉配置" :expanded="true">
<setting-item-box name="选择项" :alone="true">
<SettingItem name="选择项">
<n-select multiple size="small" v-model:value="optionData.selectValue" :options="optionData.dataset" />
</SettingItem>
</setting-item-box>
<setting-item-box name="文字颜色" :alone="true">
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.selectStyleOptions.textColor"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="optionData.selectStyleOptions.textColor = 'black'"> 恢复默认 </n-button>
</SettingItem>
</setting-item-box>
<setting-item-box name="背景颜色" :alone="true">
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.selectStyleOptions.textBackgroundColor"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="optionData.selectStyleOptions.textBackgroundColor = 'white'">
恢复默认
</n-button>
</SettingItem>
</setting-item-box>
<setting-item-box name="透明度" :alone="true">
<SettingItem name="透明度">
<n-input-number
:min="0"
:max="1"
v-model:value="optionData.selectStyleOptions.textBackgroundColorAlpha"
clearable
/>
</SettingItem>
</setting-item-box>
<setting-item-box name="弹出框背景色" :alone="true">
<SettingItem name="背景色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.selectStyleOptions.textSelectModalBackgroundColor"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="optionData.selectStyleOptions.textSelectModalBackgroundColor = 'white'">
恢复默认
</n-button>
</SettingItem>
</setting-item-box>
<setting-item-box name="弹出框文字颜色" :alone="true">
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.selectStyleOptions.textSelectModalTextColor"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="optionData.selectStyleOptions.textSelectModalTextColor = 'black'">
恢复默认
</n-button>
</SettingItem>
</setting-item-box>
<setting-item-box name="图标颜色" :alone="true">
<SettingItem name="颜色">
<n-color-picker
size="small"
:modes="['hex']"
v-model:value="optionData.selectStyleOptions.iconColor"
></n-color-picker>
</SettingItem>
<SettingItem>
<n-button size="small" @click="optionData.selectStyleOptions.iconColor = 'black'"> 恢复默认 </n-button>
</SettingItem>
</setting-item-box>
</collapse-item>
</template>
<script lang="ts" setup>
import { PropType } from 'vue'
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
import { option } from './config'
defineProps({
optionData: {
type: Object as PropType<typeof option>,
required: true
}
})
</script>