vue.js 步骤条_Vue.js的简单步骤指示器
·
vue.js 步骤条
步态指示符 (vue-step-indicator)
A Simple step indicator for Vue.js.
Vue.js的简单步骤指示器。
安装 (Install)
yarn add vue-step-indicator
CDN: UNPKG | jsDelivr(available as window.StepIndicator)
CDN: UNPKG | jsDelivr (可作为window.StepIndicator )
用法 (Usage)
<template>
<step-indicator :current="1" :total="3"></step-indicator>
</template>
<script>
import StepIndicator from 'vue-step-indicator'
export default {
components: {
StepIndicator
}
}
</script>
<style src="vue-step-indicator/dist/vue-step-indicator.css"></style>
API (API)
道具 (Props)
| Prop | Type | Default | Description |
|---|---|---|---|
| current | number | (Required) | Index of current step |
| total | number | (Required) | Total steps |
| currentColor | string | 'rgb(68, 0, 204)' |
Color of current step |
| defaultColor | string | 'rgb(130, 140, 153)' |
Default color of each step |
| handleClick | function | Triggered when an indicator is clicked |
| Struts | 类型 | 默认 | 描述 |
|---|---|---|---|
| 当前 | 数 | (需要) | 当前步骤的索引 |
| 总 | 数 | (需要) | 总步数 |
| currentColor | 串 | 'rgb(68, 0, 204)' |
当前步骤的颜色 |
| defaultColor | 串 | 'rgb(130, 140, 153)' |
每个步骤的默认颜色 |
| handleClick | 功能 | 单击指标时触发 |
翻译自: https://vuejsexamples.com/simple-step-indicator-for-vue-js/
vue.js 步骤条
更多推荐
所有评论(0)