48 lines
1.6 KiB
JavaScript
48 lines
1.6 KiB
JavaScript
|
import { defineComponent, useSSRContext, ref, createElementBlock } from 'vue';
|
||
|
import { ssrRenderComponent } from 'vue/server-renderer';
|
||
|
|
||
|
const __nuxt_component_0 = /* @__PURE__ */ defineComponent({
|
||
|
name: "ClientOnly",
|
||
|
inheritAttrs: false,
|
||
|
// eslint-disable-next-line vue/require-prop-types
|
||
|
props: ["fallback", "placeholder", "placeholderTag", "fallbackTag"],
|
||
|
setup(_, { slots, attrs }) {
|
||
|
const mounted = ref(false);
|
||
|
return (props) => {
|
||
|
var _a;
|
||
|
if (mounted.value) {
|
||
|
return (_a = slots.default) == null ? void 0 : _a.call(slots);
|
||
|
}
|
||
|
const slot = slots.fallback || slots.placeholder;
|
||
|
if (slot) {
|
||
|
return slot();
|
||
|
}
|
||
|
const fallbackStr = props.fallback || props.placeholder || "";
|
||
|
const fallbackTag = props.fallbackTag || props.placeholderTag || "span";
|
||
|
return createElementBlock(fallbackTag, attrs, fallbackStr);
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||
|
__name: "content",
|
||
|
__ssrInlineRender: true,
|
||
|
props: {
|
||
|
"src": null
|
||
|
},
|
||
|
setup(__props) {
|
||
|
return (_ctx, _push, _parent, _attrs) => {
|
||
|
const _component_ClientOnly = __nuxt_component_0;
|
||
|
_push(ssrRenderComponent(_component_ClientOnly, _attrs, {}, _parent));
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
const _sfc_setup = _sfc_main.setup;
|
||
|
_sfc_main.setup = (props, ctx) => {
|
||
|
const ssrContext = useSSRContext();
|
||
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/model/content.vue");
|
||
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||
|
};
|
||
|
|
||
|
export { _sfc_main as default };
|
||
|
//# sourceMappingURL=content-2b54430c.mjs.map
|