Item.vue 855 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <span>
  3. <slot></slot>
  4. </span>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'bm-context-menu-item',
  9. props: {
  10. callback: {
  11. type: Function,
  12. default: function () {}
  13. },
  14. text: {
  15. type: String
  16. },
  17. iconUrl: {
  18. type: String
  19. },
  20. id: {
  21. type: String
  22. },
  23. disabled: {
  24. type: Boolean
  25. },
  26. seperator: {
  27. type: Boolean
  28. }
  29. },
  30. methods: {
  31. reload () {
  32. this.$parent.map && this.$parent.load()
  33. }
  34. },
  35. watch: {
  36. text () {
  37. this.reload()
  38. },
  39. iconUrl () {
  40. this.reload()
  41. },
  42. id () {
  43. this.reload()
  44. },
  45. disabled () {
  46. this.reload()
  47. },
  48. iseperator () {
  49. this.reload()
  50. },
  51. callback () {
  52. this.reload()
  53. }
  54. },
  55. destroyed () {
  56. this.reload()
  57. },
  58. mounted () {
  59. this.reload()
  60. }
  61. }
  62. </script>