@farm-investimentos/front-mfe-components 2.4.2 → 2.4.3
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 +91 -53
- 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 +91 -53
- 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.scss +1 -1
- package/src/components/DataTableHeader/DataTableHeader.vue +37 -0
package/package.json
CHANGED
|
@@ -31,6 +31,14 @@
|
|
|
31
31
|
mdi-sort-descending
|
|
32
32
|
</v-icon>
|
|
33
33
|
</span>
|
|
34
|
+
|
|
35
|
+
<span v-if="isTHDataTableSelect(item)">
|
|
36
|
+
<v-simple-checkbox
|
|
37
|
+
:indeterminate="headerProps.someItems && !headerProps.everyItem"
|
|
38
|
+
v-model="inputVal"
|
|
39
|
+
@input="selectAll"
|
|
40
|
+
></v-simple-checkbox>
|
|
41
|
+
</span>
|
|
34
42
|
</th>
|
|
35
43
|
</tr>
|
|
36
44
|
</thead>
|
|
@@ -39,10 +47,13 @@
|
|
|
39
47
|
<script>
|
|
40
48
|
import Vue from 'vue';
|
|
41
49
|
import VIcon from 'vuetify/lib/components/VIcon';
|
|
50
|
+
import VSimpleCheckbox from 'vuetify/lib/components/VCheckbox/VSimpleCheckbox';
|
|
51
|
+
|
|
42
52
|
export default Vue.extend({
|
|
43
53
|
name: 'farm-datatable-header',
|
|
44
54
|
components: {
|
|
45
55
|
VIcon,
|
|
56
|
+
VSimpleCheckbox,
|
|
46
57
|
},
|
|
47
58
|
props: {
|
|
48
59
|
/**
|
|
@@ -73,6 +84,28 @@ export default Vue.extend({
|
|
|
73
84
|
type: Number,
|
|
74
85
|
default: 0,
|
|
75
86
|
},
|
|
87
|
+
/**
|
|
88
|
+
* v-model for data-table-select
|
|
89
|
+
*/
|
|
90
|
+
value: {
|
|
91
|
+
required: true,
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Original header props
|
|
95
|
+
*/
|
|
96
|
+
headerProps: {
|
|
97
|
+
type: Object,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
computed: {
|
|
101
|
+
inputVal: {
|
|
102
|
+
get() {
|
|
103
|
+
return this.value;
|
|
104
|
+
},
|
|
105
|
+
set(val) {
|
|
106
|
+
this.$emit('input', val);
|
|
107
|
+
},
|
|
108
|
+
},
|
|
76
109
|
},
|
|
77
110
|
methods: {
|
|
78
111
|
getTypeSort(value) {
|
|
@@ -120,6 +153,10 @@ export default Vue.extend({
|
|
|
120
153
|
isTHDataTableSelect(item) {
|
|
121
154
|
return item.value === 'data-table-select';
|
|
122
155
|
},
|
|
156
|
+
selectAll(value) {
|
|
157
|
+
this.$emit('toggleSelectAll', value);
|
|
158
|
+
this.inputVal = value;
|
|
159
|
+
},
|
|
123
160
|
},
|
|
124
161
|
created() {
|
|
125
162
|
for (let i = 0; i < this.headers.length; i += 1) {
|