流程图步骤条

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;

}

}

}

相关推荐
kyriewen28 分钟前
我给 61 个前端库排了两次名,最多差了 46 位
前端·javascript·程序员
程序员大阳1 小时前
副队长Vue3教程(33)--路由懒加载
vue.js·性能优化·vue3·路由·懒加载·速度慢
亲亲小宝宝鸭1 小时前
Cesium启动:TLE数据是如何变成轨迹线的
前端·cesium
阿里云云原生1 小时前
对话即构建,在 AgentCore 构建 Agent 就是这么简单
前端·agent
夕水2 小时前
我给我的诗写了个后台,顺手写了 一个组件库ew-solid-ui
前端·javascript·typescript
KevinWang_2 小时前
iOS 开发计划(五) - 做一个离线音乐播放器
javascript
狗头大军之江苏分军3 小时前
前端转行干能干什么?我转行试了下(被迫)
前端·后端
孟陬3 小时前
Foobar 技术周刊#2:约会已死?用户急剧下滑,约会App大概率会弱化约会属性转向轻陪伴。我有个建议:
前端·后端·rust
parade岁月3 小时前
VTable Guild 3.0.0 发布,面向 Vue 3 的 ProTable 式业务表格
前端
xurileidian4 小时前
第 17 篇 · 边玩边学Python · for 遍历 enumerate 与 zip
java·前端·python