Vue.component('submit-cancel', {
props: ['labelButton', 'labelOr', 'labelCancel', 'callback'],
template: '
'
,
data: function () {
return {
loading: false
};
},
computed: {
isLoading: function () {
return this.loading;
}
},
methods: {
onSubmit: function () {
this.loading = true;
this.callback();
},
onCancel: function () {
_KB.get('Popover').close();
}
},
events: {
'submitCancelled': function() {
this.loading = false;
}
}
});