config.vue
1.78 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
<template>
<collapse-item name="按钮配置" :expanded="true">
<setting-item-box name="默认值" :alone="true">
<n-select size="small" v-model:value="optionData.buttonType" :options="buttonTypeOptions" />
</setting-item-box>
<setting-item-box name="跳转配置项" :alone="true">
<setting-item v-for="(item, index) in optionData.dataset" :key="index">
<n-input v-model:value="item.label" size="small" placeholder="按钮文字"></n-input>
<div style="height: 5px"></div>
<n-input v-model:value="item.currentButton" size="small" placeholder="当前按钮"></n-input>
<div style="height: 5px"></div>
<n-input v-model:value="item.targetButton" size="small" placeholder="目标按钮"></n-input>
<div style="height: 5px"></div>
<n-input v-model:value="item.current" size="small" placeholder="当前页面"></n-input>
<div style="height: 5px"></div>
<n-input v-model:value="item.target" size="small" placeholder="目标页面"></n-input>
<div style="height: 5px"></div>
</setting-item>
</setting-item-box>
</collapse-item>
</template>
<script lang="ts" setup>
import { PropType } from 'vue'
import { CollapseItem, SettingItemBox } from '@/components/Pages/ChartItemSetting'
import { option } from './config'
defineProps({
optionData: {
type: Object as PropType<typeof option>,
required: true
}
})
const buttonTypeOptions = [
{
label: 'default',
value: 'default'
},
{
label: 'primary',
value: 'primary'
},
{
label: 'tertiary',
value: 'tertiary'
},
{
label: 'info',
value: 'info'
},
{
label: 'success',
value: 'success'
},
{
label: 'warning',
value: 'warning'
},
{
label: 'error',
value: 'error'
}
]
</script>