feat(examples): 更新 h-element 示例并添加文本版本
- 将 h-element.html 重命名为 h-element-array.html - 修改示例代码以展示数组子元素渲染功能 - 添加新的 h-element-text.html 示例文件 - 新示例演示基本文本内容渲染用法
This commit is contained in:
22
packages/vue/examples/runtime/h-element-array.html
Normal file
22
packages/vue/examples/runtime/h-element-array.html
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Document</title>
|
||||||
|
<script src="../../dist/vue.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
const {h} =Vue
|
||||||
|
const vnode=h('div',{
|
||||||
|
class:'test'
|
||||||
|
},[
|
||||||
|
h('p','p1'),
|
||||||
|
h('p','p2'),
|
||||||
|
h('p','p3')
|
||||||
|
])
|
||||||
|
console.log(vnode)
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user