@monoui/vuejs 1.1.87 → 1.1.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/src/components/Table/Table.vue +21 -7
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
`table mt-0 w-100 d-block d-md-table table-hover flex-grow-1 ${tableClass}`
|
|
26
26
|
"
|
|
27
27
|
>
|
|
28
|
-
<thead :class="`${headerClass} w-100`">
|
|
28
|
+
<thead v-if="showHeader" :class="`${headerClass} w-100`">
|
|
29
29
|
<tr>
|
|
30
30
|
<slot name="header" v-bind="columns">
|
|
31
31
|
<template
|
|
@@ -476,6 +476,11 @@ export default {
|
|
|
476
476
|
required: false,
|
|
477
477
|
default: ""
|
|
478
478
|
},
|
|
479
|
+
showHeader: {
|
|
480
|
+
type: Boolean,
|
|
481
|
+
required: false,
|
|
482
|
+
default: true
|
|
483
|
+
},
|
|
479
484
|
tableClass: {
|
|
480
485
|
type: String,
|
|
481
486
|
required: false,
|
|
@@ -604,6 +609,11 @@ export default {
|
|
|
604
609
|
handler: function(newValue) {
|
|
605
610
|
if (!this.comingFromPopState) this.addFilter(newValue);
|
|
606
611
|
}
|
|
612
|
+
},
|
|
613
|
+
perPage: {
|
|
614
|
+
handler: function(newValue) {
|
|
615
|
+
this.settings.itemPerPage = newValue || 10;
|
|
616
|
+
}
|
|
607
617
|
}
|
|
608
618
|
},
|
|
609
619
|
data() {
|
|
@@ -636,13 +646,17 @@ export default {
|
|
|
636
646
|
},
|
|
637
647
|
computed: {
|
|
638
648
|
filteredPerPageValues() {
|
|
639
|
-
const
|
|
649
|
+
const valuesSet = new Set();
|
|
640
650
|
for (const value of this.perPageValues) {
|
|
641
651
|
if (value <= this.settings.totalItemCount) {
|
|
642
|
-
|
|
652
|
+
valuesSet.add(value);
|
|
643
653
|
}
|
|
644
654
|
}
|
|
645
|
-
|
|
655
|
+
// Include current itemPerPage if it's a custom value not in perPageValues
|
|
656
|
+
if (!this.perPageValues.includes(this.settings.itemPerPage)) {
|
|
657
|
+
valuesSet.add(this.settings.itemPerPage);
|
|
658
|
+
}
|
|
659
|
+
return Array.from(valuesSet).sort((a, b) => a - b);
|
|
646
660
|
},
|
|
647
661
|
itemPerPageText() {
|
|
648
662
|
if (
|
|
@@ -863,7 +877,7 @@ export default {
|
|
|
863
877
|
const splitted = key.split(".");
|
|
864
878
|
return splitted.reduce(
|
|
865
879
|
(obj, key) =>
|
|
866
|
-
obj && obj[key] !==
|
|
880
|
+
obj && obj[key] !== undefined ? obj[key] : undefined,
|
|
867
881
|
row
|
|
868
882
|
);
|
|
869
883
|
},
|
|
@@ -938,7 +952,7 @@ export default {
|
|
|
938
952
|
url = this.addHistoryParameter(
|
|
939
953
|
`f-${filter.Column}`,
|
|
940
954
|
filter.Value,
|
|
941
|
-
this.
|
|
955
|
+
this.historyStorage,
|
|
942
956
|
url,
|
|
943
957
|
false
|
|
944
958
|
);
|
|
@@ -948,7 +962,7 @@ export default {
|
|
|
948
962
|
url = this.addHistoryParameter(
|
|
949
963
|
`s-${sort.Column}`,
|
|
950
964
|
sort.Asc ? 1 : 0,
|
|
951
|
-
this.
|
|
965
|
+
this.historyStorage,
|
|
952
966
|
url,
|
|
953
967
|
false
|
|
954
968
|
);
|