/*!
 *  build: Vue  Admin Plus
 *  copyright: vue-admin-beautiful.com
 *  time: 2024-03-07 17:07:58
 */
"use strict";(self["webpackChunkadmin_plus"]=self["webpackChunkadmin_plus"]||[]).push([[7618],{15904:function(t,a,e){e.d(a,{l:function(){return u},x:function(){return r}});var n=e(20235),o=e(96486),i=e.n(o);function r(t){const a=i().pick(t,["tid","fid","pid","authorid","avatar","author","subject","message","dateline"]);return a.author_route=(0,n.gx)(a.authorid),a}function u(t,a){return t.map((t=>{const e=i().pick(t,["tid","fid","pid","favid","authorid","authoravatar","avatar","author","subject","coverpath","attachmentPic","replies"]);e.link=(0,n.OO)(t.tid),e.image_id=t.attachmentPic.length>0?t.attachmentPic[0].aid:0,e.images=t.attachmentPic.map((t=>t.img)),e.author_route=(0,n.gx)(t.authorid);const o=parseInt(t.authorid)!==a;return e.like={can:o&&0==t.threadHasRecommend,number:parseInt(t.recommend_add),liked:!!t.threadHasRecommend},e}))}},57618:function(t,a,e){e.r(a),e.d(a,{default:function(){return b}});var n=e(57534),o=(e(3241),e(92471),e(15659)),i=(e(10444),e(77669)),r=(e(95774),e(66252)),u=e(2262),c=e(3577),l=e(15904),d=e(15790);const s={key:0,class:"item"},p={class:"row"},f={class:"name"},m={class:"author"},h=["innerHTML"],v={key:0},_={class:"content"},w={class:"tags-box"};var k={__name:"topic",props:{topic:{type:Object,default:()=>{}},canAction:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]}},setup(t){const a=t,e=(0,d.L)(),k=(0,r.Fl)((()=>a.topic)),g=(0,r.Fl)((()=>(0,l.x)(a.topic.detail))),y=(0,r.Fl)((()=>parseInt(k.value.extraInfo.follow_record)>0)),U=(0,r.Fl)((()=>k.value.detail.authorid));async function b(){await e.handleAddFollowUser(U.value),k.value.extraInfo.follow_record=1}async function x(){await e.handleDelFollowUser(U.value),k.value.extraInfo.follow_record=0}return(a,e)=>{const l=i.vs,d=(0,r.up)("router-link"),k=(0,r.up)("vab-icon"),U=o.ElButton,I=n.Ks;return(0,u.SU)(g)?((0,r.wg)(),(0,r.iD)("div",s,[(0,r._)("div",p,[(0,r.Wm)(d,{to:(0,u.SU)(g).author_route},{default:(0,r.w5)((()=>[(0,r.Wm)(l,{src:(0,u.SU)(g).avatar},null,8,["src"])])),_:1},8,["to"]),(0,r._)("div",f,[(0,r.Wm)(d,{to:(0,u.SU)(g).author_route},{default:(0,r.w5)((()=>[(0,r._)("div",m,(0,c.zw)((0,u.SU)(g).author),1)])),_:1},8,["to"]),(0,r._)("div",{innerHTML:(0,u.SU)(g).dateline},null,8,h)]),t.canAction?((0,r.wg)(),(0,r.iD)("div",v,[(0,u.SU)(y)?((0,r.wg)(),(0,r.j4)(U,{key:1,round:"",type:"warning",size:"small",onClick:x},{default:(0,r.w5)((()=>[(0,r.Wm)(k,{icon:"group-line"}),(0,r.Uk)(" 取消关注 ")])),_:1})):((0,r.wg)(),(0,r.j4)(U,{key:0,round:"",type:"primary",size:"small",onClick:b},{default:(0,r.w5)((()=>[(0,r.Wm)(k,{icon:"group-line"}),(0,r.Uk)(" 关注 ")])),_:1}))])):(0,r.kq)("",!0)]),(0,r._)("div",_,[(0,r.WI)(a.$slots,"default")]),(0,r._)("div",w,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(t.tags,(t=>((0,r.wg)(),(0,r.j4)(d,{key:t.id,to:{path:"/index",query:{tag:t.name}}},{default:(0,r.w5)((()=>[(0,r.Wm)(I,{type:"info"},{default:(0,r.w5)((()=>[(0,r.Uk)((0,c.zw)(t.name),1)])),_:2},1024)])),_:2},1032,["to"])))),128))])])):(0,r.kq)("",!0)}}};function g(t){t.__source="src/components/Topic/topic.vue"}var y=e(83744);"function"===typeof g&&g(k);const U=(0,y.Z)(k,[["__scopeId","data-v-6b79a1bb"]]);var b=U}}]);