QCTipPop.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div class="pop" :style="getStyle()">
  3. <p class="close"><a href="javascript:void(0);" @click="closePop">×</a></p>
  4. <div class="info">
  5. <p>模块类型:{{name}}</p>
  6. <p>示例:{{example}}</p>
  7. </div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "QCTipPop",
  13. props: ['name','example','top','left','show'],
  14. data() {
  15. return {
  16. getStyle(){
  17. return {
  18. top:(this.top-340)+"px",
  19. left:(this.left-310)+"px",
  20. display:this.show?"block":"none"
  21. }
  22. }
  23. }
  24. },
  25. methods:{
  26. closePop(){
  27. this.$emit("close");
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="less" scoped>
  33. .pop{
  34. position: absolute;
  35. border: 1px solid #c0c4cc;
  36. padding: 5px 10px;
  37. border-radius: 5px;
  38. background: #fff;
  39. font-size: 12px;
  40. line-height: 22px;
  41. z-index: 99;
  42. width: 300px;
  43. .info{
  44. max-height: 270px;
  45. word-break: break-all;
  46. overflow: auto;
  47. }
  48. .close{
  49. text-align:right;
  50. a{
  51. display: inline-block;
  52. font-size: 18px;
  53. color: #909090;
  54. }
  55. }
  56. }
  57. </style>