Call remote from Post component
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user