UNPKG

1.29 kBJavaScriptView Raw
1import { createVNode as _createVNode } from "vue";
2
3function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
5import { inject } from 'vue';
6import { injectExtraPropsKey } from './FunctionProvider';
7export default {
8 name: 'MenuDivider',
9 inheritAttrs: false,
10 props: {
11 disabled: {
12 type: Boolean,
13 default: true
14 },
15 rootPrefixCls: String
16 },
17 setup: function setup() {
18 return {
19 injectExtraProps: inject(injectExtraPropsKey, function () {
20 return {};
21 })
22 };
23 },
24 render: function render() {
25 var _Object$assign = _extends(_extends({}, this.$props), this.injectExtraProps),
26 rootPrefixCls = _Object$assign.rootPrefixCls;
27
28 var _this$$attrs = this.$attrs,
29 _this$$attrs$class = _this$$attrs.class,
30 className = _this$$attrs$class === void 0 ? '' : _this$$attrs$class,
31 style = _this$$attrs.style;
32 return _createVNode("li", {
33 "class": [className, "".concat(rootPrefixCls, "-item-divider")],
34 "style": style
35 }, null);
36 }
37};
\No newline at end of file