Mercurial > gemma
comparison client/src/components/ui/UITableBody.vue @ 2408:02d30251d594
client: table component for unified style
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Thu, 28 Feb 2019 11:25:50 +0100 |
parents | |
children | 27d3e9eda8b6 |
comparison
equal
deleted
inserted
replaced
2407:8fc546b03822 | 2408:02d30251d594 |
---|---|
1 <template> | |
2 <div | |
3 class="table-body text-left small" | |
4 :style="'overflow-y: auto; max-height: ' + maxHeight" | |
5 v-if="data.length" | |
6 > | |
7 <div | |
8 v-for="(item, index) in data" | |
9 :key="index" | |
10 :class="['border-top row mx-0', { active: active === item }]" | |
11 > | |
12 <slot :item="item" :index="index"></slot> | |
13 </div> | |
14 </div> | |
15 <div v-else class="small text-center py-3 border-top"> | |
16 <translate>No results.</translate> | |
17 </div> | |
18 </template> | |
19 | |
20 <script> | |
21 /* This is Free Software under GNU Affero General Public License v >= 3.0 | |
22 * without warranty, see README.md and license for details. | |
23 * | |
24 * SPDX-License-Identifier: AGPL-3.0-or-later | |
25 * License-Filename: LICENSES/AGPL-3.0.txt | |
26 * | |
27 * Copyright (C) 2018 by via donau | |
28 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
29 * Software engineering by Intevation GmbH | |
30 * | |
31 * Author(s): | |
32 * Markus Kottländer <markus.kottlaender@intevation.de> | |
33 */ | |
34 | |
35 export default { | |
36 props: { | |
37 data: { | |
38 type: Array | |
39 }, | |
40 maxHeight: { | |
41 type: String, | |
42 default: "18rem" | |
43 }, | |
44 active: { | |
45 type: [Object, Array] | |
46 } | |
47 } | |
48 }; | |
49 </script> |