2018-10-27 03:44:50 +08:00
|
|
|
# @vue/runtime-test
|
2018-10-02 01:15:07 +08:00
|
|
|
|
|
|
|
``` js
|
2019-11-29 03:43:12 +08:00
|
|
|
import { h, render, nodeOps, dumpOps } from '@vue/runtime-test'
|
2018-10-02 01:15:07 +08:00
|
|
|
|
2019-11-29 03:43:12 +08:00
|
|
|
const App = {
|
2018-10-02 01:15:07 +08:00
|
|
|
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)
|
|
|
|
```
|