vue3-yuanma/packages/runtime-test/README.md
2019-11-28 14:43:12 -05:00

24 lines
388 B
Markdown

# @vue/runtime-test
``` js
import { h, render, nodeOps, dumpOps } from '@vue/runtime-test'
const App = {
data () {
return {
msg: 'Hello World!'
}
}
render () {
return h('div', this.msg)
}
}
// root is of type `TestElement` as defined in src/nodeOps.ts
const root = nodeOps.createElement('div')
render(h(App), root)
const ops = dumpOps()
console.log(ops)
```