File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
src/platforms/weex/compiler/modules/recycle-list
cases/recycle-list/components Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,6 @@ export function postTransformComponentRoot (
1010 if ( ! el . parent ) {
1111 // component root
1212 addAttr ( el , '@isComponentRoot' , 'true' )
13+ addAttr ( el , '@componentProps' , JSON . stringify ( { } ) )
1314 }
1415}
Original file line number Diff line number Diff line change 1313 attr : { templateType : 'A' } ,
1414 children : [ {
1515 type : 'div' ,
16+ attr : {
17+ '@isComponentRoot' : true ,
18+ '@componentProps' : { }
19+ } ,
1620 // not supported yet
17- // attr: {
18- // '@isComponentRoot': true,
19- // '@componentProps': {}
20- // },
2121 // style: {
2222 // height: '120px',
2323 // justifyContent: 'center',
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ function omitUseless (object) {
114114 if ( isObject ( object ) ) {
115115 delete object . ref
116116 for ( const key in object ) {
117- if ( isEmptyObject ( object [ key ] ) || object [ key ] === undefined ) {
117+ if ( key . charAt ( 0 ) !== '@' && ( isEmptyObject ( object [ key ] ) || object [ key ] === undefined ) ) {
118118 delete object [ key ]
119119 }
120120 omitUseless ( object [ key ] )
You can’t perform that action at this time.
0 commit comments