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

Commit9a5ce3d

Browse files
author
FalkWolsky
committed
Adapting Preview v2
1 parent431e705 commit9a5ce3d

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ const PreviewHeaderComp = () => {
220220
/>
221221

222222
{/* Orientation */}
223-
{/*editorState.deviceType !== 'desktop' && (
223+
{editorState.deviceType!=='desktop'&&(
224224
<Segmented<DeviceOrientation>
225225
options={[
226226
{value:'portrait',label:"Portrait"},
@@ -231,7 +231,7 @@ const PreviewHeaderComp = () => {
231231
editorState.setDeviceOrientation(value);
232232
}}
233233
/>
234-
) */}
234+
)}
235235
</>
236236
);
237237

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

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,16 @@ const DeviceWrapper = ({
339339

340340
constdeviceWidth=useMemo(()=>{
341341
if(deviceType==='tablet'&&deviceOrientation==='portrait'){
342-
return700;
342+
return980;
343343
}
344344
if(deviceType==='tablet'&&deviceOrientation==='landscape'){
345-
return900;
345+
return1280;
346346
}
347347
if(deviceType==='mobile'&&deviceOrientation==='portrait'){
348-
return450;
348+
return550;
349349
}
350350
if(deviceType==='mobile'&&deviceOrientation==='landscape'){
351-
return900;
351+
return1200;
352352
}
353353
},[deviceType,deviceOrientation]);
354354

@@ -489,30 +489,12 @@ function EditorView(props: EditorViewProps) {
489489

490490
return(
491491
editorState.deviceType==="mobile"||editorState.deviceType==="tablet" ?(
492-
<divstyle={{
493-
display:"flex",
494-
flexDirection:"row",// Arrange side by side
495-
gap:"20px",// Spacing between the two DeviceWrappers
496-
justifyContent:"center",// Center horizontally
497-
alignItems:"center",// Center vertically
498-
height:"auto",// Full viewport height for vertical centering
499-
width:"100%",// Full viewport width
500-
501-
}}>
502-
<DeviceWrapper
492+
<DeviceWrapper
503493
deviceType={editorState.deviceType}
504-
deviceOrientation="portrait"
494+
deviceOrientation={editorState.deviceOrientation}
505495
>
506496
{uiComp.getView()}
507-
</DeviceWrapper>
508-
509-
<DeviceWrapper
510-
deviceType={editorState.deviceType}
511-
deviceOrientation="landscape"
512-
>
513-
{uiComp.getView()}
514-
</DeviceWrapper>
515-
</div>
497+
</DeviceWrapper>
516498
) :(
517499
<div>
518500
{uiComp.getView()}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp