I am currently working on developing a lottery number service, and I am curious about how to set up computed properties. I came across the Vue.js documentation for computed properties at https://v2.vuejs.org/v2/guide/computed.html#Computed-Properties. I tried to follow the guidelines provided in the documentation, but I seem to be making some mistakes.
<script async src="//jsfiddle.net/rhmyqswp/embed/"></script>
<section class="saved-lotto-numbers">
<div class="saved-lotto-number-box" v-if="savedNumbers.length">
<ul class="saved-number-list">
<li v-for=" (savedlottoNumber,index) in savedNumbers" class="saved-lotto-number">
<span class="eachnumber">{{savedlottoNumber.numbers}}</span>
<!-- <span class="eachnumber">{{ displayNumbers(savedlottoNumber.numbers)}}</span> -->
</li>
</ul>
</div>
</section>
<!-- <span class="eachnumber"&g...
In this section, I am attempting to implement the computed method because I encountered an issue while trying to include an image. Due to restrictions, I have replaced the image URL.
https://scontent-icn1-1.xx.fbcdn.net/v/t31.0-0/p280x280/20231970_1418449444910830_4818341573312628187_o.jpg?oh=7457496ac48f6182ae4bca5e88370113&oe=5A105736)
After clicking the save button, it displayed 'this one []', prompting me to set up a computed property.
computed: {
displayNumbers: function(Numbers) {
return Numbers;
}
}
Initially, I expected to see the same result on the screen since I was only returning a value without any additional actions. However, I encountered a power error.
https://scontent-icn1-1.xx.fbcdn.net/v/t1.0-9/20106562_1418455411576900_6516857588571883325_n.jpg?oh=612817d9a803303f42c9bb107993b919&oe=59C8C567