2016-08-19 11:05:27 +00:00
|
|
|
<template>
|
|
|
|
<div class="el-steps" :class="['is-' + direction]"><slot></slot></div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'el-steps',
|
|
|
|
|
|
|
|
props: {
|
|
|
|
space: Number,
|
|
|
|
active: Number,
|
|
|
|
direction: {
|
|
|
|
type: String,
|
|
|
|
default: 'horizontal'
|
|
|
|
},
|
|
|
|
finishStatus: {
|
|
|
|
type: String,
|
|
|
|
default: 'finish'
|
|
|
|
},
|
|
|
|
processStatus: {
|
|
|
|
type: String,
|
|
|
|
default: 'process'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
steps: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2016-09-09 04:28:56 +00:00
|
|
|
watch: {
|
|
|
|
active(newVal, oldVal) {
|
|
|
|
this.$emit('change', newVal, oldVal);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2016-08-19 11:05:27 +00:00
|
|
|
mounted() {
|
|
|
|
this.steps.forEach((child, index) => {
|
|
|
|
child.index = index;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|