The ArrangeItems component uses vue-draggable to enable CustomiseItem components to be rearranged.
Props
| Name | Type | Default value | Required? | Description |
|---|---|---|---|---|
items |
Array | - | Yes | List of episodes in the draggable box. |
dayId |
Number | null |
No | The id of the day that this component represents. |
Computed
| Name | Type | Description |
|---|---|---|
times |
Array.<{start: Number, end: Number}> | The start and end times for each item. |
Events
| Name | Payload Type | Description |
|---|---|---|
assignItem |
Object | Emit a command to move an HTMLElement to a particular slot on a particular day. |
removeItem |
Object | Emit a command to remove an item from this component. |
Methods
-
change(evt)
-
Check a draggable event and process any updates needed.
Parameters:
Name Type Description evtObject Draggable drop event. -
remove(item)
-
Remove an child item from the component.
Parameters:
Name Type Description itemObject Item to remove.