This commit is contained in:
leejinseok
2020-02-14 16:47:10 +09:00
parent 09cfd1c15c
commit 0c3c0088dd

View File

@@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<Header :session="session"/> <Header :session="session"/>
<div v-if="!pending"> <div class="article-wrapper" v-if="!pending">
<article v-for="article in articles" v-bind:key="article.id"> <article v-for="article in articles" v-bind:key="article.id">
<router-link :to="{name: 'DetailArticle', params: {id: article.id}}"> <router-link :to="{name: 'DetailArticle', params: {id: article.id}}">
<span>{{ article.title }}</span> <p class="title">{{ article.title }}</p>
</router-link> </router-link>
<span @click="clickUser">{{ article.user.name }}</span> <span @click="clickUser">{{ article.user.name }}</span>
</article> </article>
@@ -85,4 +85,18 @@
</script> </script>
<style scoped> <style scoped>
article {
display: flex;
align-items: center;
justify-content: space-between;
}
article a {
font-size: 18px;
text-align: left;
}
.article-wrapper {
padding: 20px 16px;
box-sizing: border-box;
}
</style> </style>