mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
36 lines
694 B
JavaScript
36 lines
694 B
JavaScript
import { createNamespace } from '../utils';
|
|
import { ParentMixin } from '../mixins/relation';
|
|
|
|
const [createComponent, bem] = createNamespace('steps');
|
|
|
|
export default createComponent({
|
|
mixins: [ParentMixin('vanSteps')],
|
|
|
|
props: {
|
|
activeColor: String,
|
|
inactiveIcon: String,
|
|
active: {
|
|
type: [Number, String],
|
|
default: 0,
|
|
},
|
|
direction: {
|
|
type: String,
|
|
default: 'horizontal',
|
|
},
|
|
activeIcon: {
|
|
type: String,
|
|
default: 'checked',
|
|
},
|
|
},
|
|
|
|
emits: ['click-step'],
|
|
|
|
render() {
|
|
return (
|
|
<div class={bem([this.direction])}>
|
|
<div class={bem('items')}>{this.$slots.default?.()}</div>
|
|
</div>
|
|
);
|
|
},
|
|
});
|