1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import _extends from 'babel-runtime/helpers/extends';
import PropTypes from '../_util/vue-types';
import { initDefaultProps, getOptionProps } from '../_util/props-util';
import VcSteps from '../vc-steps';
import Icon from '../icon';
var getStepsProps = function getStepsProps() {
var defaultProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var props = {
prefixCls: PropTypes.string,
iconPrefix: PropTypes.string,
current: PropTypes.number,
initial: PropTypes.number,
labelPlacement: PropTypes.oneOf(['horizontal', 'vertical']).def('horizontal'),
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);
};
var Steps = {
name: 'ASteps',
props: getStepsProps({
prefixCls: 'ant-steps',
iconPrefix: 'ant',
current: 0
}),
Step: _extends({}, VcSteps.Step, { name: 'AStep' }),
render: function render() {
var h = arguments[0];
var props = getOptionProps(this);
var prefixCls = props.prefixCls;
var icons = {
finish: h(Icon, {
attrs: { type: 'check' },
'class': prefixCls + '-finish-icon' }),
error: h(Icon, {
attrs: { type: 'close' },
'class': prefixCls + '-error-icon' })
};
var stepsProps = {
props: _extends({
icons: icons
}, props),
on: this.$listeners,
scopedSlots: this.$scopedSlots
};
return h(
VcSteps,
stepsProps,
[this.$slots['default']]
);
}
};
/* istanbul ignore next */
Steps.install = function (Vue) {
Vue.component(Steps.name, Steps);
Vue.component(Steps.Step.name, Steps.Step);
};
export default Steps;