mt-ui-components-vue3
Version:
玛果添实UI组件库(Vue3)
50 lines • 2.4 kB
JavaScript
/* Analyzed bindings: {
"Result": "setup-maybe-ref",
"useSlots": "setup-const",
"resultProps": "setup-maybe-ref",
"NoFound": "setup-const",
"slots": "setup-maybe-ref",
"props": "setup-reactive-const"
} */
import { defineComponent as _defineComponent } from 'vue';
import { renderSlot as _renderSlot, normalizeProps as _normalizeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, createElementBlock as _createElementBlock } from "vue";
import { Result } from 'ant-design-vue';
import { useSlots } from 'vue';
import { resultProps } from 'ant-design-vue/lib/result';
import NoFound from './noFound.js';
const __sfc_main__ = _defineComponent({
props: {
...resultProps(),
},
setup(__props) {
const props = __props;
const slots = useSlots();
return (_ctx, _cache) => {
return (_ctx.status === '404')
? (_openBlock(), _createBlock(NoFound, _normalizeProps(_mergeProps({ key: 0 }, props)), {
extra: _withCtx(() => [
_renderSlot(_ctx.$slots, "extra")
]),
_: 3 /* FORWARDED */
}, 16 /* FULL_PROPS */))
: (_openBlock(), _createBlock(_unref(Result), _mergeProps({ key: 1 }, props, {
class: ['info', _ctx.status]
}), {
extra: _withCtx(() => [
_renderSlot(_ctx.$slots, "extra")
]),
default: _withCtx(() => [
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(Object.keys(_unref(slots)), (item) => {
return (_openBlock(), _createElementBlock(_Fragment, { key: item }, [
(item !== 'extra')
? _renderSlot(_ctx.$slots, item, { key: 0 })
: _createCommentVNode("v-if", true)
], 64 /* STABLE_FRAGMENT */));
}), 128 /* KEYED_FRAGMENT */))
]),
_: 3 /* FORWARDED */
}, 16 /* FULL_PROPS */, ["class"]));
};
}
});
export default __sfc_main__;