blob: f361e3b1b959d4dda3ab8c9cfc184e070416dc6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<template>
<div class="list">
<slot name="item" v-for="item in items" :item="item" />
<div class="list-empty-content faint" v-if="items.length === 0">
<slot name="empty" />
</div>
</div>
</template>
<script>
export default {
props: {
items: {
type: Array,
default: () => []
}
}
}
</script>
<style lang="scss">
.list {
&-empty-content {
text-align: center;
padding: 10px;
}
}
</style>
|