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{R as i,a7 as c,s as u}from"./vendor-element-C6D3GHVC.js";import{_ as p}from"./index-BlMlEOqw.js";import{t as d,bG as m,r as v,a3 as b,S as f,v as g,x as h,B as y,O as x,L as w,u as j,F as O,K as _,G as P}from"./vendor-core-B-NFAs71.js";import{T as z}from"./index-B81PFEPy.js";import{a5 as T,a6 as C}from"./index-DYPGJs8A.js";const L={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"},G={class:"min-h-[200px]"},H=["innerHTML"],M={class:"mt-4 text-right text-xs text-gray-400"},A=d({__name:"list",setup(e){const{t:d}=m(),A=v(!1),B=v([]),D=b({page:1,current:1,size:10,total:0}),E=[{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}],F=v(!1),I=v(!1),K=v({}),R=()=>s(null,null,function*(){A.value=!0;try{const e=yield T({page:D.page,size:D.size});B.value=e.records,D.total=e.total}catch(e){}finally{A.value=!1}}),U=e=>{D.page=e.page,D.current=e.page,D.size=e.size,R()},W=e=>s(null,null,function*(){var s;F.value=!0,K.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:""}))),I.value=!0;try{const a=yield C(e.id);K.value=a}catch(i){}finally{I.value=!1}});return f(()=>{R()}),(e,a)=>{const t=i,l=p,o=u,n=c;return h(),g("div",L,[y("div",S,[y("div",V,[y("h2",k,w(j(d)("user.dashboard.shopAnnouncement")),1)]),x(l,{data:B.value,columns:E,loading:A.value,pagination:D,onPageChange:U},{action:O(({row:e})=>[x(z,null,{default:O(()=>[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:F.value,"onUpdate:modelValue":a[0]||(a[0]=e=>F.value=e),title:K.value.title,width:"600px","destroy-on-close":"","append-to-body":""},{default:O(()=>[P((h(),g("div",G,[y("div",{innerHTML:K.value.content,class:"prose max-w-none"},null,8,H),y("div",M," 发布时间："+w(K.value.create_time),1)])),[[n,I.value]])]),_:1},8,["modelValue","title"])])}}});export{A as default};
