Skip to content

Commit

Permalink
feat(wip): recycle list template inline expand
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 19, 2017
1 parent b3cb9d9 commit ac99957
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/core/vdom/create-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,22 @@ export function createComponent (
data = data || {}
// recycle-list optimized render function for extracting cell-slot
// template. This is essentailly inline expanding instead of creating
// an actual instance.
// https://github.com/Hanks10100/weex-native-directive/tree/master/component
// $flow-disable-line
if (__WEEX__ && data.attrs['@isInRecycleList']) {
const altRender = Ctor.options['@render']
if (altRender) {
return altRender.call(
context,
context.$createElement,
data.attrs
)
}
}
// resolve constructor options in case global mixins are applied after
// component constructor creation
resolveConstructorOptions(Ctor)
Expand Down

0 comments on commit ac99957

Please sign in to comment.