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.

71 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 lang="ts">
  22. import Vue from 'vue'
  23. import BaseCard from './BaseCard.vue'
  24. export default Vue.extend({
  25. components: {
  26. BaseCard
  27. },
  28. props: {
  29. title: {
  30. type: String,
  31. default: '',
  32. required: true
  33. },
  34. message: {
  35. type: String,
  36. default: '',
  37. required: true
  38. },
  39. items: {
  40. type: Array,
  41. default: () => [],
  42. required: false
  43. },
  44. itemKey: {
  45. type: String,
  46. default: '',
  47. required: false
  48. },
  49. buttonTrueText: {
  50. type: String,
  51. default: 'Yes'
  52. },
  53. buttonFalseText: {
  54. type: String,
  55. default: 'Cancel'
  56. }
  57. },
  58. methods: {
  59. ok() {
  60. this.$emit('ok')
  61. },
  62. cancel() {
  63. this.$emit('cancel')
  64. }
  65. }
  66. })
  67. </script>