skill_cert_header.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <div class="skill-cert-header">
  3. <div class="page-title">
  4. <span class="text">{{title}}</span>
  5. <span class="cert-status">{{isCert ? '已认证':'未认证'}}</span>
  6. </div>
  7. <div class="divider"></div>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. name: "skill_cert_header",
  13. props: {
  14. title: {
  15. type: String,
  16. default: ''
  17. },
  18. isCert: {
  19. type: Boolean,
  20. default: false
  21. }
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .skill-cert-header {
  27. display: flex;
  28. flex-direction: column;
  29. width: 100%;
  30. box-sizing: border-box;
  31. .page-title {
  32. width: 100%;
  33. position: relative;
  34. height: 75px;
  35. .text {
  36. position: absolute;
  37. left: 50%;
  38. top: 50%;
  39. transform: translate(-50%, -50%);
  40. font-size: 24px;
  41. font-family: PingFangSC, PingFangSC-Semibold, sans-serif;
  42. font-weight: 600;
  43. color: #222222;
  44. text-align: center;
  45. }
  46. .cert-status {
  47. position: absolute;
  48. width: 61px;
  49. height: 30px;
  50. opacity: 0.8;
  51. background: #efefef;
  52. border-radius: 4px;
  53. font-size: 13px;
  54. font-family: PingFangSC, PingFangSC-Regular, sans-serif;
  55. font-weight: 400;
  56. text-align: center;
  57. color: #666666;
  58. line-height: 30px;
  59. right: 0;
  60. top: 22px;
  61. }
  62. }
  63. .divider {
  64. width: 100%;
  65. height: 2px;
  66. border: 1px solid rgba(0, 0, 0, 0.06);
  67. }
  68. }
  69. </style>