widget-shape.vue 812 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <view class="shape" :id="`module_${id}`" @click="page.EditModuleId = id">
  3. <!-- @click="page.setCurWidgetId(widget.id)" -->
  4. <view class="shape-solid" v-if="page.EditModuleId == id">
  5. <!-- -->
  6. </view>
  7. <view class="shape-dashed"></view>
  8. <slot></slot>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. inject: ["page"],
  14. props: ["id"],
  15. };
  16. </script>
  17. <style lang="scss" scoped>
  18. .shape {
  19. position: relative;
  20. &:hover {
  21. .shape-dashed {
  22. display: block;
  23. }
  24. }
  25. .shape-dashed {
  26. display: none;
  27. position: absolute;
  28. top: 0;
  29. left: 0;
  30. right: 0;
  31. bottom: 0;
  32. border: dashed 1px #155bd4;
  33. z-index: 100;
  34. }
  35. .shape-solid {
  36. position: absolute;
  37. top: 0;
  38. left: 0;
  39. right: 0;
  40. bottom: 0;
  41. border: solid 1px #155bd4;
  42. z-index: 100;
  43. }
  44. }
  45. </style>