wave-ui 4.2.2 → 4.2.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "A UI framework for Vue.js 3 (and 2) with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"homepage": "https://antoniandre.github.io/wave-ui",
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
table.w-table__table(
|
|
5
5
|
@mousedown="onMouseDown"
|
|
6
6
|
@mouseover="onMouseOver"
|
|
7
|
-
@mouseout="onMouseOut"
|
|
7
|
+
@mouseout="onMouseOut"
|
|
8
|
+
:class="tableClass")
|
|
8
9
|
colgroup(ref="colgroup")
|
|
9
10
|
col.w-table__col(
|
|
10
11
|
v-for="(header, i) in headers"
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
v-else
|
|
76
77
|
@click="doSelectRow(item, i)"
|
|
77
78
|
@pointerdown="onRowPointerDown"
|
|
78
|
-
:class="{ 'w-table__row--selected': selectedRowsByUid[item._uid] !== undefined, 'w-table__row--expanded': expandedRowsByUid[item._uid] !== undefined, [item.class]: item.class }")
|
|
79
|
+
:class="[{ 'w-table__row--selected': selectedRowsByUid[item._uid] !== undefined, 'w-table__row--expanded': expandedRowsByUid[item._uid] !== undefined, [item.class]: item.class }, itemClass]")
|
|
79
80
|
template(v-for="(header, j) in headers")
|
|
80
81
|
td.w-table__cell(
|
|
81
82
|
v-if="$slots[`item-cell.${header.key}`] || $slots[`item-cell.${j + 1}`] || $slots['item-cell']"
|
|
@@ -278,8 +279,10 @@ export default {
|
|
|
278
279
|
return true
|
|
279
280
|
}
|
|
280
281
|
},
|
|
281
|
-
|
|
282
|
-
|
|
282
|
+
tableClass: { type: [String, Array, Object] },
|
|
283
|
+
headerClass: { type: [String, Array, Object] },
|
|
284
|
+
// Provide a global CSS class for the table rows, you can also use the item.class prop to add dynamic class per row.
|
|
285
|
+
itemClass: { type: [String, Array, Object] }
|
|
283
286
|
},
|
|
284
287
|
|
|
285
288
|
emits: [
|
|
@@ -369,9 +372,7 @@ export default {
|
|
|
369
372
|
'w-table--resizing': this.colResizing.dragging,
|
|
370
373
|
'w-table--fixed-header': this.fixedHeaders,
|
|
371
374
|
'w-table--fixed-footer': this.fixedFooter,
|
|
372
|
-
'w-table--sticky-column': this.hasStickyColumn
|
|
373
|
-
'w-table--dark': this.dark,
|
|
374
|
-
'w-table--light': this.light
|
|
375
|
+
'w-table--sticky-column': this.hasStickyColumn
|
|
375
376
|
}
|
|
376
377
|
},
|
|
377
378
|
|
|
@@ -406,13 +407,16 @@ export default {
|
|
|
406
407
|
|
|
407
408
|
methods: {
|
|
408
409
|
headerClasses (header) {
|
|
409
|
-
return
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
return [
|
|
411
|
+
{
|
|
412
|
+
'w-ripple': this.rippleActive && header.sortable !== false,
|
|
413
|
+
'w-table__header--sortable': header.sortable !== false, // Can also be falsy with `0`.
|
|
414
|
+
'w-table__header--sticky': header.sticky,
|
|
415
|
+
'w-table__header--resizable': !!this.resizableColumns,
|
|
416
|
+
[`text-${header.align || 'left'}`]: true
|
|
417
|
+
},
|
|
418
|
+
this.headerClass // Natively supports string, object and array.
|
|
419
|
+
]
|
|
416
420
|
},
|
|
417
421
|
|
|
418
422
|
cellClasses (header) {
|