index.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <!-- 右键唤出的菜单 -->
  3. <div
  4. class="right_menu"
  5. :style="{ left: fileRightXY.left + 'px', top: fileRightXY.top + 'px' }"
  6. >
  7. <div class="menu_item" @click="folderClick(null, null)">
  8. <img src="@/assets/images/trash.png" alt="" />
  9. <span class="shouzhi">打开</span>
  10. </div>
  11. <div class="menu_item" @click="collectFolder">
  12. <img src="@/assets/images/collect.png" alt="" />
  13. <span class="shouzhi">取消收藏</span>
  14. </div>
  15. </div>
  16. </template>
  17. <script setup>
  18. import {
  19. ref,
  20. computed,
  21. reactive,
  22. defineComponent,
  23. watch,
  24. onMounted,
  25. defineExpose,
  26. } from "vue";
  27. const props = defineProps({
  28. fileRightXY: {
  29. type: String,
  30. default: false,
  31. },
  32. foldertop: {
  33. type: String,
  34. default: "",
  35. },
  36. });
  37. </script>
  38. <style lang="scss" scoped>
  39. @import "@/assets/styles/my-common.scss";
  40. .right_menu {
  41. width: 156px;
  42. position: absolute;
  43. padding: 8px;
  44. box-shadow: 0px 2px 10px 1px rgba(199, 203, 216);
  45. border-radius: 4px 4px 4px 4px;
  46. border: 1px solid gray;
  47. background-color: #fff;
  48. z-index: 10000;
  49. .menu_item {
  50. width: 100%;
  51. height: 30px;
  52. border-radius: 4px 4px 4px 4px;
  53. line-height: 30px;
  54. display: flex;
  55. margin: 5px auto;
  56. align-items: center;
  57. font-size: 13px;
  58. &:hover {
  59. background-color: #f5f7f9;
  60. }
  61. span {
  62. margin-left: 4px;
  63. }
  64. }
  65. }
  66. </style>