Call remote from Post component

This commit is contained in:
Raymonzut
2020-04-25 16:39:56 +02:00
parent 3b22f15a45
commit 8cdc2f8767
+13
View File
@@ -8,8 +8,21 @@
</template> </template>
<script> <script>
import { getPosts } from '../remote'
export default { export default {
name: "Post", name: "Post",
data() {
return {
post: {},
}
},
methods: {
getPosts
},
mounted() {
getPosts.call(this, this._props.id)
},
props: { props: {
id: { id: {
type: String, type: String,