aloha-vue 1.2.191 → 1.2.193
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 +1 -1
- package/src/AGroupButtonDropdown/AGroupButtonDropdown.js +6 -0
- package/src/AGroupButtonDropdown/AGroupButtonDropdownItem/AGroupButtonDropdownItem.js +6 -1
- package/src/ATable/ATable.js +19 -6
- package/src/ATable/ATableTdAction/ATableTdAction.js +11 -5
- package/src/styles/components/ATable.scss +1 -1
package/package.json
CHANGED
|
@@ -28,6 +28,11 @@ export default {
|
|
|
28
28
|
required: false,
|
|
29
29
|
default: () => [],
|
|
30
30
|
},
|
|
31
|
+
btnGroupClass: {
|
|
32
|
+
type: [String, Array, Object],
|
|
33
|
+
required: false,
|
|
34
|
+
default: "a_btn_group",
|
|
35
|
+
},
|
|
31
36
|
disabled: {
|
|
32
37
|
type: Boolean,
|
|
33
38
|
required: false,
|
|
@@ -95,6 +100,7 @@ export default {
|
|
|
95
100
|
}, [
|
|
96
101
|
...this.actionsGrouped.buttons.map((item, itemIndex) => {
|
|
97
102
|
return h(AGroupButtonDropdownItem, {
|
|
103
|
+
btnGroupClass: this.btnGroupClass,
|
|
98
104
|
data: item,
|
|
99
105
|
disabled: this.disabled,
|
|
100
106
|
actionsDropdown: this.actionsGrouped.dropdown,
|
|
@@ -27,6 +27,11 @@ export default {
|
|
|
27
27
|
type: Array,
|
|
28
28
|
required: true,
|
|
29
29
|
},
|
|
30
|
+
btnGroupClass: {
|
|
31
|
+
type: [String, Array, Object],
|
|
32
|
+
required: false,
|
|
33
|
+
default: "a_btn_group",
|
|
34
|
+
},
|
|
30
35
|
data: {
|
|
31
36
|
type: Object,
|
|
32
37
|
required: true,
|
|
@@ -66,7 +71,7 @@ export default {
|
|
|
66
71
|
render() {
|
|
67
72
|
return [
|
|
68
73
|
!!this.data.children.length && h("div", {
|
|
69
|
-
class:
|
|
74
|
+
class: this.btnGroupClass,
|
|
70
75
|
}, [
|
|
71
76
|
...this.data.children.map(action => {
|
|
72
77
|
let classLocal = action.classButton ? action.classButton : this.actionsClasses[action.actionNotDividerIndex];
|
package/src/ATable/ATable.js
CHANGED
|
@@ -63,6 +63,24 @@ export default {
|
|
|
63
63
|
required: false,
|
|
64
64
|
default: true,
|
|
65
65
|
},
|
|
66
|
+
columnActionsOnePlusDropdownOptions: {
|
|
67
|
+
type: Object,
|
|
68
|
+
required: false,
|
|
69
|
+
default: () => ({
|
|
70
|
+
actionsClasses: ["a_btn a_btn_primary a_text_truncate"],
|
|
71
|
+
btnGroupClass: "a_btn_group a_btn_group_table",
|
|
72
|
+
hasDividerBeforeDropdown: false,
|
|
73
|
+
indexFirstDropdownAction: 1,
|
|
74
|
+
indexFirstDropdownActionMobile: 1,
|
|
75
|
+
minDropdownActions: 1,
|
|
76
|
+
}),
|
|
77
|
+
},
|
|
78
|
+
columnActionsView: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
default: "dropdown",
|
|
82
|
+
validator: value => ["onePlusDropdown", "onePlusDropdownEmptyPlace", "dropdown"].indexOf(value) !== -1,
|
|
83
|
+
},
|
|
66
84
|
columnActionsWidth: {
|
|
67
85
|
type: Number,
|
|
68
86
|
required: false,
|
|
@@ -84,12 +102,6 @@ export default {
|
|
|
84
102
|
required: false,
|
|
85
103
|
default: undefined,
|
|
86
104
|
},
|
|
87
|
-
columnActionsView: {
|
|
88
|
-
type: String,
|
|
89
|
-
required: false,
|
|
90
|
-
default: "dropdown",
|
|
91
|
-
validator: value => ["onePlusDropdown", "onePlusDropdownEmptyPlace", "dropdown"].indexOf(value) !== -1,
|
|
92
|
-
},
|
|
93
105
|
columns: {
|
|
94
106
|
type: Array,
|
|
95
107
|
required: true,
|
|
@@ -457,6 +469,7 @@ export default {
|
|
|
457
469
|
provide() {
|
|
458
470
|
return {
|
|
459
471
|
changeModelColumnsVisible: this.changeModelColumnsVisible,
|
|
472
|
+
columnActionsOnePlusDropdownOptions: computed(() => this.columnActionsOnePlusDropdownOptions),
|
|
460
473
|
columns: computed(() => this.columns),
|
|
461
474
|
columnsDefaultValue: computed(() => this.columnsDefaultValue),
|
|
462
475
|
columnWidthDefault: computed(() => this.columnWidthDefault),
|
|
@@ -12,6 +12,10 @@ import RowActionsAPI from "../compositionAPI/RowActionsAPI";
|
|
|
12
12
|
import RowNumberAPI from "./compositionAPI/RowNumberAPI.js";
|
|
13
13
|
import StylesThTdAction from "../ATableHeaderThAction/compositionAPI/StylesThTdAction";
|
|
14
14
|
|
|
15
|
+
import {
|
|
16
|
+
isUndefined,
|
|
17
|
+
} from "lodash-es";
|
|
18
|
+
|
|
15
19
|
export default {
|
|
16
20
|
name: "ATableTdAction",
|
|
17
21
|
components: {
|
|
@@ -55,6 +59,7 @@ export default {
|
|
|
55
59
|
},
|
|
56
60
|
},
|
|
57
61
|
inject: [
|
|
62
|
+
"columnActionsOnePlusDropdownOptions",
|
|
58
63
|
"columnsScrollInvisible",
|
|
59
64
|
"tableId",
|
|
60
65
|
],
|
|
@@ -196,11 +201,12 @@ export default {
|
|
|
196
201
|
placement: "bottom-end",
|
|
197
202
|
},
|
|
198
203
|
disabled: this.disabledRowActions,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
btnGroupClass: isUndefined(this.columnActionsOnePlusDropdownOptions.btnGroupClass) ? "a_btn_group a_btn_group_table" : this.columnActionsOnePlusDropdownOptions.btnGroupClass,
|
|
205
|
+
hasDividerBeforeDropdown: this.columnActionsOnePlusDropdownOptions.hasDividerBeforeDropdown || false,
|
|
206
|
+
indexFirstDropdownAction: isUndefined(this.columnActionsOnePlusDropdownOptions.indexFirstDropdownAction) ? 1 : this.columnActionsOnePlusDropdownOptions.indexFirstDropdownAction,
|
|
207
|
+
indexFirstDropdownActionMobile: isUndefined(this.columnActionsOnePlusDropdownOptions.indexFirstDropdownActionMobile) ? 1 : this.columnActionsOnePlusDropdownOptions.indexFirstDropdownActionMobile,
|
|
208
|
+
minDropdownActions: isUndefined(this.columnActionsOnePlusDropdownOptions.minDropdownActions) ? 1 : this.columnActionsOnePlusDropdownOptions.minDropdownActions,
|
|
209
|
+
actionsClasses: this.columnActionsOnePlusDropdownOptions.actionsClasses || ["a_btn a_btn_primary a_text_truncate"],
|
|
204
210
|
actionsIds: [this.buttonFirstActionId],
|
|
205
211
|
}, this.$slots) :
|
|
206
212
|
"",
|