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

Commita74271c

Browse files
committed
StepControl: Added min width and a horizontal scroll
1 parentb153e17 commita74271c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

‎client/packages/lowcoder/src/comps/comps/selectInputComp/stepControl.tsx‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import{ConfigProvider,Steps}from"antd";
2-
import{BoolCodeControl}from"comps/controls/codeControl";
2+
import{BoolCodeControl,RadiusControl}from"comps/controls/codeControl";
33
import{BoolControl}from"comps/controls/boolControl";
44
import{stringExposingStateControl,numberExposingStateControl}from"comps/controls/codeStateControl";
55
import{ChangeEventHandlerControl}from"comps/controls/eventHandlerControl";
@@ -96,10 +96,19 @@ const StepsChildrenMap = {
9696
viewRef:RefControl<HTMLDivElement>,
9797
animationStyle:styleControl(AnimationStyle,'animationStyle'),
9898
showVerticalScrollbar:withDefault(BoolControl,false),
99+
minHorizontalWidth:withDefault(RadiusControl,''),
99100
};
100101

101102
letStepControlBasicComp=(function(){
102103
returnnewUICompBuilder(StepsChildrenMap,(props)=>{
104+
105+
constScrollWrapper=styled.div<{$showHorizontalScroll:boolean}>`
106+
overflow-x: scroll;
107+
::-webkit-scrollbar {
108+
display:${props=>props.$showHorizontalScroll ?"block" :"none"};
109+
}
110+
`;
111+
103112
constStyledWrapper=styled.div<{style:StepsStyleType,$animationStyle:AnimationStyleType}>`
104113
${props=>props.$animationStyle}
105114
height: 100%;
@@ -176,6 +185,7 @@ let StepControlBasicComp = (function () {
176185
<ScrollBar
177186
style={{
178187
height:props.autoHeight ?"auto" :"100%",
188+
minWidth:props.minHorizontalWidth,
179189
margin:"0px",
180190
padding:"0px",
181191
}}
@@ -232,6 +242,15 @@ let StepControlBasicComp = (function () {
232242
{["layout","both"].includes(useContext(EditorContext).editorModeStatus)&&(
233243
<Sectionname={sectionNames.layout}>
234244
{children.autoHeight.getPropertyView()}
245+
{!children.autoHeight.getView()&&(
246+
children.showVerticalScrollbar.propertyView({
247+
label:trans("prop.showVerticalScrollbar"),
248+
})
249+
)}
250+
{children.minHorizontalWidth.propertyView({
251+
label:trans("prop.minHorizontalWidth"),
252+
placeholder:'100px',
253+
})}
235254
{children.size.propertyView({
236255
label:trans("step.size"),
237256
radioButton:true,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp