2019-11-02 10:54:01 +08:00
|
|
|
import {
|
|
|
|
createRenderer,
|
|
|
|
VNode,
|
|
|
|
RootRenderFunction,
|
2020-01-24 04:05:38 +08:00
|
|
|
CreateAppFunction
|
2019-11-02 10:54:01 +08:00
|
|
|
} from '@vue/runtime-core'
|
2019-09-07 04:58:32 +08:00
|
|
|
import { nodeOps, TestNode, TestElement } from './nodeOps'
|
2019-06-20 21:28:37 +08:00
|
|
|
import { patchProp } from './patchProp'
|
2019-08-27 06:08:56 +08:00
|
|
|
import { serializeInner } from './serialize'
|
2018-10-02 01:15:07 +08:00
|
|
|
|
2019-11-02 10:54:01 +08:00
|
|
|
const { render: baseRender, createApp: baseCreateApp } = createRenderer({
|
2019-06-20 21:28:37 +08:00
|
|
|
patchProp,
|
|
|
|
...nodeOps
|
2019-09-07 04:58:32 +08:00
|
|
|
})
|
2019-09-03 04:09:34 +08:00
|
|
|
|
2019-11-02 10:54:01 +08:00
|
|
|
export const render = baseRender as RootRenderFunction<TestNode, TestElement>
|
2020-01-24 04:05:38 +08:00
|
|
|
export const createApp = baseCreateApp as CreateAppFunction<TestElement>
|
2018-10-18 05:36:34 +08:00
|
|
|
|
2019-08-27 06:08:56 +08:00
|
|
|
// convenience for one-off render validations
|
|
|
|
export function renderToString(vnode: VNode) {
|
|
|
|
const root = nodeOps.createElement('div')
|
|
|
|
render(vnode, root)
|
|
|
|
return serializeInner(root)
|
|
|
|
}
|
|
|
|
|
|
|
|
export * from './triggerEvent'
|
|
|
|
export * from './serialize'
|
2018-10-02 01:15:07 +08:00
|
|
|
export * from './nodeOps'
|
2018-10-27 03:44:50 +08:00
|
|
|
export * from '@vue/runtime-core'
|