forked from github/dataease
fix(查询组件): 时间粒度切换时动态时间自动切换
This commit is contained in:
parent
3c34800c7a
commit
714868c14b
@ -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 = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user