Coder Social home page Coder Social logo

vue-steps's Introduction

vue-steps

2k大小, 简单轻巧的 Vue 组件, �轻松创建步骤条

在自己项目中使用

下载

npm i a-vue-steps --save

使用:

import VueSteps from 'a-vue-steps'
import 'a-vue-steps/dist/vue-steps.min.css'
Vue.use(VueSteps)

配置项

�属性 类型 �示例 说明
items Array [{num: '一',text: '测试阶段1'},...] num 为步骤数, text 为步骤说明文字
activeIndex Number 1 �默认为0

示例

<template>
  <VueSteps :items="items" :activeIndex='index'/>
</template>

<script>
export default {
  data () {
    return {
      items: [
        {
          num: '一',
          text: '测试阶段1'
        },
        {
          num: '二',
          text: '测试阶段2'
        },
        {
          num: '三',
          text: '测试阶段3'
        }
      ],
      index: 0
    }
  },
  methods: {
    next () {
      if (this.index < 2) {
        this.index += 1
      } else {
        this.index = 0
      }
    }
  }
}
</script>

��演示图

vue-steps's People

Contributors

morehardy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.