摘要: vue.js 中的 slot 一、slot 的作用 调用组件的时候,对于数据,我们会用props将数据从父组件传至子组件。但是,如果从父组件到子组件,单纯是页面局部渲染的改变,slot会更合适。 二、使用slot 1.在组件中使用slot预留位置(占位置) 使用slot在html文件中预留位置,并用 阅读全文
posted @ 2018-09-14 22:42 Vine.Y 阅读(912) 评论(0) 推荐(0) 编辑
TOP