TabNews-1cd859a0.js 2.4 KB

1
  1. import{a as l,d as U,e as j,r as P,o as i,c as w,f as t,B as a,D as v,A as N,E as S,G as C,a2 as D,_ as O,K as q,I as z,L as A,a$ as B,__tla as E}from"./index-e8bff8cb.js";import G,{__tla as K}from"./main-555e2935.js";import{W as L,__tla as R}from"./main-72778113.js";import{_ as W}from"./_plugin-vue_export-helper-1b428a4d.js";let o,r,_,T,b,$=Promise.all([(()=>{try{return E}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return R}catch{}})()]).then(async()=>{r=(e=>(e.News="news",e.Image="image",e.Voice="voice",e.Video="video",e.Music="music",e.Text="text",e))(r||{}),o=(e=>(e.Published="1",e.Draft="2",e))(o||{});let p;b=e=>({accountId:l(e).accountId,type:l(e).type,name:null,content:null,mediaId:null,url:null,title:null,description:null,thumbMediaId:null,thumbMediaUrl:null,musicUrl:null,hqMusicUrl:null,introduction:null,articles:[]}),p={key:0,class:"select-item"},_=W(U({__name:"TabNews",props:{modelValue:{},newsType:{}},emits:["update:modelValue"],setup(e,{emit:g}){const I=e,V=g,s=j({get:()=>I.modelValue,set:n=>V("update:modelValue",n)}),u=P(!1),M=n=>{u.value=!1,s.value.articles=n.content.newsItem},k=()=>{s.value.articles=[]};return(n,c)=>{const m=O,y=q,d=z,f=A,x=B;return i(),w("div",null,[t(f,null,{default:a(()=>[l(s).articles&&l(s).articles.length>0?(i(),w("div",p,[t(l(G),{articles:l(s).articles},null,8,["articles"]),t(d,{class:"ope-row"},{default:a(()=>[t(y,{type:"danger",circle:"",onClick:k},{default:a(()=>[t(m,{icon:"ep:delete"})]),_:1})]),_:1})])):v("",!0),l(s).content?v("",!0):(i(),N(d,{key:1,span:24},{default:a(()=>[t(f,{style:{"text-align":"center"},align:"middle"},{default:a(()=>[t(d,{span:24},{default:a(()=>[t(y,{type:"success",onClick:c[0]||(c[0]=h=>u.value=!0)},{default:a(()=>[S(C(n.newsType===l(o).Published?"\u9009\u62E9\u5DF2\u53D1\u5E03\u56FE\u6587":"\u9009\u62E9\u8349\u7A3F\u7BB1\u56FE\u6587")+" ",1),t(m,{icon:"ep:circle-check"})]),_:1})]),_:1})]),_:1})]),_:1})),t(x,{title:"\u9009\u62E9\u56FE\u6587",modelValue:l(u),"onUpdate:modelValue":c[1]||(c[1]=h=>D(u)?u.value=h:null),width:"90%","append-to-body":"","destroy-on-close":""},{default:a(()=>[t(l(L),{type:"news","account-id":l(s).accountId,newsType:n.newsType,onSelectMaterial:M},null,8,["account-id","newsType"])]),_:1},8,["modelValue"])]),_:1})])}}}),[["__scopeId","data-v-bddd0a87"]]),T=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"}))});export{o as N,r as R,_ as T,$ as __tla,T as a,b as c};