You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
47 lines
1.0 KiB
7 years ago
|
|
||
7 years ago
|
import PropTypes from '../_util/vue-types'
|
||
7 years ago
|
import { initDefaultProps, getOptionProps } from '../_util/props-util'
|
||
7 years ago
|
import VcSteps from '../vc-steps'
|
||
|
|
||
|
const getStepsProps = (defaultProps = {}) => {
|
||
|
const props = {
|
||
|
prefixCls: PropTypes.string,
|
||
|
iconPrefix: PropTypes.string,
|
||
|
current: PropTypes.number,
|
||
|
status: PropTypes.oneOf(['wait', 'process', 'finish', 'error']),
|
||
|
size: PropTypes.oneOf(['default', 'small']),
|
||
|
direction: PropTypes.oneOf(['horizontal', 'vertical']),
|
||
|
progressDot: PropTypes.oneOfType([
|
||
|
PropTypes.bool,
|
||
|
PropTypes.func,
|
||
|
]),
|
||
|
}
|
||
|
return initDefaultProps(props, defaultProps)
|
||
|
}
|
||
|
|
||
|
export default {
|
||
|
name: 'Steps',
|
||
|
props: getStepsProps({
|
||
|
prefixCls: 'ant-steps',
|
||
|
iconPrefix: 'ant',
|
||
|
current: 0,
|
||
|
}),
|
||
|
Step: VcSteps.Step,
|
||
|
render () {
|
||
|
const props = getOptionProps(this)
|
||
|
const stepsProps = {
|
||
|
props,
|
||
|
on: this.$listeners,
|
||
7 years ago
|
scopedSlots: this.$scopedSlots,
|
||
7 years ago
|
}
|
||
|
return (
|
||
|
<VcSteps
|
||
|
{...stepsProps}
|
||
|
>
|
||
7 years ago
|
{this.$slots.default}
|
||
7 years ago
|
</VcSteps>
|
||
|
)
|
||
|
},
|
||
|
}
|
||
7 years ago
|
|