ActionButton.vue
2 years ago
BoxActions.vue
2 years ago
EditTableSwitcher.vue
2 years ago
RedirectToSingle.vue
2 years ago
ShowOverflowTable.vue
2 years ago
UndoChangesTable.vue
2 years ago
UndoChangesTable.vue
42 lines
| 1 | <template> |
| 2 | <cx-vui-button |
| 3 | v-if="isEditableTable" |
| 4 | :disabled="! hasChanges" |
| 5 | button-style="link-accent" |
| 6 | size="mini" |
| 7 | @click="hasChanges = true" |
| 8 | > |
| 9 | <template #label> |
| 10 | <span class="dashicons dashicons-undo"></span> |
| 11 | {{ __( 'Undo', 'jet-form-builder' ) }} |
| 12 | </template> |
| 13 | </cx-vui-button> |
| 14 | </template> |
| 15 | |
| 16 | <script> |
| 17 | import ScopeStoreMixin from '../../mixins/ScopeStoreMixin'; |
| 18 | |
| 19 | const { i18n } = JetFBMixins; |
| 20 | |
| 21 | export default { |
| 22 | name: 'UndoChangesTable', |
| 23 | mixins: [ ScopeStoreMixin, i18n ], |
| 24 | computed: { |
| 25 | hasChanges: { |
| 26 | get() { |
| 27 | return this.getter( 'hasChanges' ); |
| 28 | }, |
| 29 | set( value ) { |
| 30 | this.commit( 'revertChanges' ); |
| 31 | }, |
| 32 | }, |
| 33 | isEditableTable() { |
| 34 | return this.getter( 'isEditableTable' ); |
| 35 | }, |
| 36 | }, |
| 37 | }; |
| 38 | </script> |
| 39 | |
| 40 | <style> |
| 41 | |
| 42 | </style> |