aloha-vue 1.2.18 → 1.2.20
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/src/ATable/ATable.js
CHANGED
|
@@ -280,6 +280,11 @@ export default {
|
|
|
280
280
|
required: false,
|
|
281
281
|
default: true,
|
|
282
282
|
},
|
|
283
|
+
rowClass: {
|
|
284
|
+
type: [String, Object, Function],
|
|
285
|
+
required: false,
|
|
286
|
+
default: undefined,
|
|
287
|
+
},
|
|
283
288
|
rowsCountRenderPerTick: {
|
|
284
289
|
type: Number,
|
|
285
290
|
required: false,
|
|
@@ -748,6 +753,7 @@ export default {
|
|
|
748
753
|
disabledPreview: this.disabledPreview,
|
|
749
754
|
disabledRowActions: this.disabledRowActions,
|
|
750
755
|
row,
|
|
756
|
+
rowClass: this.rowClass,
|
|
751
757
|
rowIndex,
|
|
752
758
|
isPreviewDownOpen: this.previewDownRowIndexes[rowIndex],
|
|
753
759
|
isRowActionsStickyLocal: this.isRowActionsStickyLocal,
|
|
@@ -780,6 +786,7 @@ export default {
|
|
|
780
786
|
disabledPreview: this.disabledPreview,
|
|
781
787
|
disabledRowActions: this.disabledRowActions,
|
|
782
788
|
row,
|
|
789
|
+
rowClass: this.rowClass,
|
|
783
790
|
rowIndex,
|
|
784
791
|
isRowActionsStickyLocal: this.isRowActionsStickyLocal,
|
|
785
792
|
rowActionsClass: this.rowActionsClass,
|
|
@@ -262,6 +262,10 @@ export default {
|
|
|
262
262
|
h("span", "aloha"),
|
|
263
263
|
],
|
|
264
264
|
}),
|
|
265
|
+
this.$slots.tableActionsAppend && this.$slots.tableActionsAppend({
|
|
266
|
+
isMultipleActionsActive: this.isMultipleActionsActive,
|
|
267
|
+
modelView: this.modelView,
|
|
268
|
+
}),
|
|
265
269
|
]),
|
|
266
270
|
]),
|
|
267
271
|
this.isMultipleActionsActive && h("div", {
|
|
@@ -298,10 +302,6 @@ export default {
|
|
|
298
302
|
}),
|
|
299
303
|
]),
|
|
300
304
|
]),
|
|
301
|
-
this.$slots.tableActionsAppend && this.$slots.tableActionsAppend({
|
|
302
|
-
isMultipleActionsActive: this.isMultipleActionsActive,
|
|
303
|
-
modelView: this.modelView,
|
|
304
|
-
}),
|
|
305
305
|
h("div", {
|
|
306
306
|
class: "a_table__multiple_panel__actions",
|
|
307
307
|
}, [
|
|
@@ -3,8 +3,11 @@ import {
|
|
|
3
3
|
inject,
|
|
4
4
|
toRef,
|
|
5
5
|
} from "vue";
|
|
6
|
+
import { isFunction } from "lodash-es";
|
|
6
7
|
|
|
7
8
|
export default function AttributesAPI(props) {
|
|
9
|
+
const row = toRef(props, "row");
|
|
10
|
+
const rowClass = toRef(props, "rowClass");
|
|
8
11
|
const rowIndex = toRef(props, "rowIndex");
|
|
9
12
|
|
|
10
13
|
const hasPreview = inject("hasPreview");
|
|
@@ -26,11 +29,25 @@ export default function AttributesAPI(props) {
|
|
|
26
29
|
rowIndex.value === previewRightRowIndexLast.value;
|
|
27
30
|
});
|
|
28
31
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const rowClassLocal = computed(() => {
|
|
33
|
+
if (isFunction(rowClass.value)) {
|
|
34
|
+
return rowClass.value({
|
|
35
|
+
row: row.value,
|
|
36
|
+
rowindex: rowIndex.value,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return rowClass.value;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const rowClassComputed = computed(() => {
|
|
43
|
+
return [
|
|
44
|
+
"a_table__row a_table__row_hover",
|
|
45
|
+
{
|
|
46
|
+
a_table__row_focus: isPreviewRightForCurrentRowOpen.value,
|
|
47
|
+
a_table__row_focus_was: isPreviewRightForCurrentRowWasOpen.value,
|
|
48
|
+
},
|
|
49
|
+
rowClassLocal.value
|
|
50
|
+
];
|
|
34
51
|
});
|
|
35
52
|
|
|
36
53
|
const roleLocal = computed(() => {
|
|
@@ -40,7 +57,7 @@ export default function AttributesAPI(props) {
|
|
|
40
57
|
const rowAttributes = computed(() => {
|
|
41
58
|
const ATTRIBUTES = {
|
|
42
59
|
id: rowId.value,
|
|
43
|
-
class:
|
|
60
|
+
class: rowClassComputed.value,
|
|
44
61
|
role: roleLocal.value,
|
|
45
62
|
};
|
|
46
63
|
if (hasPreview.value) {
|