Merge branch 'master' of kvacek.cz:poletani.cz/app into ssr
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import {randomInt} from "src/composables/random";
|
||||
import {onBeforeMount, onMounted, ref} from "vue";
|
||||
import {computed} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
itemsCountMin: {
|
||||
@@ -12,19 +12,18 @@ const props = defineProps({
|
||||
type: Number,
|
||||
required:false,
|
||||
default: 5
|
||||
},
|
||||
items: {
|
||||
type: Number, required: false,
|
||||
}
|
||||
});
|
||||
|
||||
const items = ref(0);
|
||||
onMounted(() => {
|
||||
items.value = randomInt(props.itemsCountMin, props.itemsCountMax);
|
||||
})
|
||||
|
||||
const renderedItems = computed(() => props.items || randomInt(props.itemsCountMin, props.itemsCountMax));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-list bordered separator>
|
||||
<q-item v-ripple v-for="i in items" :key="i">
|
||||
<q-item v-ripple v-for="i in renderedItems" :key="i">
|
||||
<q-item-section avatar>
|
||||
<q-skeleton type="QAvatar" />
|
||||
</q-item-section>
|
||||
|
||||
Reference in New Issue
Block a user