fix(查询组件): 时间粒度切换时动态时间自动切换

This commit is contained in:
dataeaseShu 2024-01-30 16:29:47 +08:00
parent 3c34800c7a
commit 714868c14b

View File

@ -688,6 +688,12 @@ const timeGranularityMultipleChange = (val: string) => {
) {
curComponent.value.relativeToCurrentType = 'year'
}
if (
['yearrange', 'monthrange', 'datetimerange'].indexOf(val) <
['year', 'month', 'date'].indexOf(curComponent.value.relativeToCurrentTypeRange)
) {
curComponent.value.relativeToCurrentTypeRange = 'year'
}
}
const aroundList = [
{