feat: Steps component
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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>
|
||||
);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user