spring诸如方式

Vue步进器。 (Stepper for Vue.)

A simple stepper with simple actions such as next, back and finish to perform simple forms.

一个简单的步进器,具有诸如下一步,返回和完成之类的简单动作,可以执行简单的表格。

View demo 查看演示 Download Source 下载源

安装 (Installation)

npm install vue-stepper --save

物产 (Properties)

Properties Type Values
steps Array of Objects Each object is a step that will be included in the stepper
locale String Default: en. Current options: en, es.
top-buttons Boolean Default: false. If true buttons on the header, at the start and the end of the steps, will be shown for better user experience.
keep-alive Boolean Default: true. If true step components won't be destroy in each step change, bue if false they will.
物产 类型 价值观
steps 对象数组 每个对象都是一个将包含在步进器中的步骤
locale 默认值: en 。 当前选项: enes
top-buttons 布尔型 默认值: false 。 如果标题的true按钮在步骤的开始和结束时显示,则可以提供更好的用户体验。
keep-alive 布尔型 默认值: true 。 如果true步骤组件不会在每个步骤更改中被破坏,则将它们false

步骤对象属性 (Steps object properties)

Properties Type Values
icon String Ex.: mail. Name of icons that belong to material-icons library
name String Name of the step. Each step name MUST be unique
title String Title that will be displayed below the step, on bold.
subtitle String Subtitle displayed below the title.
component Component Imported component that will be show on the content area of the step.
completed Boolean If step is completed or not. If TRUE a done material icon will replace the one given before. Only mark as completed when you want to let know the user that the previous step has been completed
物产 类型 价值观
icon 例如: mail 。 属于材料图标库的图标的名称
name 步骤名称。 每个步骤的名称必须唯一
title 将在步骤下方以粗体显示的标题。
subtitle 字幕显示在标题下方。
component 零件 导入的组件将显示在步骤的内容区域中。
completed 布尔型 步骤是否完成。 如果为TRUE ,则done材料图标将替换之前给出的图标。 仅当您想让用户知道上一步已完成时才标记为已完成

步进器发出的事件 (Events emitted by stepper)

Event name When
completed-step Triggered when a step is completed. Completed meaning that current step has been left behind on the step list. Now you can mark your step object as completed if you desire it.
active-step Current active step. It's name and index are exposed on the deployed payload.
stepper-finished Event emitted when the user clicks the final button. Now it's time to execute a final callback method
clicking-back Triggered when user clicks the back button to return to a previous step
活动名称 什么时候
completed-step 在完成步骤时触发。 已完成表示当前步骤已留在步骤列表中。 现在,您可以根据需要将步骤对象标记为已完成。
active-step 当前活动步骤。 它的nameindex显示在已部署的有效负载上。
stepper-finished 用户单击最终按钮时发出的事件。 现在是时候执行最终的回调方法了
clicking-back 当用户单击后退按钮以返回上一步时触发

内容组件可以发出的事件 (Events that can be emitted by content component)

Event name When
can-continue By default the next button will be disabled until the event can-continue is triggered with an object containing the property value. Value accepts a boolean, if true next/finish button will be enabled if false disabled. On each next step canContinue variable will be set to false.
change-next With this event you can change de state of the clickedNext prop that each step has. Just emit it with the following payload {nextBtnValue: boolean}
活动名称 什么时候
can-continue 默认情况下, 下一个按钮将被禁用,直到使用包含属性value的对象触发事件can-continueValue接受一个布尔值,如果true下一个/结束按钮,如果假禁用启用。 在每个下一步中, canContinue变量都将设置为false。
change-next 通过此事件,您可以更改每个步骤具有的clickedNext道具的状态。 只需使用以下有效负载{nextBtnValue: boolean}发出它

步骤组件的暴露道具 (Exposed props for step component)

Properties Type Values
currentStep Object Exposes current step for step component
物产 类型 价值观
currentStep 目的 公开步骤组件的当前步骤

例子 (Examples)

Template example

范本范例

<section class="section"><div class="container"><div class="columns"><div class="column is-8 is-offset-2"><horizontal-stepper :steps="demoSteps" @completed-step="completeStep"@active-step="isStepActive" @stepper-finished="alert">                     </horizontal-stepper></div></div></div>
</section>

Script example

脚本示例

import HorizontalStepper from 'vue-stepper';// This components will have the content for each stepper step.import StepOne from './StepOne.vue';import StepTwo from './StepTwo.vue';export default {components: {HorizontalStepper},data(){return {demoSteps: [{icon: 'mail',name: 'first',title: 'Sample title 1',subtitle: 'Subtitle sample',component: StepOne,completed: false},{icon: 'report_problem',name: 'second',title: 'Sample title 2',subtitle: 'Subtitle sample',component: StepTwo,completed: false}]}},methods: {// Executed when @completed-step event is triggeredcompleteStep(payload) {this.demoSteps.forEach((step) => {if (step.name === payload.name) {step.completed = true;}})},// Executed when @active-step event is triggeredisStepActive(payload) {this.demoSteps.forEach((step) => {if (step.name === payload.name) {if(step.completed === true) {step.completed = false;}}})},// Executed when @stepper-finished event is triggeredalert(payload) {alert('end')}}}

Example of component content that will be displayed on the first step (vuelidate used to validate form).

第一步将显示的组件内容示例(用于验证表单的vuelidate )。

Template

模板

<div style="padding: 2rem 3rem; text-align: left;"><div class="field"><label class="label">Username</label><div class="control"><input :class="['input', ($v.form.username.$error) ? 'is-danger' : '']" type="text" placeholder="Text input"v-model="form.username"></div><p v-if="$v.form.username.$error" class="help is-danger">This username is invalid</p></div><div class="field"><label class="label">Email</label><div class="control"><input :class="['input', ($v.form.demoEmail.$error) ? 'is-danger' : '']"  type="text" placeholder="Email input" v-model="form.demoEmail"></div><p v-if="$v.form.demoEmail.$error" class="help is-danger">This email is invalid</p></div><div class="field"><label class="label">Message</label><div class="control"><textarea :class="['textarea', ($v.form.message.$error) ? 'is-danger' : '']"  placeholder="Textarea" v-model="form.message"></textarea></div></div></div>

Javascript

Java脚本

import {validationMixin} from 'vuelidate'import {required, email} from 'vuelidate/lib/validators'export default {props: ['clickedNext', 'currentStep'],mixins: [validationMixin],data() {return {form: {username: '',demoEmail: '',message: ''}}},validations: {form: {username: {required},demoEmail: {required,email},message: {required}}},watch: {$v: {handler: function (val) {if(!val.$invalid) {this.$emit('can-continue', {value: true});} else {this.$emit('can-continue', {value: false});}},deep: true},clickedNext(val) {if(val === true) {this.$v.form.$touch();}}},mounted() {if(!this.$v.$invalid) {this.$emit('can-continue', {value: true});} else {this.$emit('can-continue', {value: false});}}}

翻译自: https://vuejsexamples.com/a-simple-stepper-with-simple-actions-such-as-next-back-and-end-to-perform-simple-forms/

spring诸如方式

spring诸如方式_一个简单的步进器,具有诸如下一步,返回和结束之类的简单动作,可以执行简单的表格相关推荐

  1. spring诸如方式_回滚诸如在家工作之类的程序时,请谨慎操作

    spring诸如方式 作为开放组织的宣传者和开放原则的大使,我充分意识到组织在试图实现持久变革时所面临的挑战. 改变根深蒂固的组织文化不应掉以轻心. 人们应该非常仔细地权衡,充分辩论,然后完全拥抱. ...

  2. python从地址提取省市区实例_一个用于提取简体中文字符串中省,市和区并能够进行映射,检验和简单绘图的python模块...

    简介 一个用于提取简体中文字符串中省,市和区并能够进行映射,检验和简单绘图的python模块. 举个例子: ["徐汇区虹漕路461号58号楼5楼", "泉州市洛江区万安塘 ...

  3. spring boot 事务_一个基于 RabbitMQ 的可复用的分布式事务消息架构方案!

    作者:Throwable | https://www.cnblogs.com/throwable/p/12266806.html 前提 分布式事务是微服务实践中一个比较棘手的问题,在笔者所实施的微服务 ...

  4. java实现缓存方式_【Java】【器篇】【缓存】一个轻量的缓存实现方式

    一.引言来 系统中时常要对外暴露一些特殊数据,这些数据存储于关系型数据库中,且显著的特征是: 数据请求频繁 数据变动很小 数据体量略大 数据请求频繁,说明要频繁的与数据库产生交互,占用与数据库的会话资 ...

  5. layui 数字步进器_光音移动设计规范 — 表单类

    表单在产品中主要负责数据采集功能.表单类组件指的是需要用户手动填写或者选择信息的组件. 光音移动端设计规范针对表单类组件,目前收录了8个(后续会增加),分别为: 1.开关 2.单选和复选 3.步进器 ...

  6. spring boot如何创建一个start_如何创建一个简单的Spring应用?

    在这一部分,我们来关注一个使用Spring的DI功能的简单的Spring应用程序.在一个应用程序中使用Spring的DI功能,需要遵循以下步骤. (1)确定应用程序对象及其依赖关系. (2)根据步骤1 ...

  7. ioc spring 上机案例_抛开Spring去理解IOC思想 - 原来IOC容器这么简单

    很多小伙伴们看到标题可能就会想到抛开Spring就不会存在IOC思想了,其实不然在接下来的文章中就会讲述到. 很多小伙伴在理解IOC的时候通常会和Spring放到一起去学习,首先呢Spring设计的非 ...

  8. 3. mysql的注解驱动的三种方式_上手spring boot项目(三)之spring boot整合mybatis进行增删改查的三种方式。...

    1.引入依赖 org.springframework.boot spring-boot-starter-web org.mybatis.spring.boot mybatis-spring-boot- ...

  9. mysql 消息队列_一个简单的 MySQL 批量事务消息队列

    基于 MySQL 的批量事务消息队列 消息队列本质上是一个存储介质,通常是链表结构,不同的进程或线程可以向消息队列中写入或读取消息.消息队列的使用场景有很多,比如异步处理任务.应用解耦.流量削锋等等. ...

最新文章

  1. android上传本地图片到服务器上,Android使用post方式上传图片到服务器的方法
  2. 如何用html语言定位img,html经常使用标签(图像标签img,连接标签a,锚点定位,及路径)...
  3. Django+xadmin打造在线教育平台(十)
  4. k8s 手动恢复redis 集群_高工面试之:redis的几种集群方式你都熟悉吗?
  5. python列表对应元素合并为列表及判断一个列表是几维
  6. java md5 算法实现_Java 实现Md5算法
  7. SakeSwap宣布其首个ILO项目为koth.token(KOTH)
  8. java 索引实现,Java创建ES索引实现
  9. Docker 学习5 Docker容器网络
  10. 【转载】Vue 2.x 实战之后台管理系统开发(二)
  11. wincc vbs mysql_WinCC 如何访问数据库(VBS)
  12. teamviewer 服务器系统,远程支持服务器搭建teamviewer
  13. WPF参考书籍及资料推荐(转)
  14. JavaScript(Ajax)和Cookie的同源策略
  15. GreatSQL vs MySQL性能测试来了,速围观~
  16. 蒙特卡罗树搜索法c语言,蒙特卡罗方法的计算方法
  17. 阿里云服务器绑定域名,阿里云esc绑定域名,阿里云域名备案相关完整情况
  18. 正点原子潘多拉上STlinkV2.1固件遇到的坑
  19. 20种常用的运放典型电路
  20. 户口本翻译,户口本在哪翻译好?

热门文章

  1. 搞个大点的 某团购App mtgsig
  2. Java实现简单日期计算功能
  3. unity修改默认字体
  4. AIDE手机编程初级教程(零基础向) 1.2 初识界面编程
  5. 数字化转型企业人才画像
  6. cad两直线相交画圆弧,CAD 两直线,怎么用圆弧连接?
  7. Java之ip地址存储的数据类型
  8. 极光推送在Android端的集成
  9. light-bot小游戏
  10. java使用poi读写word中的图片(二)