@farm-investimentos/front-mfe-components 2.2.5 → 2.2.6
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/front-mfe-components.common.js +70 -52
- package/dist/front-mfe-components.common.js.map +1 -1
- package/dist/front-mfe-components.css +1 -1
- package/dist/front-mfe-components.umd.js +70 -52
- package/dist/front-mfe-components.umd.js.map +1 -1
- package/dist/front-mfe-components.umd.min.js +1 -1
- package/dist/front-mfe-components.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DataTableHeader/DataTableHeader.vue +21 -5
package/package.json
CHANGED
|
@@ -44,17 +44,33 @@ export default Vue.extend({
|
|
|
44
44
|
VIcon,
|
|
45
45
|
},
|
|
46
46
|
props: {
|
|
47
|
+
/**
|
|
48
|
+
* Cabeçalho
|
|
49
|
+
*/
|
|
47
50
|
headers: {
|
|
48
51
|
type: Array,
|
|
49
52
|
require: true,
|
|
50
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* Array para controle da exibição da ordenação
|
|
56
|
+
*/
|
|
51
57
|
sortClick: {
|
|
52
58
|
type: Array,
|
|
53
59
|
require: true,
|
|
54
60
|
},
|
|
61
|
+
/**
|
|
62
|
+
* Começar selecionado
|
|
63
|
+
*/
|
|
55
64
|
firstSelected: {
|
|
56
65
|
type: Boolean,
|
|
57
|
-
default:
|
|
66
|
+
default: false,
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Index do item do cabeçalho que deve começar selecionado
|
|
70
|
+
*/
|
|
71
|
+
selectedIndex: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 0,
|
|
58
74
|
},
|
|
59
75
|
},
|
|
60
76
|
methods: {
|
|
@@ -88,8 +104,8 @@ export default Vue.extend({
|
|
|
88
104
|
this.sortClick[i].show = false;
|
|
89
105
|
}
|
|
90
106
|
},
|
|
91
|
-
|
|
92
|
-
if (index ===
|
|
107
|
+
checkFirstSelected(index) {
|
|
108
|
+
if (index === this.selectedIndex) {
|
|
93
109
|
return this.firstSelected;
|
|
94
110
|
}
|
|
95
111
|
return false;
|
|
@@ -104,8 +120,8 @@ export default Vue.extend({
|
|
|
104
120
|
[this.headers[i].value]: false,
|
|
105
121
|
descending: 'ASC',
|
|
106
122
|
field: this.headers[i].value,
|
|
107
|
-
clicked: this.
|
|
108
|
-
show: this.
|
|
123
|
+
clicked: this.checkFirstSelected(i),
|
|
124
|
+
show: this.checkFirstSelected(i),
|
|
109
125
|
});
|
|
110
126
|
}
|
|
111
127
|
},
|