export default {
props: {
res: {
type: Object
},
action: {
type: Object
},
cssclass: {
type: String,
default: ''
}
},
emits: [ 'actionexecuted' ],
template: `
Action
Action
`,
methods: {
getactionhref: function() {
return (this.action.type === 'link') ? this.action.action(this.res)
: 'javascript:void(0);';
},
execaction: function() {
this.action.action(this.res);
this.$emit('actionexecuted');
},
renderif: function() {
if(this.action?.renderif === undefined) {
return true;
}
return this.action.renderif(this.res);
}
}
};