流程图步骤条

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;

}

}

}

相关推荐
ly76895 小时前
HTML5 从入门到工程实践:语义化、表单、多媒体、性能与项目规范详解
前端·html·html5
人民广场吃泡面9 小时前
前端该重视的编程思想
前端
冬夜戏雪9 小时前
agent的trace 和eval
开发语言·前端·javascript
IT_陈寒9 小时前
Redis的DEL命令居然没删干净数据?这个坑我爬了半天
前端·人工智能·后端
kyriewen9 小时前
面试官让我现场用 AI 改一个真实 bug——他打断我的 3 个理由
前端·面试·ai编程
计算机魔术师10 小时前
斯坦福研究:AI 对入门级岗位冲击最大
前端
感谢一路走过的人10 小时前
AGGrid刷新数据后执行筛选
javascript·ag-grid
水獭比特10 小时前
工具都批准了,为什么还不能执行?给 Agent 补上第二道校验
javascript·人工智能·node.js