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

Commit436283f

Browse files
feat: foldable components sections
1 parent14e8dc2 commit436283f

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

‎client/packages/lowcoder/src/pages/editor/right/uiCompPanel.tsx‎

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@ import { draggingUtils } from "layout";
88
import{isEmpty}from"lodash";
99
import{language}from"i18n";
1010
import{
11-
ComListTitle,
1211
CompIconDiv,
1312
EmptyCompContent,
1413
RightPanelContentWrapper,
1514
}from"pages/editor/right/styledComponent";
1615
import{tableDragClassName}from"pages/tutorials/tutorialsConstant";
1716
importReact,{useContext,useMemo}from"react";
1817
importstyledfrom"styled-components";
19-
import{labelCss}from"lowcoder-design";
18+
import{
19+
BaseSection,
20+
labelCss,
21+
}from"lowcoder-design";
2022
import{TransparentImg}from"../../../util/commonUtils";
2123
import{RightContext}from"./rightContext";
2224

23-
constGrayLabel=(props:{label:string})=>{
24-
const{ label}=props;
25-
return<ComListTitle>{label}</ComListTitle>;
26-
};
27-
2825
constCompDiv=styled.div`
2926
display: flex;
3027
flex-direction: column;
@@ -80,12 +77,10 @@ const InsertContain = styled.div`
8077
gap: 8px;
8178
`;
8279

83-
constCategoryLabel=styled(GrayLabel)`
84-
margin: 0;
85-
`;
86-
8780
constSectionWrapper=styled.div`
88-
margin-bottom: 16px;
81+
.section-header {
82+
margin-left: 0;
83+
}
8984
`;
9085

9186
exportconstUICompPanel=()=>{
@@ -122,26 +117,31 @@ export const UICompPanel = () => {
122117

123118
return(
124119
<SectionWrapperkey={index}>
125-
<CategoryLabellabel={uiCompCategoryNames[keyasUICompCategory]}/>
126-
<InsertContain>
127-
{infos.map((info)=>(
128-
<CompDivkey={info[0]}className={info[0]==="table" ?tableDragClassName :""}>
129-
<HovDiv
130-
draggable
131-
onDragStart={(e)=>{
132-
e.dataTransfer.setData("compType",info[0]);
133-
e.dataTransfer.setDragImage(TransparentImg,0,0);
134-
draggingUtils.setData("compType",info[0]);
135-
onDrag(info[0]);
136-
}}
137-
>
138-
<IconContainIcon={info[1].icon}></IconContain>
139-
</HovDiv>
140-
<CompNameLabel>{info[1].name}</CompNameLabel>
141-
{language!=="en"&&<CompEnNameLabel>{info[1].enName}</CompEnNameLabel>}
142-
</CompDiv>
143-
))}
144-
</InsertContain>
120+
<BaseSection
121+
noMargin
122+
width={288}
123+
name={uiCompCategoryNames[keyasUICompCategory]}
124+
>
125+
<InsertContain>
126+
{infos.map((info)=>(
127+
<CompDivkey={info[0]}className={info[0]==="table" ?tableDragClassName :""}>
128+
<HovDiv
129+
draggable
130+
onDragStart={(e)=>{
131+
e.dataTransfer.setData("compType",info[0]);
132+
e.dataTransfer.setDragImage(TransparentImg,0,0);
133+
draggingUtils.setData("compType",info[0]);
134+
onDrag(info[0]);
135+
}}
136+
>
137+
<IconContainIcon={info[1].icon}></IconContain>
138+
</HovDiv>
139+
<CompNameLabel>{info[1].name}</CompNameLabel>
140+
{language!=="en"&&<CompEnNameLabel>{info[1].enName}</CompEnNameLabel>}
141+
</CompDiv>
142+
))}
143+
</InsertContain>
144+
</BaseSection>
145145
</SectionWrapper>
146146
);
147147
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp