mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
directory adjust: delete entry index.js
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
import Steps from './src/steps';
|
||||
|
||||
export default Steps;
|
@@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Icon from '../../icon';
|
||||
import Icon from '../icon';
|
||||
|
||||
export default {
|
||||
name: 'van-steps',
|
@@ -1,48 +0,0 @@
|
||||
<template>
|
||||
<div class="van-step" :class="stepClass">
|
||||
<div class="van-step__circle-container">
|
||||
<i class="van-step__circle" v-if="status !== 'process'"></i>
|
||||
<i class="van-icon van-icon-checked" :style="{ color: $parent.activeColor }" v-else></i>
|
||||
</div>
|
||||
<div class="van-step__title" :style="titleStyle">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="van-step__line"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'van-step',
|
||||
|
||||
beforeCreate() {
|
||||
this.$parent.steps.push(this);
|
||||
},
|
||||
|
||||
computed: {
|
||||
status() {
|
||||
const index = this.$parent.steps.indexOf(this);
|
||||
const active = this.$parent.active;
|
||||
|
||||
if (index < active) {
|
||||
return 'finish';
|
||||
} else if (index === active) {
|
||||
return 'process';
|
||||
}
|
||||
},
|
||||
stepClass() {
|
||||
const status = this.status;
|
||||
const statusClass = status ? 'van-step--' + status : '';
|
||||
const directionClass = `van-step--${this.$parent.direction}`;
|
||||
return [directionClass, statusClass];
|
||||
},
|
||||
titleStyle() {
|
||||
if (this.status === 'process') {
|
||||
return {
|
||||
color: this.$parent.activeColor
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user