ant-design-vue/components/vc-menu/Divider.jsx

24 lines
602 B
Vue
Raw Normal View History

2020-11-10 07:41:41 +00:00
import { inject } from 'vue';
import { injectExtraPropsKey } from './FunctionProvider';
2017-12-08 06:31:53 +00:00
export default {
2018-01-30 09:17:40 +00:00
name: 'MenuDivider',
2020-07-30 07:41:54 +00:00
inheritAttrs: false,
2017-12-08 06:31:53 +00:00
props: {
disabled: {
type: Boolean,
default: true,
},
rootPrefixCls: String,
},
2020-11-10 07:41:41 +00:00
setup() {
return {
injectExtraProps: inject(injectExtraPropsKey, () => ({})),
};
},
2019-01-12 03:33:27 +00:00
render() {
2020-11-23 06:21:18 +00:00
const { rootPrefixCls } = { ...this.$props, ...this.injectExtraProps };
2020-07-30 07:41:54 +00:00
const { class: className = '', style } = this.$attrs;
2020-11-10 07:41:41 +00:00
return <li class={[className, `${rootPrefixCls}-item-divider`]} style={style} />;
2017-12-08 06:31:53 +00:00
},
2019-01-12 03:33:27 +00:00
};