v-slot vue2.6新增指令使用指南
生活随笔
收集整理的這篇文章主要介紹了
v-slot vue2.6新增指令使用指南
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
子組件
<template><div class="wrapper"><slot name="demo" :msg="msg" text="this is a slot demo , ">this is demo slot.</slot></div>
</template><script>export default {components: {},props: {},data() {return {msg: 'nmb'}},watch: {},computed: {},methods: {},created() {},mounted() {}}
</script>
<style lang="scss" scoped>
.wrapper {
}
</style>
父組件<father><template v-slot:demo="scope">sb<p>{{ scope.text }}{{ scope.msg }}</p></template></father>
轉載于:https://www.cnblogs.com/smzd/p/11395166.html
總結
以上是生活随笔為你收集整理的v-slot vue2.6新增指令使用指南的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 液压系统原理动画_「修机」64个基本液压
- 下一篇: vue watch