-
-
Notifications
You must be signed in to change notification settings - Fork 622
Expand file tree
/
Copy pathHasFieldActions.js
More file actions
33 lines (28 loc) · 761 Bytes
/
HasFieldActions.js
File metadata and controls
33 lines (28 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import toFieldActions from './toFieldActions.js';
export default {
data() {
return {
_cachedFieldActions: null,
};
},
computed: {
fieldActions() {
if (this._cachedFieldActions) return this._cachedFieldActions;
this._cachedFieldActions = toFieldActions(
this.fieldActionBinding,
this.fieldActionPayload,
this.internalFieldActions,
);
return this._cachedFieldActions;
},
internalFieldActions() {
return [];
},
fieldActionPayload() {
return {};
},
fieldActionBinding() {
return this.config.type + '-fieldtype';
}
},
};