QCTipPop.vue 874 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <div class="pop" :style="getStyle()">
  3. <p>模块类型:{{name}}</p>
  4. <p>示例:{{example}}</p>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: "QCTipPop",
  10. props: ['name','example','top','left','show'],
  11. data() {
  12. return {
  13. getStyle(){
  14. return {
  15. top:(this.top-481)+"px",
  16. left:(this.left-10)+"px",
  17. display:this.show?"block":"none"
  18. }
  19. }
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang="less" scoped>
  25. .pop{
  26. position: absolute;
  27. border: 1px solid #c0c4cc;
  28. padding: 5px 10px;
  29. border-radius: 5px;
  30. background: #fff;
  31. font-size: 12px;
  32. line-height: 22px;
  33. z-index: 99;
  34. width: 300px;
  35. height: 295px;
  36. word-break: break-all;
  37. overflow: auto;
  38. }
  39. </style>