diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-01-30 11:16:29 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-01-30 12:17:23 +0100 |
commit | a1561dfe3a728f3b636852df05d36c1947883dd7 (patch) | |
tree | 91e90dae3ec08878ae81a2f68a90fba4050ebfc2 /src/mixins | |
parent | 7af5d37ac8428784843fd3cca531fb30ecf71fe3 (diff) |
Add property-defined actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/PropertyMixin.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mixins/PropertyMixin.js b/src/mixins/PropertyMixin.js index 73b3f21c..cdb166f2 100644 --- a/src/mixins/PropertyMixin.js +++ b/src/mixins/PropertyMixin.js @@ -76,6 +76,17 @@ export default { } }, + computed: { + actions() { + const del = { + text: t('contacts', 'Delete'), + icon: 'icon-delete', + action: this.deleteProperty + } + return [del, ...this.propModel.actions ? this.propModel.actions : []] + } + }, + watch: { /** * Since we're updating a local data based on the value prop, |