2016-08-19 11:05:27 +00:00
|
|
|
<template>
|
2017-01-11 07:44:24 +00:00
|
|
|
<div
|
|
|
|
class="el-steps"
|
|
|
|
:class="['is-' + direction, center ? 'is-center' : '']">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2016-08-19 11:05:27 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2016-12-31 15:33:51 +00:00
|
|
|
name: 'ElSteps',
|
2016-08-19 11:05:27 +00:00
|
|
|
|
|
|
|
props: {
|
|
|
|
space: Number,
|
|
|
|
active: Number,
|
|
|
|
direction: {
|
|
|
|
type: String,
|
|
|
|
default: 'horizontal'
|
|
|
|
},
|
2016-11-13 02:44:15 +00:00
|
|
|
alignCenter: Boolean,
|
2017-01-11 07:44:24 +00:00
|
|
|
center: Boolean,
|
2016-08-19 11:05:27 +00:00
|
|
|
finishStatus: {
|
|
|
|
type: String,
|
|
|
|
default: 'finish'
|
|
|
|
},
|
|
|
|
processStatus: {
|
|
|
|
type: String,
|
|
|
|
default: 'process'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
2017-01-11 07:44:24 +00:00
|
|
|
steps: [],
|
|
|
|
stepOffset: 0
|
2016-08-19 11:05:27 +00:00
|
|
|
};
|
|
|
|
},
|
|
|
|
|
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>
|