Skip to content

Commit

Permalink
Vueコンポーネント版でcomputedを活用するようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
yocajii committed Aug 10, 2022
1 parent e49d078 commit d2efecd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/javascript/report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:href='report.url'
)
img.card-list-item-title__emotion-image(
:src='`/images/emotion/${report.emotion}.svg`',
:src='emotionImg',
:alt='report.emotion'
)
| {{ report.title }}
Expand Down Expand Up @@ -97,6 +97,9 @@ export default {
},
wipClass() {
return { 'is-wip': this.report.wip }
},
emotionImg() {
return `/images/emotion/${this.report.emotion}.svg`
}
}
}
Expand Down

0 comments on commit d2efecd

Please sign in to comment.