config.vue
977 Bytes
<template>
<collapse-item :name="t('information.TabConfig')" :expanded="true">
<setting-item-box :name="t('information.labelType')" :alone="true">
<n-select size="small" v-model:value="optionData.tabType" :options="tabTypeOptions" />
</setting-item-box>
<setting-item-box :name="t('common.defaultValueText')" :alone="true">
<n-select size="small" v-model:value="optionData.tabLabel" value-field="label" :options="optionData.dataset" />
</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 t = window['$t']
const tabTypeOptions = [
{
label: t('information.lin1'),
value: 'bar'
},
{
label: t('information.seg'),
value: 'segment'
}
]
</script>