Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add indicator to all headers in event popup#1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
FalkWolsky merged 1 commit intodevfromevent_header_indicator
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletionclient/packages/lowcoder-design/src/components/Trees.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,7 +52,7 @@ const BranchStyle = css`
background-color: #d7d9e0;
}
`;
export const BranchDiv = styled.div<{ $type?: "inline" | "switch" }>`
export const BranchDiv = styled.div<{ $type?: "inline" | "switch"| "center"}>`
position: relative;
${BranchStyle}
${(props) => {
Expand DownExpand Up@@ -81,6 +81,16 @@ export const BranchDiv = styled.div<{ $type?: "inline" | "switch" }>`
bottom: 11px;
}
`;
case "center":
return css`
&::before {
top: calc(50% - 2px);
}

&::after {
top: 50%;
}
`;
default:
return css``;
}
Expand Down
30 changes: 18 additions & 12 deletionsclient/packages/lowcoder-design/src/components/keyValueList.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,6 +4,7 @@ import { TacoButton } from "./button";
import { ReactNode } from "react";
import { BluePlusIcon } from "icons";
import { trans } from "i18n/design";
import { BranchDiv } from "./Trees";

const KeyValueListItem = styled.div`
display: flex;
Expand DownExpand Up@@ -77,18 +78,23 @@ export const KeyValueList = (props: {
onAdd: () => void;
onDelete: (item: ReactNode, index: number) => void;
isStatic?: boolean;
}) => (
<>
indicatorForAll?: boolean;
}) => {
let IndicatorWrapper = ({children}: any) => (<>{children}</>);
if(props.indicatorForAll) IndicatorWrapper = BranchDiv;
return <>
{props.list.map((item, index) => (
<KeyValueListItem key={index /* FIXME: find a proper key instead of `index` */}>
{item}
{!props.isStatic &&
<DelIcon
onClick={() => props.list.length > 1 && props.onDelete(item, index)}
$forbidden={props.list.length === 1}
/>
}
</KeyValueListItem>
<IndicatorWrapper $type={"inline"} key={index}>
<KeyValueListItem key={index /* FIXME: find a proper key instead of `index` */}>
{item}
{!props.isStatic &&
<DelIcon
onClick={() => props.list.length > 1 && props.onDelete(item, index)}
$forbidden={props.list.length === 1}
/>
}
</KeyValueListItem>
</IndicatorWrapper>
))}
{!props.isStatic &&
<AddBtn onClick={props.onAdd}>
Expand All@@ -97,4 +103,4 @@ export const KeyValueList = (props: {
</AddBtn>
}
</>
);
};
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -61,6 +61,7 @@ const ExecuteQueryPropertyView = ({
layout: "vertical",
isStatic: true,
keyFixed: true,
indicatorForAll: true,
});
}, [comp.children.queryVariables.getView()])

Expand DownExpand Up@@ -89,11 +90,9 @@ const ExecuteQueryPropertyView = ({
)}
</EditorContext.Consumer>
</BranchDiv>
<BranchDiv>
<EditorContext.Consumer>
{(editorState) => getVariableOptions(editorState)}
</EditorContext.Consumer>
</BranchDiv>
<EditorContext.Consumer>
{(editorState) => getVariableOptions(editorState)}
</EditorContext.Consumer>
</>
);
}
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,6 +49,7 @@ export type KeyValueControlParams = ControlParams & {
valueFlexBasics?: number;
isStatic?: boolean;
keyFixed?: boolean;
indicatorForAll?: boolean;
};

/**
Expand DownExpand Up@@ -143,6 +144,7 @@ export function keyValueListControl<T extends OptionsType>(
onAdd={() => this.dispatch(this.pushAction({}))}
onDelete={(item, index) => this.dispatch(this.deleteAction(index))}
isStatic={params.isStatic}
indicatorForAll={params.indicatorForAll}
/>
</ControlPropertyViewWrapper>
);
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp