流程图步骤条

1.结构

<ul class="stepUl">

<li class="stepLi" v-for="(item, index) in stepList" :key="index">

<div class="top">

<p :class="{active: currentState >= item.key}">{{ item.value }}</p>

<img

v-if="currentState >= item.key"

:src="require(`./../../static/img/icons/iconed${index}.png`)"

/>

<img v-else :src="require(`./../../static/img/icons/icon${index}.png`)" />

</div>

<div v-if="item.value != '工单闭环'">

<img

v-if="currentState >= item.key"

class="arrow"

src="./../../static/img/icons/arrowed.png"

/>

<img

v-else

class="arrow"

src="./../../static/img/icons/arrow.png"

/>

</div>

</li>

</ul>

2.数据

stepList:[

{

"key": "-1",

"value": "撤单"

},

{

"key": "1",

"value": "创建工单"

},

{

"key": "20",

"value": "科室接单"

},

{

"key": "30",

"value": "科员处理"

},

{

"key": "40",

"value": "科室确认"

},

{

"key": "50",

"value": "工单闭环"

}

]

3.样式

.stepUl {

display: grid;

grid-template-columns: repeat(6, 1fr);

text-align: left;

.stepLi {

display: flex;

justify-content: center;

align-items: center;

.top {

p {

width: 72px;

color: #ccc;

margin-bottom: 5px;

margin-left: -5px;

text-align: center;

&.active {

color: #000;

}

}

img {

width: 57px;

}

}

.arrow {

margin-top: 20px;

}

}

}

相关推荐
未来之窗软件服务2 小时前
未来之窗昭和仙君(五十五)标签票据打印模板设计器——东方仙盟筑基期
前端·打印设计器·仙盟创梦ide·东方仙盟·昭和仙君·东方仙盟架构
Mr.Jessy2 小时前
Web APIs 学习第五天:日期对象与DOM节点
开发语言·前端·javascript·学习·html
前端大卫2 小时前
如何统一前端项目的 Node 版本和包管理器?
前端
Hi~晴天大圣2 小时前
HTML onclick用法
前端·html
速易达网络2 小时前
HTML<output>标签
javascript·css·css3
!win !3 小时前
前端跨标签页通信方案(上)
前端·javascript
xw53 小时前
前端跨标签页通信方案(上)
前端·javascript
烛阴4 小时前
Python数据可视化:从零开始教你绘制精美雷达图
前端·python
全栈前端老曹4 小时前
【前端组件封装教程】第3节:Vue 3 Composition API 封装基础
前端·javascript·vue.js·vue3·组合式api·组件封装
BruceeLeee4 小时前
关于vue3中使用el-upload组件上传图片后删除和预览按钮不显示的问题
vue.js