skill_cert_header.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <div class="skill-cert-header">
  3. <div class="page-title">
  4. <span class="text">{{title}}</span>
  5. <div class="cert-status-success" v-if="freework_level>0">
  6. <div class="cert-status-success-tag">已认证</div>
  7. <p class="cert-status-tips">可继续认证</p>
  8. </div>
  9. <span v-else class="cert-status">未认证</span>
  10. </div>
  11. <div class="divider"></div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: "skill_cert_header",
  17. props: {
  18. title: {
  19. type: String,
  20. default: ''
  21. },
  22. freework_level: {
  23. type: Number,
  24. default: 0
  25. },
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .skill-cert-header {
  31. display: flex;
  32. flex-direction: column;
  33. width: 100%;
  34. box-sizing: border-box;
  35. .page-title {
  36. width: 100%;
  37. position: relative;
  38. height: 75px;
  39. .text {
  40. position: absolute;
  41. left: 50%;
  42. top: 50%;
  43. transform: translate(-50%, -50%);
  44. font-size: 24px;
  45. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  46. font-weight: 600;
  47. color: #222222;
  48. text-align: center;
  49. }
  50. .cert-status {
  51. position: absolute;
  52. width: 61px;
  53. height: 30px;
  54. opacity: 0.8;
  55. background: #efefef;
  56. border-radius: 4px;
  57. font-size: 13px;
  58. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  59. font-weight: 400;
  60. text-align: center;
  61. color: #666666;
  62. line-height: 30px;
  63. right: 0;
  64. top: 22px;
  65. }
  66. .cert-status-success-tag{
  67. // position: absolute;
  68. width: 61px;
  69. height: 30px;
  70. line-height: 30px;
  71. opacity: 0.8;
  72. background: #308eff;
  73. color: #fff;
  74. border-radius: 4px;
  75. font-size: 13px;
  76. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  77. font-weight: 400;
  78. text-align: center;
  79. margin-bottom: 10px;
  80. }
  81. .cert-status-success {
  82. position: absolute;
  83. right: 0;
  84. top: 22px;
  85. .cert-status-tips {
  86. line-height: 1;
  87. font-size: 6px;
  88. color: #666666;
  89. }
  90. }
  91. }
  92. .divider {
  93. width: 100%;
  94. height: 2px;
  95. border: 1px solid rgba(0, 0, 0, 0.06);
  96. }
  97. }
  98. </style>