You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
579 B
Vue
33 lines
579 B
Vue
6 years ago
|
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
threads: [],
|
||
|
thread: {
|
||
|
id: '',
|
||
|
title: '',
|
||
|
creator: ''
|
||
|
},
|
||
|
thread_id: '',
|
||
|
pagination: {},
|
||
|
edit: false
|
||
|
}
|
||
|
},
|
||
|
|
||
|
created() {
|
||
|
this.fetchThreads();
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
fetchThreads() {
|
||
|
fetch("api/threads")
|
||
|
.then(res => json())
|
||
|
.then(res => {
|
||
|
console.log(res.data);
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|