-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: 控件按钮圆角调整 (#101) Co-authored-by: yxh01132861 <[email protected]> Co-authored-by: simplexiao <[email protected]> * fix: 解决位置查询密钥问题 (#104) * fix: 解决位置查询密钥问题 * chore: 密钥混淆 * fix: 色带选择展示问题 (#103) * fix: 色带选择展示问题 * fix: 色带问题修复 * fix: 色带问题 * fix: 修复选择色带自动关闭情况 --------- Co-authored-by: yxh01132861 <[email protected]> Co-authored-by: yunji <[email protected]> * chore: publish version - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] - @antv/[email protected] * fix: 自定义色带遮挡问题 (#105) Co-authored-by: yxh01132861 <[email protected]> * chore: 备注 todo * fix: 筛选器更新问题 * fix: 字段选择器 bug * chore: 添加备注 --------- Co-authored-by: yxh01132861 <[email protected]> Co-authored-by: simplexiao <[email protected]>
- Loading branch information
1 parent
afb2f62
commit 4a0f025
Showing
46 changed files
with
340 additions
and
357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 44 additions & 22 deletions
66
packages/li-analysis-assets/src/widgets/FilterControl/Component/helper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,49 @@ | ||
import type { FilterConfig } from 'packages/li-p2'; | ||
import type { FilterConfigType } from 'packages/li-p2'; | ||
import type { FilterNode } from 'packages/li-sdk'; | ||
|
||
export const getFilterNodes = (list: FilterConfig[]) => { | ||
const _list = list.filter((item) => !(item.type === 'string' && item.value?.includes('all'))); | ||
export const getFilterNode = (filterConfig: FilterConfigType) => { | ||
let filterNode: FilterNode; | ||
|
||
const filterNodes = _list.map((item) => { | ||
return item.type === 'date' | ||
? { | ||
id: item.id, | ||
field: item.field, | ||
type: item.type, | ||
operator: item.operator, | ||
value: item.value, | ||
granularity: item.granularity, | ||
} | ||
: { | ||
id: item.id, | ||
field: item.field, | ||
type: item.type, | ||
operator: item.operator, | ||
value: item.value, | ||
}; | ||
}); | ||
switch (filterConfig.type) { | ||
case 'string': | ||
// 空值的情况,设置无效值; 全选情况,设置无效值; | ||
const value = filterConfig.value === undefined || filterConfig.value.includes('all') ? [] : filterConfig.value; | ||
filterNode = { | ||
id: filterConfig.id, | ||
field: filterConfig.field, | ||
type: filterConfig.type, | ||
operator: filterConfig.operator, | ||
value: value, | ||
}; | ||
break; | ||
case 'number': | ||
filterNode = { | ||
id: filterConfig.id, | ||
field: filterConfig.field, | ||
type: filterConfig.type, | ||
operator: filterConfig.operator, | ||
// 空值的情况,设置无效值 | ||
value: filterConfig.value || ([] as any), | ||
}; | ||
break; | ||
case 'date': | ||
filterNode = { | ||
id: filterConfig.id, | ||
field: filterConfig.field, | ||
type: filterConfig.type, | ||
operator: filterConfig.operator, | ||
// 空值的情况,设置无效值 | ||
value: filterConfig.value || (([] as unknown) as [string, string]), | ||
granularity: filterConfig.granularity, | ||
}; | ||
break; | ||
} | ||
|
||
return filterNodes as FilterNode[]; | ||
return filterNode; | ||
}; | ||
|
||
export const getFilterNodes = (list: FilterConfigType[]) => { | ||
const filterNodes = list.map((item) => getFilterNode(item)); | ||
|
||
return filterNodes; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.