一、定义函数式组件:(MyFunctionalComponent.vue)

<template functional>
<div>
<h1>{{props.username}}</h1>
</div>
</template>
<script>

</script>

二、在其它组件中引入上述函数式组件,并给其传值:
1.在script段里加上:

import MyFunctionalComponent from './MyFunctionalComponent.vue'

2.在template段里加上:

<MyFunctionalComponent  username="Paul"></MyFunctionalComponent>