UNPKG

@fesjs/fes-design

Version:
26 lines (23 loc) 942 B
import { defineComponent, inject, createVNode } from 'vue'; import { provideKey } from '../const'; import { useLocale } from '../../config-provider/useLocale'; var noData = defineComponent({ setup() { const { prefixCls, rootProps, rootCtx } = inject(provideKey); const { t } = useLocale(); return () => { var _ref, _rootCtx$slots$empty, _rootCtx$slots$empty2, _rootCtx$slots; const emptyText = (_ref = (_rootCtx$slots$empty = (_rootCtx$slots$empty2 = (_rootCtx$slots = rootCtx.slots).empty) === null || _rootCtx$slots$empty2 === void 0 ? void 0 : _rootCtx$slots$empty2.call(_rootCtx$slots)) !== null && _rootCtx$slots$empty !== void 0 ? _rootCtx$slots$empty : rootProps.emptyText) !== null && _ref !== void 0 ? _ref : t('empty.emptyText'); return createVNode("div", { "class": `${prefixCls}-no-data` }, [emptyText]); }; } }); export { noData as default };