mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
26 lines
773 B
TypeScript
26 lines
773 B
TypeScript
import { defineComponent, inject } from 'vue';
|
|
import { defaultConfigProvider } from '../config-provider';
|
|
import PropTypes from '../_util/vue-types';
|
|
import { getSlot } from '../_util/props-util';
|
|
|
|
export default defineComponent({
|
|
name: 'ABreadcrumbSeparator',
|
|
__ANT_BREADCRUMB_SEPARATOR: true,
|
|
props: {
|
|
prefixCls: PropTypes.string,
|
|
},
|
|
setup() {
|
|
return {
|
|
configProvider: inject('configProvider', defaultConfigProvider),
|
|
};
|
|
},
|
|
render() {
|
|
const { prefixCls: customizePrefixCls } = this;
|
|
const getPrefixCls = this.configProvider.getPrefixCls;
|
|
const prefixCls = getPrefixCls('breadcrumb', customizePrefixCls);
|
|
|
|
const children = getSlot(this);
|
|
return <span class={`${prefixCls}-separator`}>{children || '/'}</span>;
|
|
},
|
|
});
|