#author("2022-05-14T10:35:00+08:00","default:Admin","Admin") #author("2022-05-26T10:23:34+08:00","default:Admin","Admin") [[Vue]] &color(red){※前提条件:本文基于 Vue 2.0 创作}; #contents * 单个根元素 [#f35c4307] every component must have a single root element (每个组件必须只有一个根元素)。 错误的示例 #codeprettify{{ <h3>\{\{ title \}\}</h3> <div v-html="content"></div> }} 正确的示例 #codeprettify{{ <div class="blog-post"> <h3>\{\{ title \}\}</h3> <div v-html="content"></div> </div> }} * 自定义组件 [#a2cae242] 下面的文章非常好,从自定义组件的开发思路说起,自定义自己所需要的组件 重点是使用 template 标签来实现,各种 html 元素的嵌套等配合 <template slot-scope="slot"> [[ElementUI 实现嵌套表格:https://www.bianchengquan.com/article/264994.html]] #hr(); コメント: #comment_kcaptcha