49 lines
1.1 KiB
Vue
Raw Normal View History

2023-03-08 15:02:41 +08:00
<template>
<collapse-item name="时间配置" :expanded="true">
<setting-item-box name="基础">
2023-03-08 15:02:41 +08:00
<setting-item name="类型">
<n-select
v-model:value="props.optionData.componentInteractEventKey"
size="small"
:options="datePickerTypeOptions"
/>
2023-03-08 15:02:41 +08:00
</setting-item>
</setting-item-box>
2023-03-08 15:02:41 +08:00
<setting-item-box name="默认值" :alone="true">
2023-03-08 15:02:41 +08:00
<n-date-picker
size="small"
v-model:value="props.optionData.dataset"
:type="props.optionData.componentInteractEventKey"
2023-03-08 15:02:41 +08:00
/>
</setting-item-box>
</collapse-item>
2023-03-08 15:02:41 +08:00
</template>
<script lang="ts" setup>
import { PropType } from 'vue'
import { icon } from '@/plugins'
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'
2023-03-11 16:58:32 +08:00
import { option } from './config'
2023-03-08 15:02:41 +08:00
const { HelpOutlineIcon } = icon.ionicons5
const props = defineProps({
optionData: {
type: Object as PropType<typeof option>,
required: true
}
})
const datePickerTypeOptions = [
{
label: '具体日期',
2023-03-08 15:02:41 +08:00
value: 'date'
},
{
label: '日期范围',
value: 'daterange'
}
]
</script>