var e=Object.defineProperty,a=Object.defineProperties,t=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,r=(a,t,l)=>t in a?e(a,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[t]=l,s=(e,a,t)=>new Promise((l,o)=>{var n=e=>{try{s(t.next(e))}catch(a){o(a)}},r=e=>{try{s(t.throw(e))}catch(a){o(a)}},s=e=>e.done?l(e.value):Promise.resolve(e.value).then(n,r);s((t=t.apply(e,a)).next())});import{I as i,_ as c,v as u}from"./vendor-element-CbJWrKZ5.js";import{_ as p}from"./index-DXf_yKQv.js";import{q as d,bD as m,r as v,a1 as b,R as f,t as g,v as h,A as y,M as x,K as w,u as j,E as _,J as O,F as P}from"./vendor-core-DQkwEQyE.js";import{T as z}from"./index-ClknrsHN.js";import{a0 as T,a1 as C}from"./index-DOwSoTEN.js";const M={class:"page-content p-6"},S={class:"bg-white rounded-2xl p-6 shadow-sm"},V={class:"mb-6"},k={class:"text-lg font-bold"},A={class:"min-h-[200px]"},D=["innerHTML"],E={class:"mt-4 text-right text-xs text-gray-400"},H=d({__name:"list",setup(e){const{t:d}=m(),H=v(!1),I=v([]),L=b({page:1,current:1,size:10,total:0}),U=[{prop:"title",label:d("common.title"),minWidth:200},{prop:"create_time",label:d("user.common.publishTime"),width:180},{label:d("common.action"),prop:"action",width:70,useSlot:!0}],q=v(!1),F=v(!1),J=v({}),K=()=>s(null,null,function*(){H.value=!0;try{const e=yield T({page:L.page,size:L.size});I.value=e.records,L.total=e.total}catch(e){}finally{H.value=!1}}),R=e=>{L.page=e.page,L.current=e.page,L.size=e.size,K()},W=e=>s(null,null,function*(){var s;q.value=!0,J.value=(s=((e,a)=>{for(var t in a||(a={}))o.call(a,t)&&r(e,t,a[t]);if(l)for(var t of l(a))n.call(a,t)&&r(e,t,a[t]);return e})({},e),a(s,t({content:""}))),F.value=!0;try{const a=yield C(e.id);J.value=a}catch(i){}finally{F.value=!1}});return f(()=>{K()}),(e,a)=>{const t=i,l=p,o=u,n=c;return h(),g("div",M,[y("div",S,[y("div",V,[y("h2",k,w(j(d)("user.dashboard.shopAnnouncement")),1)]),x(l,{data:I.value,columns:U,loading:H.value,pagination:L,onPageChange:R},{action:_(({row:e})=>[x(z,null,{default:_(()=>[x(t,{onClick:a=>W(e)},{default:_(()=>[O(w(j(d)("common.view")),1)]),_:1},8,["onClick"])]),_:2},1024)]),_:1},8,["data","loading","pagination"])]),x(o,{modelValue:q.value,"onUpdate:modelValue":a[0]||(a[0]=e=>q.value=e),title:J.value.title,width:"600px","destroy-on-close":"","append-to-body":""},{default:_(()=>[P((h(),g("div",A,[y("div",{innerHTML:J.value.content,class:"prose max-w-none"},null,8,D),y("div",E," 发布时间："+w(J.value.create_time),1)])),[[n,F.value]])]),_:1},8,["modelValue","title"])])}}});export{H as default};
