File tree 3 files changed +6
-5
lines changed
src/platforms/weex/compiler/modules/recycle-list
cases/recycle-list/components
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ export function postTransformComponentRoot (
10
10
if ( ! el . parent ) {
11
11
// component root
12
12
addAttr ( el , '@isComponentRoot' , 'true' )
13
+ addAttr ( el , '@componentProps' , JSON . stringify ( { } ) )
13
14
}
14
15
}
Original file line number Diff line number Diff line change 13
13
attr : { templateType : 'A' } ,
14
14
children : [ {
15
15
type : 'div' ,
16
+ attr : {
17
+ '@isComponentRoot' : true ,
18
+ '@componentProps' : { }
19
+ } ,
16
20
// not supported yet
17
- // attr: {
18
- // '@isComponentRoot': true,
19
- // '@componentProps': {}
20
- // },
21
21
// style: {
22
22
// height: '120px',
23
23
// justifyContent: 'center',
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ function omitUseless (object) {
114
114
if ( isObject ( object ) ) {
115
115
delete object . ref
116
116
for ( const key in object ) {
117
- if ( isEmptyObject ( object [ key ] ) || object [ key ] === undefined ) {
117
+ if ( key . charAt ( 0 ) !== '@' && ( isEmptyObject ( object [ key ] ) || object [ key ] === undefined ) ) {
118
118
delete object [ key ]
119
119
}
120
120
omitUseless ( object [ key ] )
You can’t perform that action at this time.
0 commit comments