vueless 0.0.409 → 0.0.410
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
package/ui.data-table/UTable.vue
CHANGED
|
@@ -190,8 +190,8 @@
|
|
|
190
190
|
:columns="columns"
|
|
191
191
|
:config="config"
|
|
192
192
|
:attrs="keysAttrs"
|
|
193
|
-
v-bind="getRowAttrs(row
|
|
194
|
-
:class="cx([getRowAttrs(row.id).class, row
|
|
193
|
+
v-bind="getRowAttrs(row)"
|
|
194
|
+
:class="cx([getRowAttrs(row.id).class, getRowClasses(row)])"
|
|
195
195
|
@click="onClickRow"
|
|
196
196
|
@toggle-row-visibility="onToggleRowVisibility"
|
|
197
197
|
>
|
|
@@ -613,6 +613,12 @@ function getRowAttrs(rowId) {
|
|
|
613
613
|
return selectedRows.value.includes(rowId) ? bodyRowCheckedAttrs : bodyRowAttrs;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
+
function getRowClasses(row) {
|
|
617
|
+
const rowClasses = row?.class || "";
|
|
618
|
+
|
|
619
|
+
return typeof rowClasses === "function" ? rowClasses(row) : rowClasses;
|
|
620
|
+
}
|
|
621
|
+
|
|
616
622
|
function setFooterCellWidth(width) {
|
|
617
623
|
const ZERO_WIDTH = 0;
|
|
618
624
|
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
v-for="(value, key, index) in getFilteredRow(row, columns)"
|
|
16
16
|
:key="index"
|
|
17
17
|
v-bind="getCellAttrs(key, row, index)"
|
|
18
|
-
:class="
|
|
18
|
+
:class="
|
|
19
|
+
cx([getCellAttrs(key, row, index).class, columns[index].tdClass, getCellClasses(row, key)])
|
|
20
|
+
"
|
|
19
21
|
>
|
|
20
22
|
<div
|
|
21
23
|
v-if="(row.row || nestedLevel || row.nestedData) && index === 0"
|
|
@@ -188,6 +190,12 @@ onMounted(() => {
|
|
|
188
190
|
cellRef.value.forEach(setElementTitle);
|
|
189
191
|
});
|
|
190
192
|
|
|
193
|
+
function getCellClasses(row, key) {
|
|
194
|
+
const cellClasses = row[key]?.class || "";
|
|
195
|
+
|
|
196
|
+
return typeof cellClasses === "function" ? cellClasses(row[key].value, row) : cellClasses;
|
|
197
|
+
}
|
|
198
|
+
|
|
191
199
|
function isCellObject(value) {
|
|
192
200
|
return typeof value === "object" && value !== null && ("primary" in value || "value" in value);
|
|
193
201
|
}
|