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

Commit8504731

Browse files
authored
Merge pull request#1521 from lowcoder-org/dev
Dev -> Main 2.6.3
2 parents94c674f +0cd9490 commit8504731

File tree

17 files changed

+120
-58
lines changed

17 files changed

+120
-58
lines changed

‎client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.2
1+
2.6.3

‎client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"lowcoder-frontend",
3-
"version":"2.6.2",
3+
"version":"2.6.3",
44
"type":"module",
55
"private":true,
66
"workspaces": [

‎client/packages/lowcoder/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name":"lowcoder",
3-
"version":"2.6.2",
3+
"version":"2.6.3",
44
"private":true,
55
"type":"module",
66
"main":"src/index.sdk.ts",
@@ -52,7 +52,6 @@
5252
"file-saver":"^2.0.5",
5353
"github-markdown-css":"^5.1.0",
5454
"hotkeys-js":"^3.8.7",
55-
"html5-device-mockups":"^3.2.1",
5655
"immer":"^9.0.7",
5756
"less":"^4.1.3",
5857
"lodash":"^4.17.21",
@@ -68,7 +67,7 @@
6867
"react":"^18.2.0",
6968
"react-best-gradient-color-picker":"^3.0.10",
7069
"react-colorful":"^5.5.1",
71-
"react-device-mockups":"^0.1.12",
70+
"react-device-mockup":"^1.0.0",
7271
"react-documents":"^1.2.1",
7372
"react-dom":"^18.2.0",
7473
"react-draggable":"^4.4.4",

‎client/packages/lowcoder/src/comps/comps/splitLayout/splitLayout.tsx

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ import {
3636
HorizontalIcon,
3737
VerticalIcon,
3838
}from"lowcoder-design/src/icons";
39-
import{BackgroundColor}from"@lowcoder-ee/constants/style";
4039

41-
constSplitPanelWrapper=styled(Splitter.Panel)<{}>`
40+
constSplitPanelWrapper=styled(Splitter.Panel)`
41+
overflow: hidden;
4242
`;
4343

4444
constSplitterWrapper=styled.div<{$style:SplitLayoutRowStyleType}>`
45+
height: 100%;
4546
border-radius:${(props)=>props.$style?.radius||"0px"};
4647
border-width:${(props)=>props.$style?.borderWidth||"0px"};
4748
border-color:${(props)=>props.$style?.border||"transparent"};
@@ -103,7 +104,8 @@ const ColumnContainer = (props: ColumnContainerProps) => {
103104
...props.style,
104105
height:props.orientation==="horizontal"
105106
?(props.matchColumnsHeight ?heightCalculator(props.margin) :"auto")
106-
:(props.autoHeight ?"100%" :"auto"),
107+
:(props.autoHeight ?heightCalculator(props.margin) :heightCalculator(props.margin)),
108+
overflow:'auto',
107109
}}
108110
/>
109111
);
@@ -115,19 +117,26 @@ const SplitLayout = (props: SplitLayoutProps) => {
115117
<BackgroundColorContext.Providervalue={props.columnStyle.background}>
116118
<DisabledContext.Providervalue={props.disabled}>
117119
<SplitterWrapper$style={props.bodyStyle}>
118-
<Splitterstyle={{overflow:props.mainScrollbar ?"auto" :"hidden"}}layout={props.orientation}>
120+
<Splitter
121+
style={{
122+
overflow:props.mainScrollbar ?"auto" :"hidden",
123+
height:props.autoHeight&&props.orientation==='vertical' ?'500px' :'100%',
124+
}}
125+
layout={props.orientation}
126+
>
119127
{props.columns.map((col,index)=>{
120128
constid=String(col.id);
121129
constchildDispatch=wrapDispatch(wrapDispatch(props.dispatch,"containers"),id);
122130
constcontainerProps=props.containers[id]?.children;
131+
123132
return(
124133
<SplitPanelWrapper
125134
key={id}
126135
collapsible={col.collapsible}
127136
{...(col.minWidth!==undefined ?{min:col.minWidth} :{})}
128137
{...(col.maxWidth!==undefined ?{max:col.maxWidth} :{})}
129138
{...(col.width!==undefined ?{defaultSize:col.width} :{})}
130-
>
139+
>
131140
<ColumnContainer
132141
layout={containerProps.layout.getView()}
133142
items={gridItemCompToGridItems(containerProps.items.getView())}

‎client/packages/lowcoder/src/comps/controls/actionSelector/executeQueryAction.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,12 @@ export class ExecuteQueryAction extends ExecuteQueryTmpAction {
112112
overridegetView(){
113113
constqueryName=this.children.queryName.getView();
114114
// const queryParams = keyValueListToSearchStr(Array.isArray(this?.children?.query) ? (this.children.query as unknown as any[]).map((i: any) => i.getView() as KeyValue) : []);
115-
constresult=Object.values(this.children.queryVariables.childrenasRecord<string,{
116-
children:{
117-
key:{unevaledValue:string},
118-
value:{unevaledValue:string}
119-
}}>)
120-
.filter(item=>item.children.key.unevaledValue!==""&&item.children.value.unevaledValue!=="")
121-
.map(item=>({[item.children.key.unevaledValue]:item.children.value.unevaledValue}))
115+
constresult=this.children.queryVariables.toJsonValue()
116+
.filter(item=>item.key!==""&&item.value!=="")
117+
.map(item=>({[item.keyasstring]:item.value}))
122118
.reduce((acc,curr)=>Object.assign(acc,curr),{});
119+
120+
result.$queryName=queryName;
123121
if(!queryName){
124122
return()=>Promise.resolve();
125123
}

‎client/packages/lowcoder/src/comps/queries/queryComp.tsx

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ QueryCompTmp = class extends QueryCompTmp {
364364
if(action.type===CompActionTypes.EXECUTE_QUERY){
365365
if(getReduceContext().disableUpdateState)returnthis;
366366
if(!action.args)action.args=this.children.variables.children.variables.toJsonValue().reduce((acc,curr)=>Object.assign(acc,{[curr.keyasstring]:curr.value}),{});
367+
action.args.$queryName=this.children.name.getView();
367368

368369
returnthis.executeQuery(action);
369370
}
@@ -673,8 +674,8 @@ export const QueryComp = withExposingConfigs(QueryCompTmp, [
673674
returnundefined;
674675
}
675676
constnewNode=Object.values(input.data)
676-
.filter((kvNode:any)=>kvNode.key.value)
677-
.map((kvNode:any)=>({[kvNode.key.value]:kvNode.value.value}))
677+
.filter((kvNode:any)=>kvNode.key)
678+
.map((kvNode:any)=>({[kvNode.key]:kvNode.value}))
678679
.reduce((prev,obj)=>({...prev, ...obj}),{});
679680
returnnewNode;
680681
},
@@ -773,12 +774,24 @@ class QueryListComp extends QueryListTmpComp implements BottomResListComp {
773774
if(!originQuery){
774775
return;
775776
}
777+
778+
constjsonData=originQuery.toJsonValue();
779+
//Regenerate variable header
780+
jsonData.variables?.variables?.forEach(kv=>{
781+
const[prefix,_]=(kv.keyasstring).split(/(?=\d+$)/);
782+
leti=1,newName="";
783+
do{
784+
newName=prefix+(i++);
785+
}while(editorState.checkRename("",newName));
786+
kv.key=newName;
787+
})
788+
776789
constnewQueryName=this.genNewName(editorState);
777790
constid=genQueryId();
778791
this.dispatch(
779792
wrapActionExtraInfo(
780793
this.pushAction({
781-
...originQuery.toJsonValue(),
794+
...jsonData,
782795
id:id,
783796
name:newQueryName,
784797
isNewCreate:true,
@@ -789,7 +802,7 @@ class QueryListComp extends QueryListTmpComp implements BottomResListComp {
789802
{
790803
type:"add",
791804
compName:name,
792-
compType:originQuery.children.compType.getView(),
805+
compType:jsonData.compType,
793806
},
794807
],
795808
}

‎client/packages/lowcoder/src/comps/queries/queryCompUtils.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ export function toQueryView(params: FunctionProperty[]) {
2828
variables?:any;
2929
timeout:InstanceType<ParamsControlType>;
3030
}):Promise<QueryResult>=>{
31+
console.log("toQueryView props",props,params);
3132
const{ applicationId, isViewMode}=getGlobalSettings();
3233

33-
constmappedVariables=Object.keys(props.variables).map(key=>({key:`query1.variable.${key}`,value:props.variables[key]}));
34+
constmappedVariables=Object.keys(props.variables).map(key=>({key:`${props.args?.$queryName}.variables.${key}`,value:props.variables[key]}));
3435
letrequest:QueryExecuteRequest={
3536
path:props.applicationPath,
3637
params:[

‎client/packages/lowcoder/src/pages/common/copyModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export function CopyModal(props: CopyModalProps) {
4040
okButtonProps={{disabled:!copyName}}
4141
destroyOnClose={true}
4242
onCancel={close}
43+
showCancelButton
44+
showOkButton
4345
onOk={async()=>{
4446
letdsl=null;
4547
awaitApplicationApi.getApplicationDetail({applicationId:id,type:"editing"}).then(

‎client/packages/lowcoder/src/pages/editor/editorView.tsx

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,31 @@ export const EditorWrapper = styled.div`
256256

257257
constDeviceWrapperInner=styled(Flex)`
258258
margin: 2% 0 0;
259-
.screen {
260-
overflow: auto;
259+
.device-mockup.portrait {
260+
> div:first-child {
261+
> div:first-child {
262+
> div:first-child {
263+
> div:nth-child(2) {
264+
display: block !important;
265+
overflow: hidden auto !important;
266+
}
267+
}
268+
}
269+
}
270+
}
271+
.device-mockup.landscape {
272+
> div:first-child {
273+
> div:first-child {
274+
> div:first-child {
275+
> div:nth-child(2) {
276+
> div:first-child {
277+
display: block !important;
278+
overflow: hidden auto !important;
279+
}
280+
}
281+
}
282+
}
283+
}
261284
}
262285
`;
263286

@@ -322,13 +345,11 @@ const DeviceWrapper = ({
322345
useEffect(()=>{
323346
constloadWrapper=async()=>{
324347
if(deviceType==="tablet"){
325-
awaitimport('html5-device-mockups/dist/device-mockups.min.css');
326-
const{ IPadPro}=awaitimport("react-device-mockups");
327-
setWrapper(()=>IPadPro);
348+
const{ IPadMockup}=awaitimport("react-device-mockup");
349+
setWrapper(()=>IPadMockup);
328350
}elseif(deviceType==="mobile"){
329-
awaitimport('html5-device-mockups/dist/device-mockups.min.css');
330-
const{ IPhone7}=awaitimport("react-device-mockups");
331-
setWrapper(()=>IPhone7);
351+
const{ IPhoneMockup}=awaitimport("react-device-mockup");
352+
setWrapper(()=>IPhoneMockup);
332353
}else{
333354
setWrapper(()=>null);
334355
}
@@ -339,13 +360,13 @@ const DeviceWrapper = ({
339360

340361
constdeviceWidth=useMemo(()=>{
341362
if(deviceType==='tablet'&&deviceOrientation==='portrait'){
342-
return980;
363+
return850;
343364
}
344365
if(deviceType==='tablet'&&deviceOrientation==='landscape'){
345-
return1280;
366+
return1100;
346367
}
347368
if(deviceType==='mobile'&&deviceOrientation==='portrait'){
348-
return550;
369+
return450;
349370
}
350371
if(deviceType==='mobile'&&deviceOrientation==='landscape'){
351372
return1200;
@@ -357,8 +378,10 @@ const DeviceWrapper = ({
357378
return(
358379
<DeviceWrapperInnerjustify="center">
359380
<Wrapper
360-
orientation={deviceOrientation}
361-
width={deviceWidth}
381+
isLandscape={deviceOrientation==='landscape'}
382+
screenWidth={deviceWidth}
383+
className={`device-mockup${deviceOrientation==='landscape'&&deviceType==='mobile' ?'landscape' :'portrait'} `}
384+
frameColor={"background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%);"}
362385
>
363386
{children}
364387
</Wrapper>

‎client/packages/lowcoder/src/pages/editor/styledComponents.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export const DirectoryTreeStyle = styled(DirectoryTree)`
1313
height: 26px;
1414
display: flex;
1515
align-items: center;
16+
&::before {
17+
content: none;
18+
}
1619
}
1720
.ant-tree-title {
1821
padding-right: 6px;
@@ -43,6 +46,9 @@ export const DirectoryTreeStyle = styled(DirectoryTree)`
4346
.ant-tree-treenode {
4447
padding: 0;
4548
max-width: 288px;
49+
&::before {
50+
content: none;
51+
}
4652
}
4753
.ant-tree-indent-unit {
4854
width: 16px;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp