Files
luos/resources/assets/js/components/dataViews/vueListView/VueListView.vue

82 lines
1.8 KiB
Vue
Raw Normal View History

2021-07-13 15:10:59 +00:00
<template>
<div class="pm-vue-list-view" :height="height">
<div class="pm-vue-list-view-container">
2021-10-06 20:25:42 +00:00
<div class="pm-vue-list-view-body" :style="{ height: height + 'px' }">
<vue-list
v-for="item in data"
:key="item.id"
:item="item"
:options="options"
>
<b-row>
2021-10-06 20:25:42 +00:00
<b-col sm="10">
<b-row>
<b-col sm="5" v-for="column in options.columns" :key="column">
<slot
:name="column"
:item="item"
:column="column"
:headings="options.headings"
>
</slot>
</b-col>
</b-row>
</b-col>
<b-col sm="2">
2021-10-06 20:25:42 +00:00
<slot name="actions" :item="item"></slot>
</b-col>
</b-row>
2021-07-13 15:10:59 +00:00
</vue-list>
</div>
<div class="pm-vue-list-view-footer">
2021-08-31 20:49:23 +00:00
<a @click="viewMore" class="list-group-item">{{ loadMore }}</a>
2021-07-13 15:10:59 +00:00
</div>
</div>
</div>
</template>
<script>
import VueList from "./VueList.vue";
import DefaultMixins from "./VueListViewMixins";
export default {
name: "VueListView",
mixins: [DefaultMixins],
components: {
VueList,
},
props: ["options"],
data() {
return {
2021-10-05 21:29:50 +00:00
loadMore: this.$t("ID_LOAD_MORE"),
2021-10-06 20:25:42 +00:00
chunkColumns: [],
2021-07-13 15:10:59 +00:00
};
},
2021-10-06 20:25:42 +00:00
mounted() {},
2021-07-13 15:10:59 +00:00
methods: {
classBtn(cls) {
return "btn btn-slim btn-force-radius v-btn-header " + cls;
2021-10-06 20:32:05 +00:00
}
2021-07-13 15:10:59 +00:00
},
};
</script>
<style>
.pm-vue-list-view {
font-family: "proxima-nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 0.9rem;
}
.pm-vue-list-view-body {
border: 1px solid rgba(0, 0, 0, 0.125);
padding-bottom: 5px;
margin-top: 5px;
overflow-y: auto;
}
.pm-vue-list-view-footer {
text-align: center;
line-height: 1.25;
}
</style>