Process.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <template>
  2. <div class="process" :class="'process-' + (index + 1)">
  3. <div class="process-top">
  4. <img :src="icon" alt="" />
  5. <div class="title">
  6. <span class="text1">{{ preTitle }}</span>
  7. <span class="text2">{{ title }}</span>
  8. </div>
  9. </div>
  10. <div class="content">
  11. <div class="stepInfo" v-for="(item, index) in steps" :key="index">
  12. <span>{{ getName(item.text) }}</span>
  13. <van-icon
  14. @click="show"
  15. name="question-o"
  16. class="tips"
  17. v-if="item.tips"
  18. :size="18"
  19. :color="$colors.warn"
  20. />
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: 'Process',
  28. props: {
  29. icon: {
  30. type: String,
  31. default: ''
  32. },
  33. preTitle: {
  34. type: String,
  35. default: '阶段一 '
  36. },
  37. title: {
  38. type: String,
  39. default: '入驻申请 '
  40. },
  41. steps: {
  42. type: Array,
  43. default: () => {
  44. return [
  45. {
  46. text: '查询确认入驻资格',
  47. isRight: true
  48. },
  49. {
  50. text: '填写账号/企业信息进行注册'
  51. },
  52. {
  53. text: '确认在线服务协议'
  54. }
  55. ];
  56. }
  57. },
  58. index: {
  59. type: Number,
  60. default: 0
  61. }
  62. },
  63. data() {
  64. return {
  65. position: [''],
  66. colors: ['#2a90a0', '#3b5996', '#ca923a', '#c66152']
  67. };
  68. },
  69. methods: {
  70. show() {
  71. this.$emit('show');
  72. }
  73. }
  74. };
  75. </script>
  76. <style lang="less">
  77. @list: #2a90a0, #3b5996, #ca923a, #c66152;
  78. .process {
  79. width: 280px;
  80. height: 360px;
  81. flex-shrink: 0;
  82. margin: 0 8px;
  83. .process-top {
  84. display: flex;
  85. flex-direction: column;
  86. align-items: center;
  87. justify-content: center;
  88. padding: 9px 0 30px;
  89. img {
  90. width: 100px;
  91. height: 100px;
  92. display: block;
  93. }
  94. .title {
  95. display: flex;
  96. align-items: center;
  97. margin-top: 6px;
  98. .text1 {
  99. font-size: 14px;
  100. font-weight: bold;
  101. color: #ffffff;
  102. line-height: 20px;
  103. display: flex;
  104. align-items: center;
  105. &::after {
  106. content: '';
  107. width: 1px;
  108. height: 16px;
  109. background-color: #f2f3f5;
  110. margin: 0 18px 0 14px;
  111. }
  112. }
  113. .text2 {
  114. font-size: 18px;
  115. font-weight: bold;
  116. color: #ffffff;
  117. line-height: 25px;
  118. }
  119. }
  120. }
  121. .content {
  122. padding: 26px 40px;
  123. .stepInfo {
  124. // max-width: 270px;
  125. display: flex;
  126. align-items: center;
  127. position: relative;
  128. font-size: 14px;
  129. color: #292c33;
  130. line-height: 20px;
  131. &:not(:last-child) {
  132. padding-bottom: 30px;
  133. &::after {
  134. content: '';
  135. width: 1px;
  136. height: 100%;
  137. position: absolute;
  138. left: -13px;
  139. top: 10px;
  140. }
  141. }
  142. &::before {
  143. content: '';
  144. width: 7px;
  145. height: 7px;
  146. position: absolute;
  147. left: -16px;
  148. top: 7px;
  149. border-radius: 7px;
  150. }
  151. }
  152. }
  153. }
  154. each(@list, {
  155. .process-@{index} {
  156. background-color:fade(@value,10%);
  157. .process-top {
  158. background-color: @value;
  159. }
  160. .content {
  161. .stepInfo {
  162. &::before {
  163. background-color: @value;
  164. }
  165. &:not(:last-child) {
  166. &::after {
  167. background-color:@value;
  168. }
  169. }
  170. }
  171. }
  172. }
  173. });
  174. .isEn {
  175. .process-3 {
  176. width: 720rpx;
  177. }
  178. }
  179. // @for $indexi from 1 through 4 {
  180. // .process-#{$i} {
  181. // background-color: rgba(nth($primarys, $i), 10%);
  182. // .process-top {
  183. // background-color: nth($primarys, $i);
  184. // }
  185. // .content {
  186. // .stepInfo {
  187. // &::before {
  188. // background-color: nth($primarys, $i);
  189. // }
  190. // &:not(:last-child) {
  191. // &::after {
  192. // background-color: nth($primarys, $i);
  193. // }
  194. // }
  195. // }
  196. // }
  197. // }
  198. // }
  199. .tips {
  200. margin-left: 5px;
  201. }
  202. </style>