fix custom case list view mode

This commit is contained in:
Rodrigo Quelca
2021-10-05 21:29:50 +00:00
parent fc204a41ac
commit 71b8c4263c
4 changed files with 185 additions and 230 deletions

View File

@@ -15,12 +15,12 @@
:column="column"
:headings="options.headings"
></slot>
<slot
<!-- <slot
name="send_by"
:item="item"
column="send_by"
:headings="options.headings"
></slot>
></slot> -->
</b-col>
<b-col sm="3">
<slot
@@ -55,7 +55,7 @@ export default {
};
},
mounted() {
this.filterOptions();
// this.filterOptions();
},
methods: {
classBtn(cls) {
@@ -65,6 +65,7 @@ export default {
* Filter the column send_by
*/
filterOptions() {
debugger;
this.options.columns = this.options.columns.filter(function(item) {
return item !== "send_by";
});

View File

@@ -9,7 +9,7 @@
<b-row>
<b-col sm="5">
<slot
v-for="column in options.columns"
v-for="column in chunkColumns[0]"
:name="column"
:item="item"
:column="column"
@@ -18,11 +18,19 @@
></slot>
</b-col>
<b-col sm="5">
<slot
<!-- <slot
name="send_by"
:item="item"
column="send_by"
:headings="options.headings"
></slot> -->
<slot
v-for="column in chunkColumns[1]"
:name="column"
:item="item"
:column="column"
:headings="options.headings"
ref="containerList"
></slot>
</b-col>
<b-col sm="2">
@@ -54,13 +62,23 @@ export default {
props: ["options"],
data() {
return {
loadMore: this.$t("ID_LOAD_MORE")
loadMore: this.$t("ID_LOAD_MORE"),
chunkColumns: []
};
},
mounted() {
this.filterOptions();
this.chunkColumns = this.chunkArray(this.options.columns, 2);
debugger
},
methods: {
chunkArray(array, size) {
let result = [],
arrayCopy = [...array];
while (arrayCopy.length > 0) {
result.push(arrayCopy.splice(0, size));
}
return result;
},
classBtn(cls) {
return "btn btn-slim btn-force-radius v-btn-header " + cls;
},