当前位置: 首页 > news >正文

网站搜索引擎提交wordpress发布站点

网站搜索引擎提交,wordpress发布站点,网站报价单模板,中建西部建设股份有限公司网站slot插槽 1、插槽 slot 的简单使用2、插槽分类2.1 默认插槽2.2 具名插槽2.3 作用域插槽 插槽就是子组件中的提供给父组件使用的一个占位符#xff0c;用slot/slot 表示#xff0c;父组件可以在这个占位符中填充任何模板代码#xff0c;如 HTML、组件等… slot插槽 1、插槽 slot 的简单使用2、插槽分类2.1 默认插槽2.2 具名插槽2.3 作用域插槽 插槽就是子组件中的提供给父组件使用的一个占位符用slot/slot 表示父组件可以在这个占位符中填充任何模板代码如 HTML、组件等填充的内容会替换子组件的标签。 简单理解就是子组件中留下个“坑”父组件可以使用指定内容来补“坑”。 1、插槽 slot 的简单使用 app.vue 文件引入 Son.vue 组件 templatediv idappapp componentSondiv classslot-contant插槽内容/div/Son/div /templatescript import Son from ./components/SlotComponents/Son export default {name: App,components: { Son } } /scriptstyle #app {font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background: #4a90e2;color: #fff;padding: 20px; } .slot-contant {color: #f00;font-size: 16px; } /styleSon.vue文件内容 templatediv classson-componentson headerslot /son footer/div /template script export default {} /script style scoped .son-component {width: 200px;height: 200px;padding: 20px;background: #ccc;border: 1px solid #ccc; } /style页面展示效果 2、插槽分类 2.1 默认插槽 slot /2.2 具名插槽 Tips有名字的插槽子组件可以在多个地方插入不同内容 slot nameheader/slot slot namefooter/slot!-- 父组件使用 -- template v-slot:header/template template #footer/template template #default/template举例说明父组件 templatediv idappapp componentSontemplate #headerp我是header部分/p/templatep我是main默认插槽部分/ptemplate v-slot:footerp我是footer部分/p/template/Son/div /templatescript import Son from ./components/SlotComponents/Son export default {name: App,components: { Son } } /scriptstyle #app {font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background: #4a90e2;color: #fff;padding: 20px; } .slot-contant {color: #f00;font-size: 16px; } /styleSon.vue 子组件 templatediv classson-componentheaderslot nameheader/slot/headermainslot/slot/mainfooterslot namefooter/slot/footer/div /template script export default {} /script style scoped .son-component {width: 200px;height: 200px;padding: 20px;background: #ccc;border: 1px solid #ccc; } /style页面效果 2.3 作用域插槽 Tips插槽内容能够访问子组件中才有的数据 slot :msgmsg/slot!-- 父组件使用 -- template v-slot:defaultdatap{{ data.msg }}/p /template template v-slotdatap{{ data.msg }}/p /template举例说明父组件 templatediv idappapp componentSontemplate v-slotdatap{{ data.msg }}/p/template/Son/div /templatescript import Son from ./components/SlotComponents/Son export default {name: App,components: { Son } } /scriptstyle #app {font-family: Avenir, Helvetica, Arial, sans-serif;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;background: #4a90e2;color: #fff;padding: 20px; } .slot-contant {color: #f00;font-size: 16px; } /styleSon.vue 子组件 templatediv classson-componentslot :msgmsg/slot/div /template script export default {data() {return {msg: hello, i am son}} } /script style scoped .son-component {width: 200px;height: 200px;padding: 20px;background: #ccc;border: 1px solid #ccc; } /style页面效果
http://www.zqtcl.cn/news/495006/

相关文章:

  • 二手房发布网站怎么做建站哪家好用兴田德润
  • 网站开发有几种深圳网站制作长沙
  • 为什么一个网站外链那么多公司团建活动
  • 公司门户网站建设策划书wordpress清空数据
  • 大兴专注高端网站建设交互设计留学
  • 想要黑掉一个网站 要怎么做网页设计师培训机构有吗
  • 做网站网站应该注意什么关于建设网站的会议纪要
  • 什么网站建设最简单做毕业设计实物的网站
  • 正规网站开发文案电商网站与企业网站区别
  • 襄阳做网站比较有实力的公司长沙出名的网站设计推广
  • 徐州网站设计师最便宜的购物平台
  • 网站域名和空间费用wordpress是是什么技术
  • 企业制作网站一般多少钱上海网站制作费用
  • 苏州住建网站什么叫关键词
  • 电商网站开发过程是什么推广整合营销
  • 网页建站软件网络市场调研的步骤
  • 自己做的网站怎样赚钱长沙专业做网站排名
  • 张家界做网站公司国内最先做弹幕的网站
  • 免费快速建站网站做网站用什么数据库
  • 哪有做课件赚钱的网站温州设计公司排名
  • 西安网站建设公司php大气企业网站
  • 天河公司网站建设内蒙古建设厅安全资料网站
  • 学习网站的建设怎么做网站建设作业
  • 做公司产品展示网站企业网盘源码
  • 南通做网站企业初中生代表性设计制作作品图片
  • php框架做网站好处网站后台模板免费下载
  • 新兴县建设局网站建筑工程网络计划技术
  • 住房和城乡建设部网站北京网站建设设计规划
  • 哪个网站做logo设计师网络营销心得体会800字
  • 广州一起做的网站动态数据库网站