user/profile page add load more mechnism support

pull/369/head
Michael Li 1 year ago
parent 6750f830c9
commit 4d24adfcdb
No known key found for this signature in database

@ -2,6 +2,9 @@
All notable changes to paopao-ce are documented in this file. All notable changes to paopao-ce are documented in this file.
## 0.5.0+dev ([`dev`](https://github.com/rocboss/paopao-ce/tree/dev)) ## 0.5.0+dev ([`dev`](https://github.com/rocboss/paopao-ce/tree/dev))
### Changed
- web frontend remove pagination to display content and use load more mechanism load page content.
## 0.4.0 ## 0.4.0
### Added ### Added
- add `pprof` feature support [#327](https://github.com/rocboss/paopao-ce/pull/327) - add `pprof` feature support [#327](https://github.com/rocboss/paopao-ce/pull/327)

@ -1 +1 @@
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-cd96058d.js";import{u as a}from"./vue-router-b8e3382f.js";import{F as i,e as c,a2 as u}from"./naive-ui-e703c4e6.js";import{d as l,c as d,V as t,a1 as o,o as f,e as x}from"./@vue-e0e89260.js";import{_ as g}from"./index-6783a73f.js";import"./vuex-473b3783.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-0555a2a8.js";import{u as a}from"./vue-router-b8e3382f.js";import{F as i,e as c,a2 as u}from"./naive-ui-e703c4e6.js";import{d as l,c as d,V as t,a1 as o,o as f,e as x}from"./@vue-e0e89260.js";import{_ as g}from"./index-aed46109.js";import"./vuex-473b3783.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default};

@ -1 +1 @@
import{_ as F}from"./post-skeleton-13288ccc.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-cd96058d.js";import{u as V}from"./vuex-473b3783.js";import{b as z}from"./vue-router-b8e3382f.js";import{a as A}from"./formatTime-4210fcd1.js";import{F as R,Q as S,H as L,G as M}from"./naive-ui-e703c4e6.js";import{d as O,r as n,j as P,c as o,V as a,a1 as p,o as e,_ as u,O as l,F as Q,a4 as j,Q as q,a as s,M as _,L as D}from"./@vue-e0e89260.js";import{_ as E}from"./index-6783a73f.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";/* empty css */const G={key:0,class:"pagination-wrap"},H={key:0,class:"skeleton-wrap"},I={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},$=O({__name:"Anouncement",setup(J){const d=V(),g=z(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return P(()=>{}),(m,K)=>{const y=N,k=S,x=F,w=L,B=M,C=R;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",G,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",H,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",I,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(Q,null,j(r.value,t=>(e(),q(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:D({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(A)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=E($,[["__scopeId","data-v-d4d04859"]]);export{kt as default}; import{_ as F}from"./post-skeleton-7c0f5cce.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-0555a2a8.js";import{u as V}from"./vuex-473b3783.js";import{b as z}from"./vue-router-b8e3382f.js";import{a as A}from"./formatTime-4210fcd1.js";import{F as R,Q as S,H as L,G as M}from"./naive-ui-e703c4e6.js";import{d as O,r as n,j as P,c as o,V as a,a1 as p,o as e,_ as u,O as l,F as Q,a4 as j,Q as q,a as s,M as _,L as D}from"./@vue-e0e89260.js";import{_ as E}from"./index-aed46109.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./@vicons-0524c43e.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";/* empty css */const G={key:0,class:"pagination-wrap"},H={key:0,class:"skeleton-wrap"},I={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},$=O({__name:"Anouncement",setup(J){const d=V(),g=z(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return P(()=>{}),(m,K)=>{const y=N,k=S,x=F,w=L,B=M,C=R;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",G,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",H,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",I,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(Q,null,j(r.value,t=>(e(),q(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:D({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(A)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=E($,[["__scopeId","data-v-d4d04859"]]);export{kt as default};

@ -1 +1 @@
import{_ as N,a as P}from"./post-item.vue_vue_type_style_index_0_lang-1a52ccee.js";import{_ as S}from"./post-skeleton-13288ccc.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-cd96058d.js";import{u as $}from"./vuex-473b3783.js";import{b as Q}from"./vue-router-b8e3382f.js";import{N as R,_ as j}from"./index-6783a73f.js";import{d as q,r as s,j as E,c as o,V as e,a1 as c,_ as g,O as v,o as t,F as f,a4 as h,Q as k}from"./@vue-e0e89260.js";import{F as G,Q as H,H as I,G as L}from"./naive-ui-e703c4e6.js";import"./content-bb4d56ff.js";import"./@vicons-0524c43e.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";const O={key:0,class:"skeleton-wrap"},T={key:1},U={key:0,class:"empty-wrap"},A={key:1},D={key:2},J={key:0,class:"pagination-wrap"},K=q({__name:"Collection",setup(W){const m=$(),y=Q(),_=s(!1),i=s([]),p=s(+y.query.p||1),l=s(20),r=s(0),u=()=>{_.value=!0,R({page:p.value,page_size:l.value}).then(n=>{_.value=!1,i.value=n.list,r.value=Math.ceil(n.pager.total_rows/l.value),window.scrollTo(0,0)}).catch(n=>{_.value=!1})},w=n=>{p.value=n,u()};return E(()=>{u()}),(n,X)=>{const C=V,b=S,x=I,z=N,d=L,B=P,F=G,M=H;return t(),o("div",null,[e(C,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",O,[e(b,{num:l.value},null,8,["num"])])):(t(),o("div",T,[i.value.length===0?(t(),o("div",U,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",A,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(z,{post:a},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",D,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(B,{post:a},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",J,[e(M,{page:p.value,"onUpdate:page":w,"page-slot":g(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const Mt=j(K,[["__scopeId","data-v-a5302c9b"]]);export{Mt as default}; import{_ as N,a as P}from"./post-item.vue_vue_type_style_index_0_lang-3139380d.js";import{_ as S}from"./post-skeleton-7c0f5cce.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-0555a2a8.js";import{u as $}from"./vuex-473b3783.js";import{b as Q}from"./vue-router-b8e3382f.js";import{N as R,_ as j}from"./index-aed46109.js";import{d as q,r as s,j as E,c as o,V as e,a1 as c,_ as g,O as v,o as t,F as f,a4 as h,Q as k}from"./@vue-e0e89260.js";import{F as G,Q as H,H as I,G as L}from"./naive-ui-e703c4e6.js";import"./content-8c36f801.js";import"./@vicons-0524c43e.js";import"./paopao-video-player-aa5e8b3f.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-a50491fd.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./@css-render-580d83ec.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";const O={key:0,class:"skeleton-wrap"},T={key:1},U={key:0,class:"empty-wrap"},A={key:1},D={key:2},J={key:0,class:"pagination-wrap"},K=q({__name:"Collection",setup(W){const m=$(),y=Q(),_=s(!1),i=s([]),p=s(+y.query.p||1),l=s(20),r=s(0),u=()=>{_.value=!0,R({page:p.value,page_size:l.value}).then(n=>{_.value=!1,i.value=n.list,r.value=Math.ceil(n.pager.total_rows/l.value),window.scrollTo(0,0)}).catch(n=>{_.value=!1})},w=n=>{p.value=n,u()};return E(()=>{u()}),(n,X)=>{const C=V,b=S,x=I,z=N,d=L,B=P,F=G,M=H;return t(),o("div",null,[e(C,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",O,[e(b,{num:l.value},null,8,["num"])])):(t(),o("div",T,[i.value.length===0?(t(),o("div",U,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",A,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(z,{post:a},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",D,[(t(!0),o(f,null,h(i.value,a=>(t(),k(d,{key:a.id},{default:c(()=>[e(B,{post:a},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",J,[e(M,{page:p.value,"onUpdate:page":w,"page-slot":g(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const Mt=j(K,[["__scopeId","data-v-a5302c9b"]]);export{Mt as default};

@ -1 +1 @@
import{u as N,b as P}from"./vue-router-b8e3382f.js";import{b as Q}from"./formatTime-4210fcd1.js";import{d as k,o,c as s,a as e,V as a,M as l,_ as C,r as c,j as R,a1 as f,O as h,F as y,a4 as S,Q as U}from"./@vue-e0e89260.js";import{o as q,F as T,Q as j,H as x,G as E}from"./naive-ui-e703c4e6.js";import{_ as b,Q as G}from"./index-6783a73f.js";import{_ as H}from"./post-skeleton-13288ccc.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-cd96058d.js";import{u as O}from"./vuex-473b3783.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-0524c43e.js";/* empty css */const A={class:"avatar"},J={class:"base-info"},K={class:"username"},W={class:"user-info"},X={class:"info-item"},Y={class:"info-item"},Z=k({__name:"contact-item",props:{contact:{}},setup(w){const u=N(),m=t=>{u.push({name:"user",query:{s:t}})};return(t,n)=>{const _=q;return o(),s("div",{class:"contact-item",onClick:n[0]||(n[0]=i=>m(t.contact.username))},[e("div",A,[a(_,{size:54,src:t.contact.avatar},null,8,["src"])]),e("div",J,[e("div",K,[e("strong",null,l(t.contact.nickname),1),e("span",null," @"+l(t.contact.username),1)]),e("div",W,[e("span",X,"UID. "+l(t.contact.user_id),1),e("span",Y,l(C(Q)(t.contact.created_on))+" 加入",1)])])])}}});const tt=b(Z,[["__scopeId","data-v-644d2c15"]]),et={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},st={key:0,class:"pagination-wrap"},at=k({__name:"Contacts",setup(w){const u=O(),m=P(),t=c(!1),n=c([]),_=c(+m.query.p||1),i=c(20),d=c(0),$=r=>{_.value=r,v()};R(()=>{v()});const v=(r=!1)=>{n.value.length===0&&(t.value=!0),G({page:_.value,page_size:i.value}).then(p=>{t.value=!1,n.value=p.list,d.value=Math.ceil(p.pager.total_rows/i.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(r,p)=>{const z=L,B=H,I=x,V=tt,D=E,F=T,M=j;return o(),s(y,null,[e("div",null,[a(z,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(o(),s("div",et,[a(B,{num:i.value},null,8,["num"])])):(o(),s("div",ot,[n.value.length===0?(o(),s("div",nt,[a(I,{size:"large",description:"暂无数据"})])):h("",!0),(o(!0),s(y,null,S(n.value,g=>(o(),U(D,{key:g.user_id},{default:f(()=>[a(V,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(o(),s("div",st,[a(M,{page:_.value,"onUpdate:page":$,"page-slot":C(u).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const Mt=b(at,[["__scopeId","data-v-3b2bf978"]]);export{Mt as default}; import{u as N,b as P}from"./vue-router-b8e3382f.js";import{b as Q}from"./formatTime-4210fcd1.js";import{d as k,o,c as s,a as e,V as a,M as l,_ as C,r as c,j as R,a1 as f,O as h,F as y,a4 as S,Q as U}from"./@vue-e0e89260.js";import{o as q,F as T,Q as j,H as x,G as E}from"./naive-ui-e703c4e6.js";import{_ as b,Q as G}from"./index-aed46109.js";import{_ as H}from"./post-skeleton-7c0f5cce.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-0555a2a8.js";import{u as O}from"./vuex-473b3783.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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-0524c43e.js";/* empty css */const A={class:"avatar"},J={class:"base-info"},K={class:"username"},W={class:"user-info"},X={class:"info-item"},Y={class:"info-item"},Z=k({__name:"contact-item",props:{contact:{}},setup(w){const u=N(),m=t=>{u.push({name:"user",query:{s:t}})};return(t,n)=>{const _=q;return o(),s("div",{class:"contact-item",onClick:n[0]||(n[0]=i=>m(t.contact.username))},[e("div",A,[a(_,{size:54,src:t.contact.avatar},null,8,["src"])]),e("div",J,[e("div",K,[e("strong",null,l(t.contact.nickname),1),e("span",null," @"+l(t.contact.username),1)]),e("div",W,[e("span",X,"UID. "+l(t.contact.user_id),1),e("span",Y,l(C(Q)(t.contact.created_on))+" 加入",1)])])])}}});const tt=b(Z,[["__scopeId","data-v-644d2c15"]]),et={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},st={key:0,class:"pagination-wrap"},at=k({__name:"Contacts",setup(w){const u=O(),m=P(),t=c(!1),n=c([]),_=c(+m.query.p||1),i=c(20),d=c(0),$=r=>{_.value=r,v()};R(()=>{v()});const v=(r=!1)=>{n.value.length===0&&(t.value=!0),G({page:_.value,page_size:i.value}).then(p=>{t.value=!1,n.value=p.list,d.value=Math.ceil(p.pager.total_rows/i.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(r,p)=>{const z=L,B=H,I=x,V=tt,D=E,F=T,M=j;return o(),s(y,null,[e("div",null,[a(z,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(o(),s("div",et,[a(B,{num:i.value},null,8,["num"])])):(o(),s("div",ot,[n.value.length===0?(o(),s("div",nt,[a(I,{size:"large",description:"暂无数据"})])):h("",!0),(o(!0),s(y,null,S(n.value,g=>(o(),U(D,{key:g.user_id},{default:f(()=>[a(V,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(o(),s("div",st,[a(M,{page:_.value,"onUpdate:page":$,"page-slot":C(u).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const Mt=b(at,[["__scopeId","data-v-3b2bf978"]]);export{Mt as default};

File diff suppressed because one or more lines are too long

@ -1 +1 @@
.compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.load-more[data-v-c5a67839]{margin:20px}.load-more .load-more-wrap[data-v-c5a67839]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-c5a67839]{font-size:14px;opacity:.65}.pagination-wrap[data-v-c5a67839]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-c5a67839],.dark .pagination-wrap[data-v-c5a67839],.dark .empty-wrap[data-v-c5a67839],.dark .skeleton-wrap[data-v-c5a67839]{background-color:#101014bf} .compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.load-more[data-v-8c60d968]{margin:20px}.load-more .load-more-wrap[data-v-8c60d968]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-8c60d968]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-8c60d968],.dark .pagination-wrap[data-v-8c60d968],.dark .empty-wrap[data-v-8c60d968],.dark .skeleton-wrap[data-v-8c60d968]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
.profile-baseinfo[data-v-fdc93801]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-fdc93801]{width:72px}.profile-baseinfo .base-info[data-v-fdc93801]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-fdc93801]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-fdc93801]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-fdc93801]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-fdc93801]{transform:scale(.75)}.profile-tabs-wrap[data-v-fdc93801]{padding:0 16px}.load-more[data-v-fdc93801]{margin:20px}.load-more .load-more-wrap[data-v-fdc93801]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-fdc93801]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-fdc93801],.dark .pagination-wrap[data-v-fdc93801]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
.profile-baseinfo[data-v-79a284ce]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-79a284ce]{width:72px}.profile-baseinfo .base-info[data-v-79a284ce]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-79a284ce]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-79a284ce]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-79a284ce]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-79a284ce]{transform:scale(.75)}.profile-tabs-wrap[data-v-79a284ce]{padding:0 16px}.pagination-wrap[data-v-79a284ce]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-wrap[data-v-79a284ce],.dark .pagination-wrap[data-v-79a284ce]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{x as $,y as z,z as I,A as j,_ as E}from"./index-6783a73f.js";import{v as U}from"./@vicons-0524c43e.js";import{d as F,r as i,n as A,j as q,a3 as x,o as c,c as _,V as n,a1 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a7 as Q,F as G,a4 as H}from"./@vue-e0e89260.js";import{o as J,M as B,j as K,e as P,O as R,L as W,F as X,f as Y,g as Z,a as ee,k as oe}from"./naive-ui-e703c4e6.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-cd96058d.js";import{u as ne}from"./vuex-473b3783.js";import"./vue-router-b8e3382f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":z({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=B,a=K,d=P,v=R,p=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(p,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[V(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?u("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):u("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(U))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0)]),_:1})])):u("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,j({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,p=Y,C=B,L=Z,M=ie,N=ee,O=oe,S=X;return c(),_("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(L,{type:"line",animated:"","onUpdate:value":k},Q({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(p,{key:0,name:"follow",tab:"关注"})):u("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(C,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[V(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(O,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(G,null,H(r.value,y=>(c(),b(M,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Me=E(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Me as default}; import{x as $,y as z,z as I,A as j,_ as E}from"./index-aed46109.js";import{v as U}from"./@vicons-0524c43e.js";import{d as F,r as i,n as A,j as q,a3 as x,o as c,c as _,V as n,a1 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a7 as Q,F as G,a4 as H}from"./@vue-e0e89260.js";import{o as J,M as B,j as K,e as P,O as R,L as W,F as X,f as Y,g as Z,a as ee,k as oe}from"./naive-ui-e703c4e6.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-0555a2a8.js";import{u as ne}from"./vuex-473b3783.js";import"./vue-router-b8e3382f.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.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";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":z({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=B,a=K,d=P,v=R,p=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(p,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[V(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?u("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):u("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(U))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0)]),_:1})])):u("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,j({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,p=Y,C=B,L=Z,M=ie,N=ee,O=oe,S=X;return c(),_("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(L,{type:"line",animated:"","onUpdate:value":k},Q({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(p,{key:0,name:"follow",tab:"关注"})):u("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(C,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[V(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(O,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(G,null,H(r.value,y=>(c(),b(M,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Me=E(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Me as default};

@ -0,0 +1 @@
.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-e7e85260]{padding:0 16px}.profile-baseinfo[data-v-e7e85260]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-e7e85260]{width:72px}.profile-baseinfo .base-info[data-v-e7e85260]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-e7e85260]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-e7e85260]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-e7e85260]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-e7e85260]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-e7e85260]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-e7e85260]{margin:20px}.load-more .load-more-wrap[data-v-e7e85260]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-e7e85260]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-e7e85260],.dark .pagination-wrap[data-v-e7e85260]{background-color:#101014bf}

@ -1 +0,0 @@
.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-46c9d00b]{padding:0 16px}.profile-baseinfo[data-v-46c9d00b]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-46c9d00b]{width:72px}.profile-baseinfo .base-info[data-v-46c9d00b]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-46c9d00b]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-46c9d00b]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-46c9d00b]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-46c9d00b]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-46c9d00b]{position:absolute;top:16px;right:16px;opacity:.75}.pagination-wrap[data-v-46c9d00b]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-wrap[data-v-46c9d00b],.dark .pagination-wrap[data-v-46c9d00b]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{a3 as E}from"./index-6783a73f.js";import{u as S}from"./vuex-473b3783.js";import{u as z}from"./vue-router-b8e3382f.js";import{j as A}from"./vooks-a50491fd.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-0524c43e.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-e703c4e6.js";import{d as $,r as h,j as q,o as a,c as f,_ as o,V as e,a1 as t,O as c,a as F,Q as _,e as L,M as U,F as Q}from"./@vue-e0e89260.js";const Y={key:0},Z={class:"navbar"},oe=$({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=S(),m=z(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return q(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(s,d)=>{const y=E,b=R,O=V,r=I,p=j,M=x,T=H;return a(),f(Q,null,[o(n).state.drawerModelShow?(a(),f("div",Y,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=B=>l.value=B),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",Z,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; import{a3 as E}from"./index-aed46109.js";import{u as S}from"./vuex-473b3783.js";import{u as z}from"./vue-router-b8e3382f.js";import{j as A}from"./vooks-a50491fd.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-0524c43e.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-e703c4e6.js";import{d as $,r as h,j as q,o as a,c as f,_ as o,V as e,a1 as t,O as c,a as F,Q as _,e as L,M as U,F as Q}from"./@vue-e0e89260.js";const Y={key:0},Z={class:"navbar"},oe=$({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=S(),m=z(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return q(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(s,d)=>{const y=E,b=R,O=V,r=I,p=j,M=x,T=H;return a(),f(Q,null,[o(n).state.drawerModelShow?(a(),f("div",Y,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=B=>l.value=B),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",Z,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};

@ -1 +1 @@
import{U as r}from"./naive-ui-e703c4e6.js";import{d as c,o as s,c as n,a4 as p,a as o,V as t,F as l}from"./@vue-e0e89260.js";import{_ as i}from"./index-6783a73f.js";const m={class:"user"},d={class:"content"},u=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; import{U as r}from"./naive-ui-e703c4e6.js";import{d as c,o as s,c as n,a4 as p,a as o,V as t,F as l}from"./@vue-e0e89260.js";import{_ as i}from"./index-aed46109.js";const m={class:"user"},d={class:"content"},u=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _};

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<title></title> <title></title>
<script type="module" crossorigin src="/assets/index-6783a73f.js"></script> <script type="module" crossorigin src="/assets/index-aed46109.js"></script>
<link rel="modulepreload" crossorigin href="/assets/@vue-e0e89260.js"> <link rel="modulepreload" crossorigin href="/assets/@vue-e0e89260.js">
<link rel="modulepreload" crossorigin href="/assets/vue-router-b8e3382f.js"> <link rel="modulepreload" crossorigin href="/assets/vue-router-b8e3382f.js">
<link rel="modulepreload" crossorigin href="/assets/vuex-473b3783.js"> <link rel="modulepreload" crossorigin href="/assets/vuex-473b3783.js">

@ -99,6 +99,9 @@ const loadPosts = () => {
}) })
.catch((err) => { .catch((err) => {
loading.value = false; loading.value = false;
if (page.value > 1) {
page.value--
}
}); });
}; };
@ -136,8 +139,12 @@ const onPostSuccess = (post: Item.PostProps) => {
}; };
const nextPage = () => { const nextPage = () => {
page.value++; if (page.value < totalPage.value || totalPage.value == 0) {
loadPosts() page.value++;
loadPosts();
} else {
noMore.value = true;
}
}; };
onMounted(() => { onMounted(() => {
@ -187,13 +194,6 @@ watch(
} }
} }
.pagination-wrap {
padding: 10px;
display: flex;
justify-content: center;
overflow: hidden;
}
.dark { .dark {
.main-content-wrap, .main-content-wrap,

@ -88,14 +88,16 @@
</div> </div>
</n-list> </n-list>
<div class="pagination-wrap" v-if="totalPage > 0"> <n-space v-if="totalPage > 0" justify="center">
<n-pagination <InfiniteLoading class="load-more" :slots="{ complete: '没有更多泡泡了', error: '加载出错' }" @infinite="nextPage()">
:page="page" <template #spinner>
@update:page="updatePage" <div class="load-more-wrap">
:page-slot="!store.state.collapsedRight ? 8 : 5" <n-spin :size="14" v-if="!noMore" />
:page-count="totalPage" <span class="load-more-spinner">{{ noMore ? '' : '' }}</span>
/> </div>
</div> </template>
</InfiniteLoading>
</n-space>
</div> </div>
</template> </template>
@ -105,12 +107,18 @@ import { useStore } from 'vuex';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { getUserPosts } from '@/api/user'; import { getUserPosts } from '@/api/user';
import { formatDate } from '@/utils/formatTime'; import { formatDate } from '@/utils/formatTime';
import InfiniteLoading from "v3-infinite-loading";
const store = useStore(); const store = useStore();
const route = useRoute(); const route = useRoute();
const loading = ref(false); const loading = ref(false);
const noMore = ref(false);
const list = ref<Item.PostProps[]>([]); const list = ref<Item.PostProps[]>([]);
const postList = ref<Item.PostProps[]>([]);
const commentList = ref<Item.PostProps[]>([]);
const highlightList = ref<Item.PostProps[]>([]);
const mediaList = ref<Item.PostProps[]>([]);
const starList = ref<Item.PostProps[]>([]);
const pageType = ref<"post" | "comment" | "highlight" |"media" | "star">('post'); const pageType = ref<"post" | "comment" | "highlight" |"media" | "star">('post');
const postPage = ref(+(route.query.p as string) || 1); const postPage = ref(+(route.query.p as string) || 1);
const commentPage = ref(1) const commentPage = ref(1)
@ -120,6 +128,11 @@ const starPage = ref(1);
const page = ref(+(route.query.p as string) || 1); const page = ref(+(route.query.p as string) || 1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const postTotalPage = ref(0);
const commentTotalPage = ref(0);
const highlightTotalPage = ref(0);
const mediaTotalPage = ref(0);
const starTotalPage = ref(0);
const loadPage = () => { const loadPage = () => {
switch(pageType.value) { switch(pageType.value) {
@ -150,12 +163,24 @@ const loadPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); postList.value = list.value;
postTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -169,12 +194,24 @@ const loadCommentPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); commentList.value = list.value;
commentTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -188,12 +225,24 @@ const loadHighlightPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); highlightList.value = list.value;
highlightTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -207,12 +256,24 @@ const loadMediaPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); mediaList.value = list.value;
mediaTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -226,12 +287,24 @@ const loadStarPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); starList.value = list.value;
starTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -239,52 +312,69 @@ const changeTab = (tab: "post" | "comment" | "highlight" | "media" | "star") =>
pageType.value = tab; pageType.value = tab;
switch(pageType.value) { switch(pageType.value) {
case "post": case "post":
page.value = postPage.value list.value = postList.value;
page.value = postPage.value;
totalPage.value = postTotalPage.value;
loadPosts(); loadPosts();
break; break;
case "comment": case "comment":
page.value = commentPage.value list.value = commentList.value;
page.value = commentPage.value;
totalPage.value = commentTotalPage.value;
loadCommentPosts(); loadCommentPosts();
break; break;
case "highlight": case "highlight":
page.value = highlightPage.value list.value = highlightList.value;
page.value = highlightPage.value;
totalPage.value = highlightTotalPage.value;
loadHighlightPosts(); loadHighlightPosts();
break; break;
case "media": case "media":
page.value = mediaPage.value list.value = mediaList.value;
page.value = mediaPage.value;
totalPage.value = mediaTotalPage.value;
loadMediaPosts(); loadMediaPosts();
break; break;
case "star": case "star":
page.value = starPage.value list.value = starList.value;
page.value = starPage.value;
totalPage.value = starTotalPage.value;
loadStarPosts(); loadStarPosts();
break; break;
} }
}; };
const updatePage = (p: number) => { const updatePage = () => {
page.value = p;
switch(pageType.value) { switch(pageType.value) {
case "post": case "post":
postPage.value = p postPage.value = page.value;
loadPosts(); loadPosts();
break; break;
case "comment": case "comment":
commentPage.value = page.value commentPage.value = page.value;
loadCommentPosts(); loadCommentPosts();
break; break;
case "highlight": case "highlight":
highlightPage.value = page.value highlightPage.value = page.value;
loadHighlightPosts(); loadHighlightPosts();
break; break;
case "media": case "media":
mediaPage.value = page.value mediaPage.value = page.value;
loadMediaPosts(); loadMediaPosts();
break; break;
case "star": case "star":
starPage.value = page.value starPage.value = page.value;
loadStarPosts(); loadStarPosts();
break; break;
} }
}; };
const nextPage = () => {
if (page.value < totalPage.value || totalPage.value == 0) {
page.value++;
updatePage();
} else {
noMore.value = true;
}
};
onMounted(() => { onMounted(() => {
loadPage(); loadPage();
}); });
@ -350,12 +440,23 @@ watch(
padding: 0 16px; padding: 0 16px;
} }
.pagination-wrap { .load-more {
padding: 10px; margin: 20px;
display: flex;
justify-content: center; .load-more-wrap {
overflow: hidden; display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 14px;
.load-more-spinner {
font-size: 14px;
opacity: 0.65;
}
}
} }
.dark { .dark {
.profile-wrap, .pagination-wrap { .profile-wrap, .pagination-wrap {
background-color: rgba(16, 16, 20, 0.75); background-color: rgba(16, 16, 20, 0.75);

@ -114,13 +114,17 @@
</div> </div>
</div> </div>
</n-list> </n-list>
<div class="pagination-wrap" v-if="totalPage > 0">
<n-pagination <n-space v-if="totalPage > 0" justify="center">
:page="page" <InfiniteLoading class="load-more" :slots="{ complete: '没有更多泡泡了', error: '加载出错' }" @infinite="nextPage()">
@update:page="updatePage" <template #spinner>
:page-slot="!store.state.collapsedRight ? 8 : 5" <div class="load-more-wrap">
:page-count="totalPage" /> <n-spin :size="14" v-if="!noMore" />
</div> <span class="load-more-spinner">{{ noMore ? '' : '' }}</span>
</div>
</template>
</InfiniteLoading>
</n-space>
</div> </div>
</template> </template>
@ -143,12 +147,14 @@ import {
BodyOutline, BodyOutline,
WalkOutline WalkOutline
} from '@vicons/ionicons5'; } from '@vicons/ionicons5';
import InfiniteLoading from "v3-infinite-loading";
const dialog = useDialog(); const dialog = useDialog();
const store = useStore(); const store = useStore();
const route = useRoute(); const route = useRoute();
const loading = ref(false); const loading = ref(false);
const noMore = ref(false);
const user = reactive<Item.UserInfo>({ const user = reactive<Item.UserInfo>({
id: 0, id: 0,
avatar: '', avatar: '',
@ -166,6 +172,11 @@ const userLoading = ref(false);
const showWhisper = ref(false); const showWhisper = ref(false);
const showAddFriendWhisper = ref(false); const showAddFriendWhisper = ref(false);
const list = ref<Item.PostProps[]>([]); const list = ref<Item.PostProps[]>([]);
const postList = ref<Item.PostProps[]>([]);
const commentList = ref<Item.PostProps[]>([]);
const highlightList = ref<Item.PostProps[]>([]);
const mediaList = ref<Item.PostProps[]>([]);
const starList = ref<Item.PostProps[]>([]);
const username = ref(route.query.s || ''); const username = ref(route.query.s || '');
const page = ref(+(route.query.p as string) || 1); const page = ref(+(route.query.p as string) || 1);
const pageType = ref<"post" | "comment" | "highlight" | "media" | "star">('post'); const pageType = ref<"post" | "comment" | "highlight" | "media" | "star">('post');
@ -176,6 +187,11 @@ const mediaPage = ref(1)
const starPage = ref(1); const starPage = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const postTotalPage = ref(0);
const commentTotalPage = ref(0);
const highlightTotalPage = ref(0);
const mediaTotalPage = ref(0);
const starTotalPage = ref(0);
const loadPage = () => { const loadPage = () => {
switch(pageType.value) { switch(pageType.value) {
@ -206,12 +222,24 @@ const loadPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); postList.value = list.value;
postTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -225,12 +253,24 @@ const loadCommentPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); commentList.value = list.value;
commentTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -244,12 +284,24 @@ const loadHighlightPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); highlightList.value = list.value;
highlightTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -263,12 +315,24 @@ const loadMediaPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true;
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); mediaList.value = list.value;
mediaTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -282,12 +346,24 @@ const loadStarPosts = () => {
}) })
.then((rsp) => { .then((rsp) => {
loading.value = false; loading.value = false;
list.value = rsp.list || []; if (rsp.list.length === 0) {
noMore.value = true
}
if (page.value > 1) {
list.value = list.value.concat(rsp.list);
} else {
list.value = rsp.list || [];
window.scrollTo(0, 0);
}
totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value); totalPage.value = Math.ceil(rsp.pager.total_rows / pageSize.value);
window.scrollTo(0, 0); starList.value = list.value;
starTotalPage.value = totalPage.value;
}) })
.catch((err) => { .catch((err) => {
list.value = [] list.value = [];
if (page.value > 1) {
page.value--;
}
loading.value = false; loading.value = false;
}); });
}; };
@ -295,23 +371,33 @@ const changeTab = (tab: "post" | "comment" | "highlight" | "media" | "star") =>
pageType.value = tab; pageType.value = tab;
switch(pageType.value) { switch(pageType.value) {
case "post": case "post":
page.value = postPage.value list.value = postList.value;
page.value = postPage.value;
totalPage.value = postTotalPage.value;
loadPosts(); loadPosts();
break; break;
case "comment": case "comment":
page.value = commentPage.value list.value = commentList.value;
page.value = commentPage.value;
totalPage.value = commentTotalPage.value;
loadCommentPosts(); loadCommentPosts();
break; break;
case "highlight": case "highlight":
page.value = highlightPage.value list.value = highlightList.value;
page.value = highlightPage.value;
totalPage.value = highlightTotalPage.value;
loadHighlightPosts(); loadHighlightPosts();
break; break;
case "media": case "media":
page.value = mediaPage.value list.value = mediaList.value;
page.value = mediaPage.value;
totalPage.value = mediaTotalPage.value;
loadMediaPosts(); loadMediaPosts();
break; break;
case "star": case "star":
page.value = starPage.value list.value = starList.value;
page.value = starPage.value;
totalPage.value = starTotalPage.value;
loadStarPosts(); loadStarPosts();
break; break;
} }
@ -341,27 +427,26 @@ const loadUser = () => {
console.log(err); console.log(err);
}); });
}; };
const updatePage = (p: number) => { const updatePage = () => {
page.value = p;
switch(pageType.value) { switch(pageType.value) {
case "post": case "post":
postPage.value = p postPage.value = page.value;
loadPosts(); loadPosts();
break; break;
case "comment": case "comment":
commentPage.value = page.value commentPage.value = page.value;
loadCommentPosts(); loadCommentPosts();
break; break;
case "highlight": case "highlight":
highlightPage.value = page.value highlightPage.value = page.value;
loadHighlightPosts(); loadHighlightPosts();
break; break;
case "media": case "media":
mediaPage.value = page.value mediaPage.value = page.value;
loadMediaPosts(); loadMediaPosts();
break; break;
case "star": case "star":
starPage.value = page.value starPage.value = page.value;
loadStarPosts(); loadStarPosts();
break; break;
} }
@ -550,6 +635,17 @@ const banUser = () => {
}, },
}); });
}; };
const nextPage = () => {
if (page.value < totalPage.value || totalPage.value == 0) {
page.value++;
updatePage();
} else {
noMore.value = true;
}
};
onMounted(() => {
loadUser();
});
watch( watch(
() => ({ () => ({
path: route.path, path: route.path,
@ -562,9 +658,6 @@ watch(
} }
} }
); );
onMounted(() => {
loadUser();
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -613,12 +706,23 @@ onMounted(() => {
} }
} }
.pagination-wrap { .load-more {
padding: 10px; margin: 20px;
display: flex;
justify-content: center; .load-more-wrap {
overflow: hidden; display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 14px;
.load-more-spinner {
font-size: 14px;
opacity: 0.65;
}
}
} }
.dark { .dark {
.profile-wrap, .pagination-wrap { .profile-wrap, .pagination-wrap {
background-color: rgba(16, 16, 20, 0.75); background-color: rgba(16, 16, 20, 0.75);

Loading…
Cancel
Save