Advertisement
Guest User

Untitled

a guest
Aug 30th, 2023
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. <template>
  2. <div class="row">
  3. <div class="col-6">
  4. <VueDraggable
  5. class="list-group"
  6. v-model="list1"
  7. animation="150"
  8. ghostClass="ghost"
  9. group="people"
  10. >
  11. <div
  12. v-for="item in list1"
  13. :key="item.no-id"
  14. class="list-group-item"
  15. >
  16. {{ item.name }}
  17. </div>
  18. </VueDraggable>
  19. </div>
  20. <div class="col-6">
  21. <VueDraggable
  22. class="list-group"
  23. v-model="list2"
  24. animation="150"
  25. group="people"
  26. ghostClass="ghost"
  27. >
  28. <div
  29. v-for="item in list2"
  30. :key="item.no-id"
  31. class="list-group-item"
  32. >
  33. {{ item.name }}
  34. </div>
  35. </VueDraggable>
  36. </div>
  37. </div>
  38. </template>
  39.  
  40. <script setup>
  41. import { ref } from 'vue'
  42. import { VueDraggable } from 'vue-draggable-plus'
  43. const list1 = ref([
  44. {
  45. "name": "test",
  46. "no-id": "employees.id"
  47. },
  48. {
  49. "name": "active",
  50. "no-id": "employees.active"
  51. },
  52. {
  53. "name": "firstname",
  54. "no-id": "employees.firstname"
  55. },
  56. {
  57. "name": "lastname",
  58. "no-id": "employees.lastname"
  59. }
  60. ])
  61. const list2 = ref([
  62. {
  63. "name": "short",
  64. "no-id": "employees.short"
  65. },
  66. {
  67. "name": "birthday",
  68. "no-id": "employees.birthday"
  69. },
  70. {
  71. "name": "number",
  72. "no-id": "employees.number"
  73. },
  74. {
  75. "name": "fullname",
  76. "no-id": "employees.fullname"
  77. }
  78. ])
  79. </script>
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement