You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.2 KiB

  1. <template>
  2. <base-card
  3. :title="title"
  4. :agree-text="buttonTrueText"
  5. :cancel-text="buttonFalseText"
  6. @agree="ok"
  7. @cancel="cancel"
  8. >
  9. <template #content>
  10. {{ message }}
  11. <v-list dense>
  12. <v-list-item v-for="(item, i) in items" :key="i">
  13. <v-list-item-content>
  14. <v-list-item-title>{{ item[itemKey] }}</v-list-item-title>
  15. </v-list-item-content>
  16. </v-list-item>
  17. </v-list>
  18. </template>
  19. </base-card>
  20. </template>
  21. <script>
  22. import BaseCard from '@/components/molecules/BaseCard'
  23. export default {
  24. components: {
  25. BaseCard
  26. },
  27. props: {
  28. title: {
  29. type: String,
  30. default: '',
  31. required: true
  32. },
  33. message: {
  34. type: String,
  35. default: '',
  36. required: true
  37. },
  38. items: {
  39. type: Array,
  40. default: () => [],
  41. required: true
  42. },
  43. itemKey: {
  44. type: String,
  45. default: '',
  46. required: true
  47. },
  48. buttonTrueText: {
  49. type: String,
  50. default: 'Yes'
  51. },
  52. buttonFalseText: {
  53. type: String,
  54. default: 'Cancel'
  55. }
  56. },
  57. methods: {
  58. ok() {
  59. this.$emit('ok')
  60. },
  61. cancel() {
  62. this.$emit('cancel')
  63. }
  64. }
  65. }
  66. </script>