update Steps

This commit is contained in:
梁灏 2017-09-19 21:47:53 +08:00
parent 0460a1e811
commit d4cd421cc2
3 changed files with 157 additions and 82 deletions

View file

@ -16,6 +16,7 @@
</div>
</template>
<script>
import Emitter from '../../mixins/emitter';
import { oneOf } from '../../utils/assist';
const prefixCls = 'ivu-steps';
@ -23,6 +24,7 @@
export default {
name: 'Step',
mixins: [ Emitter ],
props: {
status: {
validator (value) {
@ -49,9 +51,6 @@
currentStatus: ''
};
},
created () {
this.currentStatus = this.status;
},
computed: {
wrapClasses () {
return [
@ -97,6 +96,15 @@
this.$parent.setNextError();
}
}
},
created () {
this.currentStatus = this.status;
},
mounted () {
this.dispatch('Steps', 'append');
},
beforeDestroy () {
this.dispatch('Steps', 'remove');
}
};
</script>