mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-26 01:40:31 +01:00
2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{b as s,N as y,Y as g,Z as v,J as o,$ as p,X as w}from"./entry.5c8819da.js";import C from"./ContentQuery.019e7157.js";import"./asyncData.31ace0d7.js";const $=s({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:!0}},render(f){const e=y(),{tag:d,excerpt:r,path:c,query:a,head:u}=f,m={...a||{},path:c||(a==null?void 0:a.path)||g(v().path),find:"one"},l=(t,n)=>o("pre",null,JSON.stringify({message:"You should use slots with <ContentDoc>",slot:t,data:n},null,2));return o(C,m,{default:e!=null&&e.default?({data:t,refresh:n,isPartial:h})=>{var i;return u&&p(t),(i=e.default)==null?void 0:i.call(e,{doc:t,refresh:n,isPartial:h,excerpt:r,...this.$attrs})}:({data:t})=>(u&&p(t),o(w,{value:t,excerpt:r,tag:d,...this.$attrs},{empty:n=>e!=null&&e.empty?e.empty(n):l("default",t)})),empty:t=>{var n;return((n=e==null?void 0:e.empty)==null?void 0:n.call(e,t))||o("p",null,"Document is empty, overwrite this content with #empty slot in <ContentDoc>.")},"not-found":t=>{var n;return((n=e==null?void 0:e["not-found"])==null?void 0:n.call(e,t))||o("p",null,"Document not found, overwrite this content with #not-found slot in <ContentDoc>.")}})}});export{$ as default};
|