Skip to content

Commit

Permalink
feat: 快捷变量过滤掉布尔类型 (#10679)
Browse files Browse the repository at this point in the history
Co-authored-by: hezhihang <[email protected]>
  • Loading branch information
hzh11012 and hezhihang authored Jul 25, 2024
1 parent 1c3a045 commit 9246b00
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/amis-editor-core/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1518,7 +1518,10 @@ export function resolveQuickVariables(
const curOption = options[0];
const superOption = options[1];
const variables = (curOption.children || [])
.filter((item: any) => item.value !== selfName && item.rawType)
.filter(
(item: any) =>
item.value !== selfName && item.rawType && item.rawType !== 'boolean'
)
.map((item: any) => {
// 子表过滤成员那层
if (item.type === 'array' && Array.isArray(item.children)) {
Expand All @@ -1536,7 +1539,8 @@ export function resolveQuickVariables(
});
if (superOption?.children?.length) {
const superVars = superOption?.children.filter(
(item: any) => item.rawType && item.type !== 'array'
(item: any) =>
item.rawType && item.rawType !== 'boolean' && item.type !== 'array'
);
finalVars.push(...superVars);
finalVars.push({
Expand Down

0 comments on commit 9246b00

Please sign in to comment.