File tree Expand file tree Collapse file tree 4 files changed +544
-5
lines changed
Expand file tree Collapse file tree 4 files changed +544
-5
lines changed Original file line number Diff line number Diff line change 3434 </v-col >
3535 </v-row >
3636
37- <v-row >
38- <v-col cols =" 12" >
37+ <v-row class = " fill-height " align = " center " justify = " center " >
38+ <v-col v-if = " results.length > 0 " cols =" 12" >
3939 <v-chip
40- v-for =" n in results "
40+ v-for =" n in sortedResults "
4141 :key =" n"
4242 color =" cyan lighten-3"
4343 label
4747 {{ n }}
4848 </v-chip >
4949 </v-col >
50+
51+ <v-col v-else cols =" 12" class =" mt-16" >
52+ <v-img height =" 100%" src =" /analytics.svg" ></v-img >
53+ </v-col >
5054 </v-row >
5155 </div >
5256</template >
@@ -57,10 +61,17 @@ export default {
5761 return {
5862 total: null ,
5963 randomNumbers: null ,
60- results: [],
64+ results: []. sort () ,
6165 }
6266 },
63- computed: {},
67+ computed: {
68+ sortedResults () {
69+ const results = this .results .slice ()
70+ return results .sort (function (a , b ) {
71+ return a - b
72+ })
73+ },
74+ },
6475 methods: {
6576 getRandomNumber (results ) {
6677 this .results = []
You can’t perform that action at this time.
0 commit comments