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

Commitbe6f14d

Browse files
Merge pull request#2047 from iamfaran/fix/1290-drawer-modal
[Fix]:#1290 add zindex property for stacking issue
2 parentsc86ba27 +e8bc881 commitbe6f14d

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

‎client/packages/lowcoder/src/comps/hooks/drawerComp.tsx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ContainerCompBuilder } from "comps/comps/containerBase/containerCompBui
44
import{gridItemCompToGridItems,InnerGrid}from"comps/comps/containerComp/containerView";
55
import{AutoHeightControl}from"comps/controls/autoHeightControl";
66
import{BoolControl}from"comps/controls/boolControl";
7-
import{StringControl}from"comps/controls/codeControl";
7+
import{StringControl,NumberControl}from"comps/controls/codeControl";
88
import{booleanExposingStateControl}from"comps/controls/codeStateControl";
99
import{PositionControl,LeftRightControl,HorizontalAlignmentControl}from"comps/controls/dropdownControl";
1010
import{eventHandlerControl}from"comps/controls/eventHandlerControl";
@@ -122,6 +122,7 @@ const childrenMap = {
122122
showMask:withDefault(BoolControl,true),
123123
toggleClose:withDefault(BoolControl,true),
124124
escapeClosable:withDefault(BoolControl,true),
125+
zIndex:withDefault(NumberControl,Layers.drawer),
125126
};
126127

127128
typeChildrenType=NewChildren<RecordConstructorToComp<typeofchildrenMap>>&{
@@ -168,6 +169,9 @@ const DrawerPropertyView = React.memo((props: {
168169
{props.children.escapeClosable.propertyView({
169170
label:trans("prop.escapeClose"),
170171
})}
172+
{props.children.zIndex.propertyView({
173+
label:trans("prop.zIndex"),
174+
})}
171175
</Section>
172176
<Sectionname={sectionNames.interaction}>{props.children.onEvent.getPropertyView()}</Section>
173177
<Sectionname={sectionNames.style}>{props.children.style.getPropertyView()}</Section>
@@ -251,7 +255,7 @@ const DrawerView = React.memo((
251255
height={!props.autoHeight ?transToPxSize(props.height||DEFAULT_SIZE) :""}
252256
onClose={onClose}
253257
afterOpenChange={afterOpenChange}
254-
zIndex={Layers.drawer}
258+
zIndex={props.zIndex}
255259
maskClosable={props.maskClosable}
256260
mask={true}
257261
className={clsx(`app-${appID}`,props.className)}

‎client/packages/lowcoder/src/comps/hooks/modalComp.tsx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{ContainerCompBuilder}from"comps/comps/containerBase/containerCompBuilder";
22
import{gridItemCompToGridItems,InnerGrid}from"comps/comps/containerComp/containerView";
33
import{AutoHeightControl}from"comps/controls/autoHeightControl";
4-
import{StringControl}from"comps/controls/codeControl";
4+
import{StringControl,NumberControl}from"comps/controls/codeControl";
55
import{booleanExposingStateControl}from"comps/controls/codeStateControl";
66
import{eventHandlerControl}from"comps/controls/eventHandlerControl";
77
import{styleControl}from"comps/controls/styleControl";
@@ -117,7 +117,8 @@ const childrenMap = {
117117
style:styleControl(ModalStyle),
118118
maskClosable:withDefault(BoolControl,true),
119119
showMask:withDefault(BoolControl,true),
120-
toggleClose:withDefault(BoolControl,true)
120+
toggleClose:withDefault(BoolControl,true),
121+
zIndex:withDefault(NumberControl,Layers.modal)
121122
};
122123

123124
constModalPropertyView=React.memo((props:{
@@ -156,6 +157,9 @@ const ModalPropertyView = React.memo((props: {
156157
{props.children.toggleClose.propertyView({
157158
label:trans("prop.toggleClose"),
158159
})}
160+
{props.children.zIndex.propertyView({
161+
label:trans("prop.zIndex"),
162+
})}
159163
</Section>
160164
<Sectionname={sectionNames.interaction}>{props.children.onEvent.getPropertyView()}</Section>
161165
<Sectionname={sectionNames.style}>{props.children.style.getPropertyView()}</Section>
@@ -278,7 +282,7 @@ const ModalView = React.memo((
278282
onCancel={handleCancel}
279283
afterClose={handleAfterClose}
280284
afterOpenChange={handleAfterOpenChange}
281-
zIndex={Layers.modal}
285+
zIndex={props.zIndex}
282286
modalRender={modalRender}
283287
mask={props.showMask}
284288
className={clsx(`app-${appID}`,props.className)}

‎client/packages/lowcoder/src/i18n/locales/en.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ export const en = {
239239
"timeZone":"TimeZone",
240240
"pickerMode":"Picker Mode",
241241
"customTags":"Allow Custom Tags",
242-
"customTagsTooltip":"Allow users to enter custom tags that are not in the options list."
242+
"customTagsTooltip":"Allow users to enter custom tags that are not in the options list.",
243+
"zIndex":"z-Index"
243244
},
244245
"autoHeightProp":{
245246
"auto":"Auto",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp