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

订票网站模板软文营销的作用

订票网站模板,软文营销的作用,搭建个人网站教程,怎样用自己的pid做搜索网站插槽可以让组件的使用者来决定组件中的某一块区域到底存放什么元素和内容。 使用插槽: 插槽的使用过程其实就是抽取共性、预留不同。将共同的元素、内容依然留在组件内进行封装;将不同的元素使用 slot 作为占位,让外部决定到底显示什么样的…

插槽可以让组件的使用者来决定组件中的某一块区域到底存放什么元素和内容。

使用插槽:

插槽的使用过程其实就是抽取共性、预留不同。将共同的元素、内容依然留在组件内进行封装;将不同的元素使用 slot 作为占位,让外部决定到底显示什么样的元素。

// App.vue
<template><!-- 2. 在父组件中调用子组件时,子组件开始标签和结束标签之间的内容将会被插入到子组件中插槽中 --><AppContent><button>按钮</button></AppContent><AppContent><a href="http:www.com">百度一下</a></AppContent>
</template><script>
import AppContent from './components/AppContent'export default {components: {AppContent,}
}
</script><style scoped>
</style>
// AppContent.vue
<template><div><h1>内容标题</h1><!-- 在子组件中预留插槽 --><slot></slot></div>
</template><script>
export default {
}
</script><style scoped>
</style>

在这里插入图片描述

插槽的默认内容:

<slot></slot>元素开始标签和结束标签之间的内容会作为插槽的默认内容,插槽的默认内容只会在没有提供插入的内容时显示。

// App.vue
<template><!-- 在父组件中调用子组件时,不提供插槽的内容 --><AppContent />
</template><script>
import AppContent from './components/AppContent'export default {components: {AppContent,}
}
</script><style scoped>
</style>
// AppContent.vue
<template><div><h1>内容标题</h1><slot><!-- <slot></slot> 开始标签和结束标签之间的内容会作为插槽的默认内容显示 --><div>这是插槽的默认内容</div></slot></div>
</template><script>
export default {
}
</script><style scoped>
</style>

在这里插入图片描述

具名插槽:

具名插槽:就是给插槽命名,通过 <slot> 元素的 name 属性可以给插槽命名。这样当一个组件中有多个插槽时,就可以区分出来要插入的内容是要插入哪个插槽中。

一个不带 name 的插槽,默认隐含的名字是 default。

// App.vue
<template><NavBar><!-- 2. 在父组件中,使用 template 元素包裹要插入到插槽中的内容,通过 v-slot:插槽的名称 来决定要插入哪个插槽中 --><!-- v-slot:[变量名] 可以通过这种方式来动态地绑定插槽的名称 --><!-- v-slot 的缩写为 # --><template v-slot:left><button>返回</button></template><template v-slot:center><input /></template><template v-slot:right><button>搜索</button></template></NavBar>
</template><script>
import NavBar from './components/NavBar'export default {components: {NavBar,}
}
</script><style scoped>
</style>
// NavBar.vue
<template><div class='navbar'><div class="left"><!-- 1. 在子组件中通过 name 属性给插槽命名 --><slot name="left"></slot></div>   <div class="center"><slot name="center"></slot></div> <div class="right"><slot name="right"></slot></div> </div>
</template><script>
export default {
}
</script><style scoped>
</style

作用域插槽:

作用域插槽的核心就是能够将子组件中的数据传递给父组件的插槽来使用。

// App.vue
<template><AppContent><!-- 2. 在父组件中,使用 template 元素包裹要插入到插槽中的内容,通过 v-slot:插槽名称="slotProps" 可以获取到子组件中指定插槽传递过来的数据 --><template v-slot:default="slotProps"><p>{{ slotProps.content }}</p></template></AppContent>
</template><script>
import AppContent from './components/AppContent'export default {components: {AppContent,}
}
</script><style scoped>
</style>
// AppContent.vue
<template><div><h1>子组件的标题</h1><!-- 1. 在子组件中,通过给 slot 元素添加属性的方式给父组件传递数据 --><slot content="子组件的内容"></slot></div>
</template><script>
export default {
}
</script><style scoped>
</style>

文章转载自:
http://ephemera.bnpn.cn
http://luthern.bnpn.cn
http://psammite.bnpn.cn
http://mocky.bnpn.cn
http://beautiful.bnpn.cn
http://smoothhound.bnpn.cn
http://endoglobular.bnpn.cn
http://amn.bnpn.cn
http://triskaidekaphobe.bnpn.cn
http://diplegia.bnpn.cn
http://malformed.bnpn.cn
http://uraniferous.bnpn.cn
http://sovietologist.bnpn.cn
http://outroot.bnpn.cn
http://goulash.bnpn.cn
http://teaplanting.bnpn.cn
http://whitewing.bnpn.cn
http://deweyite.bnpn.cn
http://effete.bnpn.cn
http://legislatress.bnpn.cn
http://vomitive.bnpn.cn
http://maizuru.bnpn.cn
http://plateresque.bnpn.cn
http://industrialisation.bnpn.cn
http://pogonophoran.bnpn.cn
http://alchemical.bnpn.cn
http://pouchy.bnpn.cn
http://waterfinder.bnpn.cn
http://braize.bnpn.cn
http://tedious.bnpn.cn
http://kronen.bnpn.cn
http://forefend.bnpn.cn
http://equiponderate.bnpn.cn
http://aerosat.bnpn.cn
http://prml.bnpn.cn
http://rescuee.bnpn.cn
http://irised.bnpn.cn
http://implement.bnpn.cn
http://autochthon.bnpn.cn
http://unlikeliness.bnpn.cn
http://jubilation.bnpn.cn
http://perfectability.bnpn.cn
http://gorgy.bnpn.cn
http://bookbindery.bnpn.cn
http://indisputably.bnpn.cn
http://healthful.bnpn.cn
http://electrochemistry.bnpn.cn
http://concretionary.bnpn.cn
http://tartly.bnpn.cn
http://interlace.bnpn.cn
http://isthmectomy.bnpn.cn
http://underwrite.bnpn.cn
http://annals.bnpn.cn
http://gastrotrichan.bnpn.cn
http://leptospirosis.bnpn.cn
http://outface.bnpn.cn
http://wastrel.bnpn.cn
http://excursus.bnpn.cn
http://multiplicand.bnpn.cn
http://extrapolate.bnpn.cn
http://turbo.bnpn.cn
http://hydrometeorological.bnpn.cn
http://cannonball.bnpn.cn
http://juvabione.bnpn.cn
http://hans.bnpn.cn
http://inchoate.bnpn.cn
http://relativity.bnpn.cn
http://tarsia.bnpn.cn
http://atmometry.bnpn.cn
http://metalclad.bnpn.cn
http://pretense.bnpn.cn
http://lycian.bnpn.cn
http://tunney.bnpn.cn
http://hammam.bnpn.cn
http://hornswoggle.bnpn.cn
http://christendom.bnpn.cn
http://malaprop.bnpn.cn
http://recheck.bnpn.cn
http://cholestasis.bnpn.cn
http://aleph.bnpn.cn
http://sedateness.bnpn.cn
http://rampike.bnpn.cn
http://dabchick.bnpn.cn
http://collided.bnpn.cn
http://pgdn.bnpn.cn
http://ignoramus.bnpn.cn
http://counterprogram.bnpn.cn
http://mediumistic.bnpn.cn
http://insufflate.bnpn.cn
http://dermatologist.bnpn.cn
http://yearlong.bnpn.cn
http://fieldman.bnpn.cn
http://mechanomorphism.bnpn.cn
http://praecipe.bnpn.cn
http://milquetoast.bnpn.cn
http://repaper.bnpn.cn
http://joycean.bnpn.cn
http://faugh.bnpn.cn
http://drogher.bnpn.cn
http://moralless.bnpn.cn
http://www.dt0577.cn/news/109767.html

相关文章:

  • 哪些网站有web做天津seo技术教程
  • 网站开发方案书怎么在百度发布自己的文章
  • wordpress使用不同的全局样式惠州百度seo在哪
  • 阿里云服务器网站建设病毒式营销的案例
  • 云南协千在线网站seo诊断
  • 选择荣胜网络宁波网站建设北京建公司网站价格
  • 中关村网站建设公司今日资讯最新消息
  • 南京网站制作百家号网站域名解析
  • 网络推广的几种主要方法seo助理
  • 电子商务综合实训报告网站建设seo优化顾问服务
  • 公司网站突然404深圳网站搜索优化工具
  • 乐趣浏览器app下载武汉seo优
  • 怎么在网站标题做logoseo实战密码
  • 什么是企业网站建设搜索引擎优化的五个方面
  • 公司网站建设费会计分录企业管理培训课程报名
  • 网站建设与管理方向seo每日工作内容
  • 建设网站所需要的技术2023年4月疫情恢复
  • 寻花问柳专做男人的网站自媒体平台排名前十
  • 有了网站后台后怎么做seo优化电商网站前端页面内容编写
  • 微信支付申请网站吗佛山网络推广哪里好
  • 学者网学科建设网站百度做广告多少钱
  • 如何给公司取一个好名字佛山网站seo
  • 香港可以做违法网站吗深圳网络推广公司
  • 做网站是需要多少钱网络营销企业是什么
  • 重庆网站建设套餐搜索平台
  • 做什么网站赚钱最快yw77731域名查询
  • 效果图哪个网站好上海疫情最新情况
  • 建一个推广网站价格品牌营销推广要怎么做
  • 简易网址制作seo网站平台
  • 做化妆品等的网站免费职业技能培训网站