el-steps分布展示页面

article/2025/9/17 22:09:06

 

<template><div class="app-container automation"><el-steps :active="active" finish-status="success"><el-step title="步骤 1"></el-step><el-step title="步骤 2"></el-step><el-step title="步骤 3"></el-step></el-steps><div class="step-one" v-show="active == 0"><el-form ref="lineForm" :rules="lineRules" :model="lineForm" label-width="120px"><step1 :dataLine="lineForm"></step1></el-form></div><div class="step-two" v-show="active == 1"><el-formref="equipmentForm":rules="equipmentRules":model="equipmentForm"label-width="120px"><step2 :dataEqu="equipmentForm" :dataLine="lineForm"></step2></el-form></div><div class="step-three" v-show="active == 2"><el-uploadclass="upload-demo"action="https://httpbin.org/post":limit="1":file-list="fileList":before-upload="beforeUpload":on-change="handleChange":on-success="handleSuccess":on-remove="handleRemove":on-exceed="handleExceed"><el-button size="small" type="primary">点击上传</el-button><div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过10M</div></el-upload></div><div class="step-buttons"><el-button @click="prev" v-if="active == 1 || active == 2">上一步</el-button><el-button @click="next(active)" v-if="active == 0 || active == 1">下一步</el-button><el-button @click="submit" v-if="active == 2">提交</el-button><el-button @click="resetForm(active)" v-if="active == 0 || active == 1">重置</el-button></div></div>
</template>

 

 

 

<script>
import step1 from "./step1";
import step2 from "./step2";export default {data() {return {active: 0,//步骤1lineForm: {},lineRules: {},//步骤2equipmentForm: {},equipmentRules: {},limit: 1, // 上传excell时,同时允许上传的最大数fileList: [], // excel文件列表typeFormArr: ["lineForm", "equipmentForm"],};},methods: {// 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传beforeUpload(file) {let extension = file.name.substring(file.name.lastIndexOf(".") + 1);let size = file.size / 1024 / 1024;console.log(file);console.log(extension);if (extension !== "xlsx") {this.$message.warning("只能上传后缀是.xlsx的文件");}if (size > 10) {this.$message.warning("文件大小不得超过10M");}},// 文件状态改变handleChange(file, fileList) {if (file) {this.fileList = fileList.slice(-3);}},// 删除文件handleRemove(file, fileList) {// this.fileList = [];return this.$confirm(`确定移除 ${file.name}?`);},// 文件超出个数限制handleExceed(files, fileList) {this.$message.warning(`只能选择 ${this.limitNum} 个文件,当前共选择了 ${files.length + fileList.length} 个`);},// 文件上传成功handleSuccess(res, file, fileList) {this.$message.success("文件上传成功");},// 文件上传失败handleError(err, file, fileList) {this.$message.error("文件上传失败");},// 覆盖默认的上传行为,自定义上传的实现uploadFile() {if (this.fileList.length === 0) {this.$message.warning("请上传文件");} else {const data = new FormData();const fileUps = file.file;data.append("file", fileUps);this.$axios({headers: {"Content-Type": "multipart/form-data",},url: "/user/batch",data: data,method: "post",}).then((res) => {console.log(res);},(err) => {console.log(err);});}},prev() {--this.active;if (this.active < 0) this.active = 0;},next(formName) {this.$refs[this.typeFormArr[formName]].validate((valid) => {if (valid) {console.log("sus submit!!");if (this.active++ > 2) this.active = 0;} else {console.log("error submit!!");return false;}});},resetForm(formName) {this.$refs[this.typeFormArr[formName]].resetFields();},submit() {},},components: {step1,step2,},
};
</script>

 

 


<style lang="scss">
.automation {.step-one,.step-two,.step-three {margin: 20px 0;padding: 20px 0;}.step-three {padding: 20px;.upload-demo {width: 400px;}}.step-buttons {margin: 20px;text-align: center;}
}
</style>

 


http://chatgpt.dhexx.cn/article/kbvXwaDR.shtml

相关文章

038_Steps步骤条

1. Steps步骤条 1.1. Steps步骤条引导用户按照流程完成任务的分步导航条, 可根据实际应用场景设定步骤, 步骤不得少于2步。 1.2. Steps Attributes 参数 说明 类型 可选值 默认值 space 每个step的间距, 不填写将自适应间距。支持百分比。 number / string 无 无 d…

更改el-steps颜色样式

原样式&#xff1a; 目标样式如下&#xff0c;也不追求完全一致&#xff0c;至少得看得过去。 <style scoped>::v-deep .el-step__head.is-success {color: rgb(52, 158, 250);border-color: rgb(52, 158, 250); } ::v-deep .el-step__title.is-success {font-weight: …

vue使用steps步骤条,自定义内容

效果图 一、引入element ui steps <el-steps :active"caseHistoryData.length" finish-status"success" direction"vertical" ><el-step><template slot"description"></template></el-step> </el-…

steps.js 步骤条、时间轴

GitHub地址&#xff1a;https://github.com/fxss5201/steps 介绍 首先看一下目录&#xff1a; 1.0 文件夹和 2.0 文件夹非升级关系&#xff0c;两者仅是着重点方向不一致&#xff0c;1.0 主打双边显示&#xff0c;2.0 主打内容排序&#xff0c;一般功能的话两者均可满足。 …

CSS3中steps()动画的详解

原文作者&#xff1a;Joni Trythall 增修作者&#xff1a;Fegmaybe 一个是雪碧图的实现动画的steps效果。steps&#xff08;&#xff09;阶跃函数&#xff0c;是transition-timing-function和animation-timing-function两个属性的属性值&#xff0c;他是表示两个关键帧之间的动…

css【详解】steps()函数

steps(number, position)number 整数值&#xff0c;表示把动画分成了多少段。position 可选参数&#xff0c;表示动画跳跃执行是在时间段的开始还是结束。 —— start 在时间段的开头处跳跃 —— end 在时间段的结束处跳跃 动画效果见 https://demo.cssworld.cn/new/5/4-7.php…

steps函数--参数意思和用法

图片解释如下&#xff0c;参数意思和用法在代码的注释中 所引用图片共7帧&#xff0c;如下&#xff1a; 尺寸为200*1400&#xff0c;所以设置div为200*200&#xff0c;分为7帧&#xff0c;除去展示帧&#xff0c;需六次步骤跳转&#xff0c;原图如下&#xff1a; 代码&…

element的步骤条整合表单(steps+form)

先上效果图&#xff1a; element ui 组件库官网 使用步骤&#xff1a; 1、页面组合步骤 > 5步 定义出4个步骤&#xff08;看你自己需要几步&#xff09;定义form表单定义4个盒子对象active属性 > 1 到 4放置表单项设置上一步和下一步的按钮 <template>//第一步…

vue、Steps 步骤条、Steps 属性、vue Steps 所有步骤条样式、vue Steps 步骤条全部属性

vue、Steps 步骤条、Steps 属性、vue Steps 所有步骤条样式、vue Steps 步骤条全部属性 设计规则何时使用 代码演示1.基本用法2.迷你版3.带图标的步骤条4.步骤切换5.竖直方向的步骤条6.竖直方向的小型步骤条7.步骤运行错误8.点状步骤条9.自定义点状步骤条 APIStepsSteps.Step 设…

组件封装 - steps组件

首先, 我先来看看效果 steps 组件的封装和 tabs 组件还是相似的 都会去指定两个组件来完成(仿Element UI), 都会去使用 jsx 的语法 让其中一个组件去规定样式和排版, 另外一个组件去接收父组件传入的动态数据 但和面包屑组件还是有区别的(面包屑组件封装): 相同点都是使用两…

ElementUi Steps 步骤条的使用

效果&#xff1a; 实现&#xff1a; <el-steps :active"active" finish-status"success"><el-step title"步骤 1"></el-step><el-step title"步骤 2"></el-step><el-step title"步骤 3"&…

el-steps(步骤条)的入门学习

el-steps(步骤条)的入门学习 适用场景 在有步骤流程的情况下&#xff0c;可以设置步骤条&#xff0c;引导用户向下操作&#xff0c;如四六级的报考 知识点 el-steps嵌套el-step使用el-steps的active设置Number&#xff0c;从零开始el-steps的space设置Number&#xff0c;为…

Vue2步骤条(Steps)

Vue3步骤条&#xff08;Steps&#xff09; 可自定义设置以下属性&#xff1a; 步骤标题数组&#xff08;stepsLabel&#xff09;步骤描述数组&#xff08;stepsDesc&#xff09;步骤总数&#xff08;totalSteps&#xff09;&#xff0c;默认3当前选中的步骤&#xff08;curren…

Vue3步骤条(Steps)

Vue2步骤条&#xff08;Steps&#xff09; 可自定义设置以下属性&#xff1a; 步骤数组&#xff08;steps&#xff09;&#xff0c;类型&#xff1a;Array<{title?: string, description?: string}>&#xff0c;默认 [] 当前选中的步骤&#xff0c;设置 v-model 后&a…

CSS3动画——steps函数

CSS3动画中应用的定时函数&#xff08;timing function&#xff09;常用的有内置关键字linear, ease, ease-in, ease-out, ease-in-out, step-start, step-end&#xff0c;另外还有两个内置的缓动函数cubic-bezier(), steps() 其中steps()这个函数是将整个动画过程分为指定的步…

css3中animation的steps分步动画

css的animation中&#xff0c;有一种描述动画变化速率的东西&#xff0c;例如常见的linear,ease-in,ease-out等&#xff0c;这些都是连续的变化&#xff0c;还有一种叫做steps的&#xff0c;它用来描述一种不连续的动画&#xff0c;也就是逐帧动画。 基本认识 steps的格式为&…

超几何分布(Hypergeometric distribution)

超几何分布 百度解释 https://baike.baidu.com/item/超几何分布/4782968?fraladdin 通俗解释 超几何分布中的参数是M,N,n&#xff0c;超几何分布记作X~H(N,M,n) 。假如一共有100颗球&#xff0c;20颗为红球&#xff0c;80颗为白球&#xff0c;从中不放回地拿出10个球&#x…

机器学习小组知识点12:超几何分布(Hyper-Geometric Distribution)

超几何分布与二项分布的联系与区别 事实上,超几何分布和二项分布确实有着密切的联系&#xff0c;但也有明显的区别。   课本对于超几何分布的定义是这样的&#xff1a;一般的&#xff0c;若一个随机变量X的分布列为&#xff0c;其中&#xff0c;则称X服从超几何分布&#xf…

常见分布总结-高斯分布、伯努利分布、泊松分布、几何分布、beta分布

概率分布 概率分布是指用于表述随机变量取值的概率规律,包括连续分布和离散分布。 下面作了这些概率分布的一个思维导图。 文章目录 概率分布1、离散概率分布1.1、两点分布2.2、 二项分布1.3、几何分布1.4、超几何分布1.5、泊松分布2、连续概率分布2.1、均匀分布2.2、正太分布…