智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/4c/4c6b4cb12ce76afb9030716d9ee...

34 lines
1.0 KiB

/* @flow */
import { warn } from 'core/util/debug'
import { handleError } from 'core/util/error'
import { RECYCLE_LIST_MARKER } from 'weex/util/index'
import { createComponentInstanceForVnode } from 'core/vdom/create-component'
import { resolveVirtualComponent } from './virtual-component'
export function isRecyclableComponent (vnode: VNodeWithData): boolean {
return vnode.data.attrs
? (RECYCLE_LIST_MARKER in vnode.data.attrs)
: false
}
export function renderRecyclableComponentTemplate (vnode: MountedComponentVNode): VNode {
// $flow-disable-line
delete vnode.data.attrs[RECYCLE_LIST_MARKER]
resolveVirtualComponent(vnode)
const vm = createComponentInstanceForVnode(vnode)
const render = (vm.$options: any)['@render']
if (render) {
try {
return render.call(vm)
} catch (err) {
handleError(err, vm, `@render`)
}
} else {
warn(
`@render function not defined on component used in <recycle-list>. ` +
`Make sure to declare \`recyclable="true"\` on the component's template.`,
vm
)
}
}