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

Commit365e46f

Browse files
authored
Merge branch 'dev' into module_loading_issues
2 parents383c716 +d51734a commit365e46f

File tree

17 files changed

+915
-319
lines changed

17 files changed

+915
-319
lines changed

‎client/packages/lowcoder/src/base/codeEditor/codeEditor.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const CodeEditorTooltipContainer = styled.div`
5252
// tooltip common
5353
.cm-tooltip {
5454
z-index:${Layers.codeEditorTooltip};
55-
border:none;
55+
border:1px solid#d7d9e0;
5656
}
5757
// make sure antd popover in the code editor available
5858
.ant-popover {
@@ -84,6 +84,7 @@ export const CodeEditorTooltipContainer = styled.div`
8484
border-radius:8px;
8585
box-shadow:0010px0rgba(0,0,0,0.1);
8686
transform:translate(-16px,10px);
87+
z-index:${Layers.codeEditorTooltip};
8788
}
8889
8990
// left minor tooltip
@@ -109,6 +110,7 @@ export const CodeEditorTooltipContainer = styled.div`
109110
color:#4965f2;
110111
${textStyle};
111112
font-weight: 600;
113+
z-index:${Layers.codeEditorTooltip};
112114
}
113115
114116
.cm-tooltip> .cm-completionInfo .hintDiv:hover {
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
import{CompParams}from"lowcoder-core";
2+
import{ToDataType}from"comps/generators/multi";
3+
import{NameConfigDisabled,NameConfigHidden,withExposingConfigs,NameConfig,CompDepsConfig}from"comps/generators/withExposing";
4+
import{withMethodExposing}from"comps/generators/withMethodExposing";
5+
import{NameGenerator}from"comps/utils/nameGenerator";
6+
import{Section,sectionNames}from"lowcoder-design";
7+
import{oldContainerParamsToNew}from"../containerBase";
8+
import{toSimpleContainerData}from"../containerBase/simpleContainerComp";
9+
import{disabledPropertyView,hiddenPropertyView}from"comps/utils/propertyUtils";
10+
import{trans}from"i18n";
11+
import{BoolCodeControl}from"comps/controls/codeControl";
12+
import{DisabledContext}from"comps/generators/uiCompBuilder";
13+
importReact,{useContext,useEffect,useState}from"react";
14+
import{EditorContext}from"comps/editorState";
15+
16+
import{
17+
ContainerChildren,
18+
ContainerCompBuilder,
19+
}from"../pageLayoutComp/pageLayoutCompBuilder";
20+
import{PageLayout}from"../pageLayoutComp/pageLayout";
21+
22+
23+
exportconstContainerBaseComp=(function(){
24+
constchildrenMap={
25+
disabled:BoolCodeControl
26+
};
27+
28+
returnnewContainerCompBuilder(childrenMap,(props,dispatch)=>{
29+
30+
const[siderCollapsed,setSiderCollapsed]=useState(false);
31+
32+
return(
33+
<DisabledContext.Providervalue={props.disabled}>
34+
<PageLayout{...props}siderCollapsed={siderCollapsed}setSiderCollapsed={setSiderCollapsed}/>
35+
</DisabledContext.Provider>
36+
);
37+
})
38+
.setPropertyViewFn((children)=>{
39+
return(
40+
<>
41+
{(useContext(EditorContext).editorModeStatus==="logic"||useContext(EditorContext).editorModeStatus==="both")&&(
42+
<Sectionname={sectionNames.interaction}>
43+
{disabledPropertyView(children)}
44+
{hiddenPropertyView(children)}
45+
{children.container.appSelectorPropertyView()}
46+
</Section>
47+
)}
48+
49+
{(useContext(EditorContext).editorModeStatus==="layout"||useContext(EditorContext).editorModeStatus==="both")&&(
50+
<><Sectionname={sectionNames.layout}>
51+
{children.container.getPropertyView()}
52+
</Section>
53+
<Sectionname={sectionNames.style}>
54+
{children.container.stylePropertyView()}
55+
</Section>
56+
{children.container.children.showHeader.getView()&&(
57+
<Sectionname={"Header Style"}>
58+
{children.container.headerStylePropertyView()}
59+
</Section>
60+
)}
61+
{children.container.children.showSider.getView()&&(
62+
<Sectionname={"Sider Style"}>
63+
{children.container.siderStylePropertyView()}
64+
</Section>
65+
)}
66+
<Sectionname={"Body Style"}>
67+
{children.container.bodyStylePropertyView()}
68+
</Section>
69+
{children.container.children.showFooter.getView()&&(
70+
<Sectionname={"Footer Style"}>
71+
{children.container.footerStylePropertyView()}
72+
</Section>
73+
)}
74+
</>
75+
)}
76+
</>
77+
);
78+
})
79+
.build();
80+
})();
81+
82+
// Compatible with old data
83+
functionconvertOldContainerParams(params:CompParams<any>){
84+
// convert older params to old params
85+
lettempParams=oldContainerParamsToNew(params);
86+
87+
if(tempParams.value){
88+
constcontainer=tempParams.value.container;
89+
// old params
90+
if(container&&(container.hasOwnProperty("layout")||container.hasOwnProperty("items"))){
91+
constautoHeight=tempParams.value.autoHeight;
92+
constscrollbars=tempParams.value.scrollbars;
93+
return{
94+
...tempParams,
95+
value:{
96+
container:{
97+
showHeader:true,
98+
body:{0:{view:container}},
99+
showFooter:false,
100+
showSider:true,
101+
autoHeight:autoHeight,
102+
contentScrollbars:scrollbars,
103+
},
104+
},
105+
};
106+
}
107+
}
108+
returntempParams;
109+
}
110+
111+
112+
classContainerTmpCompextendsContainerBaseComp{
113+
constructor(params:CompParams<any>){
114+
super(convertOldContainerParams(params));
115+
}
116+
}
117+
118+
constPageLayoutCompTmP=withExposingConfigs(ContainerTmpComp,[
119+
NameConfigHidden,
120+
NameConfigDisabled,
121+
122+
newNameConfig("container",trans("export.ratingValueDesc")),
123+
newCompDepsConfig(
124+
"siderCollapsed",
125+
(comp)=>({data :comp.children.container.children.siderCollapsed.nodeWithoutCache()}),
126+
(input)=>input.data.value,trans("listView.itemsDesc")
127+
),
128+
]);
129+
130+
exportconstPageLayoutComp=withMethodExposing(PageLayoutCompTmP,[
131+
132+
{
133+
method:{
134+
name:"setSiderCollapsed",
135+
description:"Set the Sider of the PageLayout to be collapsed or not",
136+
params:[{name:"collapsed",type:"boolean"}],
137+
},
138+
execute:(comp,values)=>{
139+
constpage=values[0]asnumber;
140+
if(page&&page>0){
141+
// comp.children.pagination.children.pageNo.dispatchChangeValueAction(page);
142+
}
143+
},
144+
}
145+
]);
146+
147+
typeContainerDataType=ToDataType<ContainerChildren<{}>>;
148+
149+
exportfunctiondefaultPageLayoutData(
150+
compName:string,
151+
nameGenerator:NameGenerator
152+
):ContainerDataType{
153+
return{
154+
container:{
155+
header:toSimpleContainerData([
156+
{
157+
item:{
158+
compType:"navigation",
159+
name:nameGenerator.genItemName("pageNavigation"),
160+
comp:{
161+
logoUrl:"",
162+
hidden:false,
163+
items:[
164+
{
165+
label:"Home",
166+
hidden:false,
167+
active:false,
168+
},
169+
{
170+
label:"Services",
171+
hidden:false,
172+
active:false,
173+
items:[
174+
{
175+
label:"Lowcode Platform",
176+
hidden:false,
177+
active:false,
178+
},
179+
{
180+
label:"App Development",
181+
hidden:false,
182+
active:false,
183+
},
184+
],
185+
},
186+
{
187+
label:"About",
188+
hidden:false,
189+
active:false,
190+
},
191+
],
192+
},
193+
},
194+
layoutItem:{
195+
i:"",
196+
h:6,
197+
w:24,
198+
x:0,
199+
y:0,
200+
},
201+
},
202+
]),
203+
},
204+
};
205+
}

‎client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
191191
/>
192192
);
193193

194+
//console.log("appView", appView);
195+
194196
if(readOnly){
195197
return(
196198
<TabLayoutViewContainer>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp