You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/Contacts-212adf88.js

2 lines
2.7 KiB

2 years ago
import{u as M,b as P}from"./vue-router-88cc84d1.js";import{d as b,o as t,c as n,a,L as s,M as v,r as i,j as R,$ as h,Y as S,O as y,F as k,a2 as U,K as V}from"./@vue-ca177dbe.js";import{o as q,F as D,G as L,I as T,H as j}from"./naive-ui-2035804c.js";import{_ as C,N as E}from"./index-71354138.js";import{_ as G}from"./post-skeleton-fdd699ea.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as K}from"./vuex-d28e9067.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./@vicons-6d35273b.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[a("div",O,[s(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),a("div",Y,[a("div",A,[a("strong",null,v(c.contact.nickname),1),a("span",null," @"+v(c.contact.username),1)]),a("div",J,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=K(),m=P(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};R(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),E({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=G,I=T,z=W,B=j,N=D,F=L;return t(),n(k,null,[a("div",null,[s(w,{title:"好友"}),s(N,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[s(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[s(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,U(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[s(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[s(F,{page:_.value,"onUpdate:page":$,"page-slot":S(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default};