123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <div class="mStep">
- <div class="step">
- <div class="step-item" v-for="(item, index) in imgUrlList" :key="index">
- <svg-icon v-if="number >= item.index" :iconClass="item.active" key="oneImg"></svg-icon>
- <svg-icon v-else :iconClass="item.default" key="oneImg"></svg-icon>
- <p :class="[number >= item.index ? item.activeClass : '']" >{{ item.text }}</p>
- </div>
- </div>
- </div>
- </template>
- <script>
- import SvgIcon from './SvgIcon'
- export default {
- name: "mStep",
- components: { SvgIcon },
- props: {
- number: {
- type: Number,
- default: 1
- } // 标题名称
- },
- data() {
- return {
- imgUrlList: [
- {
- index: 1,
- default: "",
- active: "icon_account_active",
- activeClass: "active",
- text: "账号"
- }, {
- index: 1.5,
- default: "icon_right_arrow",
- active: "icon_right_arrow_active",
- activeClass: "active",
- text: ""
- }, {
- index: 2,
- default: "icon_baseInfo",
- active: "icon_baseInfo_active",
- activeClass: "active",
- text: "基本信息"
- }, {
- index: 2.5,
- default: "icon_right_arrow",
- active: "icon_right_arrow_active",
- activeClass: "active",
- text: ""
- }, {
- index: 3,
- default: "icon_level",
- active: "icon_level_active",
- activeClass: "active",
- text: "考级信息"
- }, {
- index: 3.5,
- default: "icon_right_arrow",
- active: "icon_right_arrow_active",
- activeClass: "active",
- text: ""
- }, {
- index: 4,
- default: "icon_payment",
- active: "icon_payment_active",
- activeClass: "active",
- text: "支付"
- }
- ]
- };
- },
- methods: {}
- };
- </script>
- <style lang="less" scoped>
- @import url("../assets/commonLess/variable");
- .mStep {
- padding-bottom: 0.15rem;
- background-color: #ffffff;
- margin-top: .12rem;
- }
- .step {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- padding-top: 0.2rem;
- .step-item {
- font-size: 0;
- &:nth-of-type(odd) img {
- width: 0.56rem;
- }
- &:nth-of-type(even) img {
- width: 0.2rem;
- padding: 0.15rem 0.25rem 0;
- }
- &:nth-of-type(odd) svg {
- width: 0.56rem;
- height: .56rem;
- }
- &:nth-of-type(even) svg {
- width: 0.18rem;
- height: 0.18rem;
- padding: 0.2rem 0.1rem 0;
- }
- p {
- padding-top: 0.03rem;
- font-size: 0.14rem;
- color: #808080;
- text-align: center;
- &.active {
- color: var(--main-color);
- }
- }
- }
- }
- </style>
|