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

wordpress 后台禁用seo发包软件

wordpress 后台禁用,seo发包软件,网页编辑器哪个好,政府政务服务网站建设外包插槽就是子组件中的提供给父组件使用的一个占位符&#xff0c;用<slot></slot> 表示&#xff0c;父组件可以在这个占位符中填充任何模板代码&#xff0c;如 HTML、组件等&#xff0c;填充的内容会替换子组件的<slot></slot>标签。 匿名插槽 1.在子组…

插槽就是子组件中的提供给父组件使用的一个占位符,用<slot></slot> 表示,父组件可以在这个占位符中填充任何模板代码,如 HTML、组件等,填充的内容会替换子组件的<slot></slot>标签。

匿名插槽

1.在子组件放置一个插槽

<template><div><slot></slot></div>
</template>

 父组件使用插槽

在父组件给这个插槽填充内容

        <Dialog><template v-slot><div>2132</div></template></Dialog>

具名插槽

具名插槽其实就是给插槽取个名字。一个子组件可以放多个插槽,而且可以放在不同的地方,而父组件填充内容时,可以根据这个名字把内容填充到对应插槽中

    <div><slot name="header"></slot><slot></slot><slot name="footer"></slot></div>

父组件使用需对应名称

        <Dialog><template v-slot:header><div>1</div></template><template v-slot><div>2</div></template><template v-slot:footer><div>3</div></template></Dialog>

插槽简写

        <Dialog><template #header><div>1</div></template><template #default><div>2</div></template><template #footer><div>3</div></template></Dialog>

作用域插槽

作用域插槽由子组件暴露值出来

在子组件动态绑定参数 派发给父组件的slot去使用

    <div><slot name="header"></slot><div><div v-for="item in 100"><slot :data="item"></slot></div></div><slot name="footer"></slot></div>

 通过结构方式取值

         <Dialog><template #header><div>1</div></template><template #default="{ data }"><div>{{ data }}</div></template><template #footer><div>3</div></template></Dialog>

动态插槽

插槽可以是一个变量名

<template><h2>动态插槽动态更改插槽名</h2><Ten><template #[name]><div>我在哪儿</div></template></Ten>
</template><script setup lang="ts">
import { ref, reactive } from "vue";
import Ten from "./components/ten.vue";
// let name = ref("header");
let name = ref("footer");
// let name = ref("default");
</script>

 子组件

<template><div class="header"><slot name="header"></slot></div><div class="main"><slot></slot></div><div class="footer"><slot name="footer"></slot></div>
</template><style lang="scss" scoped>
div {width: 100%;height: 100px;
}
.header {background: antiquewhite;
}
.main {background: aqua;
}
.footer {background: pink;
}
</style>

效果图:

12 vue3之异步组件&代码分包&内置组件suspense和teleport-CSDN博客文章浏览阅读23次。12 vue3之异步组件&代码分包&内置组件suspense和teleporthttps://blog.csdn.net/qq_37550440/article/details/142329387?sharetype=blogdetail&sharerId=142329387&sharerefer=PC&sharesource=qq_37550440&spm=1011.2480.3001.8118

http://www.dinnco.com/news/12784.html

相关文章:

  • 网站 国际化免费b2b网站有哪些
  • 手机网站适合分开做百度云盘登录入口
  • 美术网站建设方案杭州网站搜索排名
  • wordpress4.9.4源码安卓优化大师
  • 武汉做公司网站的公司吸引人的软文标题例子
  • 电子商务网站开发的基本流程包括郑州网络推广厂家
  • 桂林网站开发m0773百度推广账号登录入口
  • 外贸服装网站建设百度推广登录
  • 网站制作公司怎么运营宁波网站建设优化企业
  • 如何查看网站做没做301跳转网站网上推广
  • jsp网站加载慢百度推广方式
  • ps 做ui比较好的网站东莞百度seo推广公司
  • 网站建设实训2022年新闻摘抄十条
  • 传销公司做网站运营东莞seo优化排名推广
  • 建一个收费网站 怎么收费吉林黄页电话查询
  • 网站开发外包业务怎么接站长综合查询工具
  • 建网站要学什么新手怎么做网页
  • 网站开发哪里可做私活深圳百度快照优化
  • 长沙河东做网站百度推广怎么登录
  • 深圳网站建设托管免费seo视频教学
  • 城乡与住房建设部网站西藏自治区seo 标题 关键词优化
  • 专门做字体设计的网站广州网络推广seo
  • 北京建商城网站百度网盘搜索
  • 建美食网站有哪些原因站长推荐入口自动跳转
  • 南通专业做网站网页版
  • 新建网站做优化恩城seo的网站
  • php网站开发心得3500字友情链接方面
  • 做网站需要的程序优化手机性能的软件
  • 公众平台微信公众号登陆系统优化软件有哪些
  • title 镇江网站建设seo优化包括哪些