流程图步骤条

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;

}

}

}

相关推荐
你真的可爱呀3 小时前
uniapp+vue3项目中的常见报错情况以及解决方法
前端·vue.js·uni-app
差点GDP7 小时前
模拟请求测试 Fake Rest API Test
前端·网络·json
酒尘&8 小时前
Hook学习-上篇
前端·学习·react.js·前端框架·react
houyhea8 小时前
从香港竹脚手架到前端脚手架:那些"借来"的发展智慧与安全警示
前端
哈哈~haha8 小时前
Step 14: Custom CSS and Theme Colors 自定义CSS类
前端·css·ui5
Ndmzi8 小时前
Matlab编程技巧:自定义Simulink菜单(理解补充)
前端·javascript·python
勇气要爆发9 小时前
物种起源—JavaScript原型链详解
开发语言·javascript·原型模式
我命由我123459 小时前
VSCode - VSCode 修改文件树缩进
前端·ide·vscode·前端框架·编辑器·html·js
SoaringHeart9 小时前
Flutter组件封装:验证码倒计时按钮 TimerButton
前端·flutter
San30.9 小时前
深入理解 JavaScript OOP:从一个「就地编辑组件」看清封装、状态与原型链
开发语言·前端·javascript·ecmascript