2023-03-08 15:02:41 +08:00
|
|
|
<template>
|
2023-03-14 22:19:55 +08:00
|
|
|
<collapse-item name="时间配置" :expanded="true">
|
|
|
|
<setting-item-box name="基础">
|
2023-03-08 15:02:41 +08:00
|
|
|
<setting-item name="类型">
|
2023-03-14 22:19:55 +08:00
|
|
|
<n-select
|
|
|
|
v-model:value="props.optionData.componentInteractEventKey"
|
|
|
|
size="small"
|
|
|
|
:options="datePickerTypeOptions"
|
|
|
|
/>
|
2023-03-08 15:02:41 +08:00
|
|
|
</setting-item>
|
2023-03-14 22:19:55 +08:00
|
|
|
</setting-item-box>
|
2023-03-08 15:02:41 +08:00
|
|
|
|
2023-03-14 22:19:55 +08:00
|
|
|
<setting-item-box name="默认值" :alone="true">
|
2023-03-08 15:02:41 +08:00
|
|
|
<n-date-picker
|
|
|
|
size="small"
|
2023-03-14 22:19:55 +08:00
|
|
|
v-model:value="props.optionData.dataset"
|
|
|
|
:type="props.optionData.componentInteractEventKey"
|
2023-03-08 15:02:41 +08:00
|
|
|
/>
|
2023-03-14 22:19:55 +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 = [
|
|
|
|
{
|
2023-03-14 22:19:55 +08:00
|
|
|
label: '具体日期',
|
2023-03-08 15:02:41 +08:00
|
|
|
value: 'date'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '日期范围',
|
|
|
|
value: 'daterange'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
</script>
|