0.1.5 • Published 6 years ago

vue-c-steps v0.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Vue Steps

A Vue component of steps view.

Getting Started

First install vue-c-steps:

npm i vue-c-steps --save
  • Usage
<template>
  <div id="app">
    <Steps :steps="steps" @submit="handleSubmit"/>
  </div>
</template>
<script>
import 'vue-c-steps/public/vue-c-steps.css'
import {Steps, parseStepItem} from 'vue-c-steps'
import Step1 from './Step1'
import Step2 from './Step2'
export default {
  name: 'app',
  data () {
    return {
      steps: [
        parseStepItem({
          title: 'Vue Step 1',
          component: Step1
        }),
        parseStepItem({
          title: 'Vue Step 2',
          component: Step2
        })
      ]
    }
  },
  methods: {
    handleSubmit () {
      // do something
    }
  }
}
</script>

Or see demo in src/demo

Document

  • Step Item Properties
PropertytypeRequiredDescription
idStringNYou can read component from $refs by id
titleStringYSteps nav title
componentVueComponentY (N for parent item)Component for step content
_activeBooleanreadonlyWhether step item active
_visitedBooleanreadonlyWhether step item visited
_initializedBooleanreadonlyWhether step item component initialized
_openBooleanreadonlyWhether step item open for parent item only
childrenArrayNMark as parent step item if not empty. The children item will ignore children property. It's support level-2 only.

Property name starting with _ mean readonly and be controlled by vue-c-steps.

Development scripts

  • Build
npm run build
  • Run demo
npm run serve
  • lint
npm run lint

License

MIT

Copyright (c) 2018

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.1-beta.2

6 years ago

0.1.1-beta.1

6 years ago

0.1.0

6 years ago