-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [jsfm] fix when the key of trackby is zero
- Loading branch information
1 parent
9a1ae1a
commit efa5070
Showing
4 changed files
with
123 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
define('@weex-component/04f1048c50eca3454bc70de93d3213d4', function(require, exports, module) { | ||
|
||
; | ||
module.exports = { | ||
data: function() { | ||
return { | ||
list: [{ | ||
text: 1 | ||
}, { | ||
text: 2 | ||
}], | ||
more: [{ | ||
text: 3 | ||
}] | ||
} | ||
}, | ||
ready: function() { | ||
for (var i = 0; i < this.more.length; i++) { | ||
this.list.push(this.more[i]); | ||
} | ||
this._app.updateActions() | ||
} | ||
|
||
} | ||
|
||
|
||
; | ||
module.exports.style = {} | ||
|
||
; | ||
module.exports.template = { | ||
"type": "list", | ||
"children": [{ | ||
"type": "cell", | ||
"append": "tree", | ||
"repeat": function() { | ||
return this.list | ||
}, | ||
"children": [{ | ||
"type": "text", | ||
"style": { | ||
"height": 600 | ||
}, | ||
"attr": { | ||
"value": function() { | ||
return this.text | ||
} | ||
} | ||
}] | ||
}] | ||
} | ||
|
||
; | ||
}) | ||
|
||
// require module | ||
bootstrap('@weex-component/04f1048c50eca3454bc70de93d3213d4', { | ||
"transformerVersion": "0.3.1" | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"type": "list", | ||
"children": [{ | ||
"type": "cell", | ||
"attr": { | ||
"append": "tree" | ||
}, | ||
"children": [{ | ||
"type": "text", | ||
"attr": { | ||
"value": 1 | ||
}, | ||
"style": { | ||
"height": 600 | ||
} | ||
}] | ||
}, { | ||
"type": "cell", | ||
"attr": { | ||
"append": "tree" | ||
}, | ||
"children": [{ | ||
"type": "text", | ||
"attr": { | ||
"value": 2 | ||
}, | ||
"style": { | ||
"height": 600 | ||
} | ||
}] | ||
}, { | ||
"type": "cell", | ||
"attr": { | ||
"append": "tree" | ||
}, | ||
"children": [{ | ||
"type": "text", | ||
"attr": { | ||
"value": 3 | ||
}, | ||
"style": { | ||
"height": 600 | ||
} | ||
}] | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters