1
|
<template>
|
1
|
<template>
|
2
|
<collapse-item name="标签页配置" :expanded="true">
|
2
|
<collapse-item name="标签页配置" :expanded="true">
|
3
|
<setting-item-box name="默认值" :alone="true">
|
3
|
<setting-item-box name="默认值" :alone="true">
|
4
|
- <n-select size="small" v-model:value="optionData.tabType" :options="tabTypeOptions" />
|
4
|
+ <n-select @change="handleSelect" size="small" v-model:value="optionData.tabType" :options="tabTypeOptions" />
|
|
|
5
|
+ </setting-item-box>
|
|
|
6
|
+ <setting-item-box name="未激活文字颜色" :alone="true">
|
|
|
7
|
+ <SettingItem name="颜色">
|
|
|
8
|
+ <n-color-picker
|
|
|
9
|
+ size="small"
|
|
|
10
|
+ :modes="['hex']"
|
|
|
11
|
+ v-model:value="optionData.tabStyleOptions.textColor"
|
|
|
12
|
+ ></n-color-picker>
|
|
|
13
|
+ </SettingItem>
|
|
|
14
|
+ <SettingItem>
|
|
|
15
|
+ <n-button size="small" @click="optionData.tabStyleOptions.textColor = 'green'"> 恢复默认 </n-button>
|
|
|
16
|
+ </SettingItem>
|
|
|
17
|
+ </setting-item-box>
|
|
|
18
|
+ <setting-item-box name="激活文字颜色" :alone="true">
|
|
|
19
|
+ <SettingItem name="颜色">
|
|
|
20
|
+ <n-color-picker
|
|
|
21
|
+ size="small"
|
|
|
22
|
+ :modes="['hex']"
|
|
|
23
|
+ v-model:value="optionData.tabStyleOptions.textActiveColor"
|
|
|
24
|
+ ></n-color-picker>
|
|
|
25
|
+ </SettingItem>
|
|
|
26
|
+ <SettingItem>
|
|
|
27
|
+ <n-button size="small" @click="optionData.tabStyleOptions.textActiveColor = 'black'"> 恢复默认 </n-button>
|
|
|
28
|
+ </SettingItem>
|
|
|
29
|
+ </setting-item-box>
|
|
|
30
|
+ <setting-item-box v-if="optionData.tabType === 'bar'" name="导航条颜色" :alone="true">
|
|
|
31
|
+ <SettingItem name="颜色">
|
|
|
32
|
+ <n-color-picker
|
|
|
33
|
+ size="small"
|
|
|
34
|
+ :modes="['hex']"
|
|
|
35
|
+ v-model:value="optionData.tabStyleOptions.tabBarColor"
|
|
|
36
|
+ ></n-color-picker>
|
|
|
37
|
+ </SettingItem>
|
|
|
38
|
+ <SettingItem>
|
|
|
39
|
+ <n-button size="small" @click="optionData.tabStyleOptions.tabBarColor = 'green'"> 恢复默认 </n-button>
|
|
|
40
|
+ </SettingItem>
|
|
|
41
|
+ </setting-item-box>
|
|
|
42
|
+ <setting-item-box v-if="optionData.tabType === 'segment'" name="分段背景色" :alone="true">
|
|
|
43
|
+ <SettingItem name="颜色">
|
|
|
44
|
+ <n-color-picker
|
|
|
45
|
+ size="small"
|
|
|
46
|
+ :modes="['hex']"
|
|
|
47
|
+ v-model:value="optionData.tabStyleOptions.segmentBackgroundColor"
|
|
|
48
|
+ ></n-color-picker>
|
|
|
49
|
+ </SettingItem>
|
|
|
50
|
+ <SettingItem>
|
|
|
51
|
+ <n-button size="small" @click="optionData.tabStyleOptions.segmentBackgroundColor = 'grey'"> 恢复默认 </n-button>
|
|
|
52
|
+ </SettingItem>
|
|
|
53
|
+ </setting-item-box>
|
|
|
54
|
+ <setting-item-box v-if="optionData.tabType === 'segment'" name="分段激活背景色" :alone="true">
|
|
|
55
|
+ <SettingItem name="颜色">
|
|
|
56
|
+ <n-color-picker
|
|
|
57
|
+ size="small"
|
|
|
58
|
+ :modes="['hex']"
|
|
|
59
|
+ v-model:value="optionData.tabStyleOptions.segmentActiveColor"
|
|
|
60
|
+ ></n-color-picker>
|
|
|
61
|
+ </SettingItem>
|
|
|
62
|
+ <SettingItem>
|
|
|
63
|
+ <n-button size="small" @click="optionData.tabStyleOptions.segmentActiveColor = 'white'"> 恢复默认 </n-button>
|
|
|
64
|
+ </SettingItem>
|
5
|
</setting-item-box>
|
65
|
</setting-item-box>
|
6
|
</collapse-item>
|
66
|
</collapse-item>
|
7
|
</template>
|
67
|
</template>
|
|
@@ -11,7 +71,7 @@ import { PropType } from 'vue' |
|
@@ -11,7 +71,7 @@ import { PropType } from 'vue' |
11
|
import { CollapseItem, SettingItemBox } from '@/components/Pages/ChartItemSetting'
|
71
|
import { CollapseItem, SettingItemBox } from '@/components/Pages/ChartItemSetting'
|
12
|
import { option } from './config'
|
72
|
import { option } from './config'
|
13
|
|
73
|
|
14
|
-defineProps({
|
74
|
+const props = defineProps({
|
15
|
optionData: {
|
75
|
optionData: {
|
16
|
type: Object as PropType<typeof option>,
|
76
|
type: Object as PropType<typeof option>,
|
17
|
required: true
|
77
|
required: true
|
|
@@ -28,4 +88,11 @@ const tabTypeOptions = [ |
|
@@ -28,4 +88,11 @@ const tabTypeOptions = [ |
28
|
value: 'segment'
|
88
|
value: 'segment'
|
29
|
}
|
89
|
}
|
30
|
]
|
90
|
]
|
|
|
91
|
+
|
|
|
92
|
+const handleSelect = (e: string) => {
|
|
|
93
|
+ if (e === 'bar') {
|
|
|
94
|
+ props.optionData.tabStyleOptions.segmentActiveColor = ''
|
|
|
95
|
+ props.optionData.tabStyleOptions.segmentBackgroundColor = ''
|
|
|
96
|
+ }
|
|
|
97
|
+}
|
31
|
</script> |
98
|
</script> |