element/packages/steps/src/steps.vue

69 lines
1.0 KiB
Vue
Raw Normal View History

<template>
<div
class="el-steps"
:class="[
!simple && 'el-steps--' + direction,
simple && 'el-steps--simple'
]">
<slot></slot>
</div>
</template>
<script>
import Migrating from 'element-ui/src/mixins/migrating';
export default {
name: 'ElSteps',
mixins: [Migrating],
props: {
2017-01-19 09:44:27 +00:00
space: [Number, String],
active: Number,
direction: {
type: String,
default: 'horizontal'
},
2016-11-13 02:44:15 +00:00
alignCenter: Boolean,
simple: Boolean,
finishStatus: {
type: String,
default: 'finish'
},
processStatus: {
type: String,
default: 'process'
}
},
data() {
return {
steps: [],
stepOffset: 0
};
},
methods: {
getMigratingConfig() {
return {
props: {
'center': 'center is removed.'
}
};
}
},
2016-09-09 04:28:56 +00:00
watch: {
active(newVal, oldVal) {
this.$emit('change', newVal, oldVal);
},
2016-09-09 04:28:56 +00:00
steps(steps) {
steps.forEach((child, index) => {
child.index = index;
});
}
}
};
</script>