<div id="app">
<post-list></post-list>
</div>
<script src="https://unpkg.com/vue@next"></script>
<script>
const app = Vue.createApp({
});
const PostItem = {
props: ['author', 'title', 'content'],
template: `
<div>
<h3> {
{ title }} </h3>
<p> 作者: {
{ author }} </p>
<p> {
{ content }} </p>
</div>
`
};
app.component('PostList', {
data(
组件需要多个传值
最新推荐文章于 2023-03-31 17:21:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)