@@ -6,14 +6,17 @@ import { NameGenerator } from "comps/utils/nameGenerator";
6
6
import { Section , sectionNames } from "lowcoder-design" ;
7
7
import { oldContainerParamsToNew } from "../containerBase" ;
8
8
import { toSimpleContainerData } from "../containerBase/simpleContainerComp" ;
9
- import { disabledPropertyView , hiddenPropertyView , } from "comps/utils/propertyUtils" ;
9
+ import { disabledPropertyView , hiddenPropertyView } from "comps/utils/propertyUtils" ;
10
10
import { trans } from "i18n" ;
11
11
import { BoolCodeControl } from "comps/controls/codeControl" ;
12
12
import { DisabledContext } from "comps/generators/uiCompBuilder" ;
13
13
import React , { useContext , useEffect , useState } from "react" ;
14
14
import { EditorContext } from "comps/editorState" ;
15
15
16
- import { ContainerChildren , ContainerCompBuilder } from "../pageLayoutComp/pageLayoutCompBuilder" ;
16
+ import {
17
+ ContainerChildren ,
18
+ ContainerCompBuilder ,
19
+ } from "../pageLayoutComp/pageLayoutCompBuilder" ;
17
20
import { PageLayout } from "../pageLayoutComp/pageLayout" ;
18
21
import { AnimationStyle , styleControl } from "@lowcoder-ee/index.sdk" ;
19
22
@@ -24,58 +27,52 @@ export const ContainerBaseComp = (function () {
24
27
} ;
25
28
26
29
return new ContainerCompBuilder ( childrenMap , ( props , dispatch ) => {
30
+
27
31
const [ siderCollapsed , setSiderCollapsed ] = useState ( false ) ;
28
32
29
33
return (
30
34
< DisabledContext . Provider value = { props . disabled } >
31
- < PageLayout
32
- { ...props }
33
- siderCollapsed = { siderCollapsed }
34
- setSiderCollapsed = { setSiderCollapsed }
35
- />
35
+ < PageLayout { ...props } siderCollapsed = { siderCollapsed } setSiderCollapsed = { setSiderCollapsed } />
36
36
</ DisabledContext . Provider >
37
37
) ;
38
38
} )
39
39
. setPropertyViewFn ( ( children ) => {
40
40
return (
41
41
< >
42
- { ( useContext ( EditorContext ) . editorModeStatus === "logic" ||
43
- useContext ( EditorContext ) . editorModeStatus === "both" ) && (
42
+ { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
44
43
< Section name = { sectionNames . interaction } >
45
44
{ disabledPropertyView ( children ) }
46
45
{ hiddenPropertyView ( children ) }
47
- { children . container . appSelectorPropertyView ( ) }
46
+ { children . container . appSelectorPropertyView ( ) }
48
47
</ Section >
49
48
) }
50
49
51
- { ( useContext ( EditorContext ) . editorModeStatus === "layout" ||
52
- useContext ( EditorContext ) . editorModeStatus === "both" ) && (
53
- < >
54
- < Section name = { sectionNames . layout } >
55
- { children . container . getPropertyView ( ) }
56
- </ Section >
57
- < Section name = { sectionNames . style } >
58
- { children . container . stylePropertyView ( ) }
50
+ { ( useContext ( EditorContext ) . editorModeStatus === "layout" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
51
+ < > < Section name = { sectionNames . layout } >
52
+ { children . container . getPropertyView ( ) }
53
+ </ Section >
54
+ < Section name = { sectionNames . style } >
55
+ { children . container . stylePropertyView ( ) }
59
56
</ Section >
60
57
< Section name = { sectionNames . animationStyle } >
61
58
{ children . animationStyle . getPropertyView ( ) }
62
59
</ Section >
63
- { children . container . children . showHeader . getView ( ) && (
64
- < Section name = { "Header Style" } >
65
- { children . container . headerStylePropertyView ( ) }
60
+ { children . container . children . showHeader . getView ( ) && (
61
+ < Section name = { "Header Style" } >
62
+ { children . container . headerStylePropertyView ( ) }
66
63
</ Section >
67
64
) }
68
- { children . container . children . showSider . getView ( ) && (
69
- < Section name = { "Sider Style" } >
70
- { children . container . siderStylePropertyView ( ) }
65
+ { children . container . children . showSider . getView ( ) && (
66
+ < Section name = { "Sider Style" } >
67
+ { children . container . siderStylePropertyView ( ) }
71
68
</ Section >
72
69
) }
73
- < Section name = { "Body Style" } >
74
- { children . container . bodyStylePropertyView ( ) }
75
- </ Section >
76
- { children . container . children . showFooter . getView ( ) && (
77
- < Section name = { "Footer Style" } >
78
- { children . container . footerStylePropertyView ( ) }
70
+ < Section name = { "Body Style" } >
71
+ { children . container . bodyStylePropertyView ( ) }
72
+ </ Section >
73
+ { children . container . children . showFooter . getView ( ) && (
74
+ < Section name = { "Footer Style" } >
75
+ { children . container . footerStylePropertyView ( ) }
79
76
</ Section >
80
77
) }
81
78
</ >
0 commit comments