button.js
5 years ago
collapse.js
5 years ago
component-wrapper.js
5 years ago
list-table-heading.js
5 years ago
list-table-item.js
5 years ago
list-table.js
5 years ago
notice-component.js
5 years ago
notice.js
5 years ago
pagination.js
5 years ago
popup.js
5 years ago
repeater-item.js
5 years ago
repeater.js
5 years ago
tabs-panel.js
5 years ago
tabs.js
5 years ago
title.js
5 years ago
repeater.js
53 lines
| 1 | import { ContainerMixin } from 'vue-slicksort'; |
| 2 | import { checkConditions } from '../../mixins/check-conditions'; |
| 3 | |
| 4 | const Repeater = { |
| 5 | name: 'cx-vui-repeater', |
| 6 | template: '#cx-vui-repeater', |
| 7 | mixins: [ ContainerMixin, checkConditions ], |
| 8 | props: { |
| 9 | buttonLabel: { |
| 10 | type: String, |
| 11 | }, |
| 12 | buttonStyle: { |
| 13 | type: String, |
| 14 | default: 'accent', |
| 15 | }, |
| 16 | buttonSize: { |
| 17 | type: String, |
| 18 | default: 'default', |
| 19 | }, |
| 20 | value: { |
| 21 | type: Array, |
| 22 | default() { |
| 23 | return []; |
| 24 | } |
| 25 | }, |
| 26 | distance: { |
| 27 | type: Number, |
| 28 | default: 20, |
| 29 | }, |
| 30 | useDragHandle: { |
| 31 | type: Boolean, |
| 32 | default: true, |
| 33 | }, |
| 34 | conditions: { |
| 35 | type: Array, |
| 36 | default() { |
| 37 | return []; |
| 38 | } |
| 39 | }, |
| 40 | }, |
| 41 | data() { |
| 42 | return { |
| 43 | inFocus: false, |
| 44 | } |
| 45 | }, |
| 46 | methods: { |
| 47 | handleClick( event ) { |
| 48 | this.$emit( 'add-new-item', event ); |
| 49 | }, |
| 50 | }, |
| 51 | }; |
| 52 | |
| 53 | export default Repeater; |