@@ -65,23 +65,23 @@ export const ContainerBaseComp = (function () {
65
65
{ children . container . children . showSider . getView ( ) && (
66
66
< Section name = { "Sider Style" } >
67
67
{ children . container . siderStylePropertyView ( ) }
68
- </ Section >
68
+ </ Section >
69
69
) }
70
70
< Section name = { "Body Style" } >
71
71
{ children . container . bodyStylePropertyView ( ) }
72
72
</ Section >
73
73
{ children . container . children . showFooter . getView ( ) && (
74
74
< Section name = { "Footer Style" } >
75
75
{ children . container . footerStylePropertyView ( ) }
76
- </ Section >
76
+ </ Section >
77
77
) }
78
78
</ >
79
79
) }
80
80
</ >
81
81
) ;
82
82
} )
83
83
. build ( ) ;
84
- } ) ( ) ;
84
+ } ) ( ) ;
85
85
86
86
// Compatible with old data
87
87
function convertOldContainerParams ( params : CompParams < any > ) {
@@ -91,18 +91,15 @@ function convertOldContainerParams(params: CompParams<any>) {
91
91
if ( tempParams . value ) {
92
92
const container = tempParams . value . container ;
93
93
// old params
94
- if (
95
- container &&
96
- ( container . hasOwnProperty ( "layout" ) || container . hasOwnProperty ( "items" ) )
97
- ) {
94
+ if ( container && ( container . hasOwnProperty ( "layout" ) || container . hasOwnProperty ( "items" ) ) ) {
98
95
const autoHeight = tempParams . value . autoHeight ;
99
96
const scrollbars = tempParams . value . scrollbars ;
100
97
return {
101
98
...tempParams ,
102
99
value : {
103
100
container : {
104
101
showHeader : true ,
105
- body : { 0 : { view : container } } ,
102
+ body : { 0 : { view : container } } ,
106
103
showFooter : false ,
107
104
showSider : true ,
108
105
autoHeight : autoHeight ,
@@ -115,6 +112,7 @@ function convertOldContainerParams(params: CompParams<any>) {
115
112
return tempParams ;
116
113
}
117
114
115
+
118
116
class ContainerTmpComp extends ContainerBaseComp {
119
117
constructor ( params : CompParams < any > ) {
120
118
super ( convertOldContainerParams ( params ) ) ;
@@ -128,28 +126,26 @@ const PageLayoutCompTmP = withExposingConfigs(ContainerTmpComp, [
128
126
new NameConfig ( "container" , trans ( "export.ratingValueDesc" ) ) ,
129
127
new CompDepsConfig (
130
128
"siderCollapsed" ,
131
- ( comp ) => ( {
132
- data : comp . children . container . children . siderCollapsed . nodeWithoutCache ( ) ,
133
- } ) ,
134
- ( input ) => input . data . value ,
135
- trans ( "listView.itemsDesc" )
129
+ ( comp ) => ( { data : comp . children . container . children . siderCollapsed . nodeWithoutCache ( ) } ) ,
130
+ ( input ) => input . data . value , trans ( "listView.itemsDesc" )
136
131
) ,
137
132
] ) ;
138
133
139
134
export const PageLayoutComp = withMethodExposing ( PageLayoutCompTmP , [
135
+
140
136
{
141
137
method : {
142
138
name : "setSiderCollapsed" ,
143
139
description : "Set the Sider of the PageLayout to be collapsed or not" ,
144
- params : [ { name : "collapsed" , type : "boolean" } ] ,
140
+ params : [ { name : "collapsed" , type : "boolean" } ] ,
145
141
} ,
146
142
execute : ( comp , values ) => {
147
143
const page = values [ 0 ] as number ;
148
144
if ( page && page > 0 ) {
149
145
// comp.children.pagination.children.pageNo.dispatchChangeValueAction(page);
150
146
}
151
147
} ,
152
- } ,
148
+ }
153
149
] ) ;
154
150
155
151
type ContainerDataType = ToDataType < ContainerChildren < { } > > ;
0 commit comments