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
forked fromvuejs/vue

Commit452a65c

Browse files
committed
feat(weex): pass stateless component test case
1 parent62e47c9 commit452a65c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎src/platforms/weex/compiler/modules/recycle-list/component-root.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

‎test/weex/cases/recycle-list/components/stateless.vdom.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
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',

‎test/weex/helpers/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function omitUseless (object) {
114114
if(isObject(object)){
115115
deleteobject.ref
116116
for(constkeyinobject){
117-
if(isEmptyObject(object[key])||object[key]===undefined){
117+
if(key.charAt(0)!=='@'&&(isEmptyObject(object[key])||object[key]===undefined)){
118118
deleteobject[key]
119119
}
120120
omitUseless(object[key])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp