step.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!-- @format -->
  2. <script lang="ts" setup>
  3. import { useRegister } from '~/pages/register/useRegister'
  4. const { currentStep } = useRegister()
  5. const items = [
  6. {
  7. key: 'Company',
  8. title: 'Company',
  9. },
  10. {
  11. key: 'Personal',
  12. title: 'Personal',
  13. },
  14. {
  15. key: 'Email',
  16. title: 'Email',
  17. },
  18. ]
  19. </script>
  20. <template>
  21. <div class="custom-steps">
  22. <el-steps :active="currentStep" align-center finish-status="success">
  23. <el-step v-for="item in items" :key="item.key" :title="item.title" />
  24. </el-steps>
  25. </div>
  26. </template>
  27. <style lang="less" scoped>
  28. .custom-steps {
  29. ::v-deep(.el-step) {
  30. .el-step__head {
  31. .el-step__line {
  32. left: 65% !important;
  33. right: -35% !important;
  34. background-color: #CCCCCC !important;
  35. .el-step__line-inner{
  36. border: unset!important;
  37. }
  38. }
  39. &.is-process{
  40. .el-step__icon { width: 32px;
  41. height: 32px;
  42. background-color: #cc9879 !important;
  43. border: unset !important;
  44. .el-step__icon-inner {
  45. color: #fff !important;
  46. }
  47. }
  48. }
  49. &.is-wait{
  50. .el-step__icon { width: 32px;
  51. height: 32px;
  52. border: 1px solid #5B463E !important;
  53. .el-step__icon-inner {
  54. color: #5B463E !important;
  55. }
  56. }
  57. }
  58. &.is-success{
  59. .el-step__icon { width: 32px;
  60. height: 32px;
  61. background-color: #E9E9E9 !important;
  62. border: 1px solid #E9E9E9 !important;
  63. .el-step__icon-inner {
  64. color: #666666 !important;
  65. }
  66. }
  67. }
  68. }
  69. .el-step__main{
  70. .el-step__title{
  71. &.is-process{
  72. font-weight: normal!important;
  73. }
  74. &.is-wait{
  75. font-weight: normal!important;
  76. color: #5B463E!important;
  77. }
  78. &.is-success{
  79. color: #5B463E!important;
  80. }
  81. }
  82. }
  83. }
  84. }
  85. </style>