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
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import PropTypes from '../_util/vue-types';
var Divider = {
name: 'ADivider',
props: {
prefixCls: PropTypes.string.def('ant'),
type: PropTypes.oneOf(['horizontal', 'vertical', '']).def('horizontal'),
dashed: PropTypes.bool,
orientation: PropTypes.oneOf(['left', 'right'])
},
computed: {
classString: function classString() {
var _ref;
var prefixCls = this.prefixCls,
type = this.type,
$slots = this.$slots,
dashed = this.dashed,
_orientation = this.orientation,
orientation = _orientation === undefined ? '' : _orientation;
var orientationPrefix = orientation.length > 0 ? '-' + orientation : orientation;
return _ref = {}, _defineProperty(_ref, prefixCls + '-divider', true), _defineProperty(_ref, prefixCls + '-divider-' + type, true), _defineProperty(_ref, prefixCls + '-divider-with-text' + orientationPrefix, $slots['default']), _defineProperty(_ref, prefixCls + '-divider-dashed', !!dashed), _ref;
}
},
render: function render() {
var h = arguments[0];
var classString = this.classString,
prefixCls = this.prefixCls,
$slots = this.$slots;
return h(
'div',
{ 'class': classString },
[$slots['default'] && h(
'span',
{ 'class': prefixCls + '-divider-inner-text' },
[$slots['default']]
)]
);
}
};
/* istanbul ignore next */
Divider.install = function (Vue) {
Vue.component(Divider.name, Divider);
};
export default Divider;