1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| <script setup>
| import {computed} from "vue";
|
| const props = defineProps({
| posts: {
| type: Array,
| default() {
| return [];
| }
| }
| })
|
| const matchPosts = computed(()=>{
| return props.posts.map(item=>{
| return item;
| });
| });
| </script>
|
| <template>
| <div>{{posts}}</div>
| {{matchPosts}}
| </template>
|
| <style scoped>
|
| </style>
|
|