mirror of https://github.com/rocboss/paopao-ce
parent
2034eda2ad
commit
0d1bf0fe04
@ -1 +1 @@
|
|||||||
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-fa3b58e7.js";import{u as a}from"./vue-router-edf90322.js";import{F as i,e as c,a2 as u}from"./naive-ui-702193c2.js";import{d as l,c as d,V as t,a2 as o,o as f,e as x}from"./@vue-7e1ab0af.js";import{_ as g}from"./index-b4b0f710.js";import"./vuex-f1ee712f.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./@vicons-b98681e0.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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-d5384489.js";import{u as a}from"./vue-router-edf90322.js";import{F as i,e as c,a2 as u}from"./naive-ui-df120204.js";import{d as l,c as d,V as t,a2 as o,o as f,e as x}from"./@vue-7e1ab0af.js";import{_ as g}from"./index-8c4266fc.js";import"./vuex-f1ee712f.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./@vicons-b98681e0.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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-3703f541.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-fa3b58e7.js";import{u as V}from"./vuex-f1ee712f.js";import{b as z}from"./vue-router-edf90322.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-702193c2.js";import{d as O,r as n,j as P,c as o,V as a,a2 as p,o as e,_ as u,O as l,F as Q,a5 as j,Q as q,a as s,M as _,L as D}from"./@vue-7e1ab0af.js";import{_ as E}from"./index-b4b0f710.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./@vicons-b98681e0.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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-1c687629.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-d5384489.js";import{u as V}from"./vuex-f1ee712f.js";import{b as z}from"./vue-router-edf90322.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-df120204.js";import{d as O,r as n,j as P,c as o,V as a,a2 as p,o as e,_ as u,O as l,F as Q,a5 as j,Q as q,a as s,M as _,L as D}from"./@vue-7e1ab0af.js";import{_ as E}from"./index-8c4266fc.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./@vicons-b98681e0.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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 +0,0 @@
|
|||||||
import{_ as N,a as P}from"./post-item.vue_vue_type_style_index_0_lang-ebd1ae42.js";import{_ as S}from"./post-skeleton-3703f541.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-fa3b58e7.js";import{u as $}from"./vuex-f1ee712f.js";import{b as Q}from"./vue-router-edf90322.js";import{N as R,_ as j}from"./index-b4b0f710.js";import{d as q,r as s,j as E,c as o,V as e,a2 as c,_ as g,O as v,o as t,F as f,a5 as h,Q as k}from"./@vue-7e1ab0af.js";import{F as G,Q as H,H as I,G as L}from"./naive-ui-702193c2.js";import"./content-1c30deb5.js";import"./@vicons-b98681e0.js";import"./paopao-video-player-66a1a537.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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 Nt=j(K,[["__scopeId","data-v-a5302c9b"]]);export{Nt as default};
|
|
@ -0,0 +1 @@
|
|||||||
|
import{_ as N}from"./mobile-post-item.vue_vue_type_style_index_0_lang-12577f06.js";import{_ as P}from"./post-item.vue_vue_type_style_index_0_lang-870ff78f.js";import{_ as S}from"./post-skeleton-1c687629.js";import{_ as V}from"./main-nav.vue_vue_type_style_index_0_lang-d5384489.js";import{u as $}from"./vuex-f1ee712f.js";import{b as Q}from"./vue-router-edf90322.js";import{N as R,_ as j}from"./index-8c4266fc.js";import{d as q,r as a,j as E,c as o,V as e,a2 as c,_ as g,O as v,o as t,F as f,a5 as h,Q as k}from"./@vue-7e1ab0af.js";import{F as G,Q as H,H as I,G as L}from"./naive-ui-df120204.js";import"./content-3263433b.js";import"./@vicons-b98681e0.js";import"./paopao-video-player-66a1a537.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-e23078ea.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./@css-render-16be7445.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(),_=a(!1),i=a([]),p=a(+y.query.p||1),l=a(20),r=a(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=P,d=L,B=N,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,s=>(t(),k(d,{key:s.id},{default:c(()=>[e(z,{post:s},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",D,[(t(!0),o(f,null,h(i.value,s=>(t(),k(d,{key:s.id},{default:c(()=>[e(B,{post:s},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 Pt=j(K,[["__scopeId","data-v-a5302c9b"]]);export{Pt as default};
|
@ -1 +1 @@
|
|||||||
import{u as N,b as P}from"./vue-router-edf90322.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,a2 as f,O as h,F as y,a5 as S,Q as U}from"./@vue-7e1ab0af.js";import{o as q,F as T,Q as j,H as x,G as E}from"./naive-ui-702193c2.js";import{_ as b,Q as G}from"./index-b4b0f710.js";import{_ as H}from"./post-skeleton-3703f541.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-fa3b58e7.js";import{u as O}from"./vuex-f1ee712f.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./evtd-b614532e.js";import"./@css-render-16be7445.js";import"./vooks-e23078ea.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-b98681e0.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-edf90322.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,a2 as f,O as h,F as y,a5 as S,Q as U}from"./@vue-7e1ab0af.js";import{o as q,F as T,Q as j,H as x,G as E}from"./naive-ui-df120204.js";import{_ as b,Q as G}from"./index-8c4266fc.js";import{_ as H}from"./post-skeleton-1c687629.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-d5384489.js";import{u as O}from"./vuex-f1ee712f.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./evtd-b614532e.js";import"./@css-render-16be7445.js";import"./vooks-e23078ea.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-b98681e0.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
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 @@
|
|||||||
|
.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}.profile-tabs-wrap[data-v-14472e7a]{padding:0 16px}.profile-baseinfo[data-v-14472e7a]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-14472e7a]{width:72px}.profile-baseinfo .base-info[data-v-14472e7a]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-14472e7a]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-14472e7a]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-14472e7a]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-14472e7a]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-14472e7a]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-14472e7a]{margin:20px}.load-more .load-more-wrap[data-v-14472e7a]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-14472e7a]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-14472e7a],.dark .pagination-wrap[data-v-14472e7a]{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{x as $,y as z,z as I,A as j,_ as E}from"./index-b4b0f710.js";import{v as U}from"./@vicons-b98681e0.js";import{d as F,r as i,n as A,j as q,a4 as x,o as c,c as _,V as n,a2 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a8 as Q,F as G,a5 as H}from"./@vue-7e1ab0af.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-702193c2.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-fa3b58e7.js";import{u as ne}from"./vuex-f1ee712f.js";import"./vue-router-edf90322.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./evtd-b614532e.js";import"./@css-render-16be7445.js";import"./vooks-e23078ea.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-8c4266fc.js";import{v as U}from"./@vicons-b98681e0.js";import{d as F,r as i,n as A,j as q,a4 as x,o as c,c as _,V as n,a2 as s,Q as b,e as V,M as f,O as u,_ as h,w as D,a8 as Q,F as G,a5 as H}from"./@vue-7e1ab0af.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-df120204.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-d5384489.js";import{u as ne}from"./vuex-f1ee712f.js";import"./vue-router-edf90322.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-2fc92f18.js";import"./evtd-b614532e.js";import"./@css-render-16be7445.js";import"./vooks-e23078ea.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};
|
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-tabs-wrap[data-v-17f0dc61]{padding:0 16px}.profile-baseinfo[data-v-17f0dc61]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-17f0dc61]{width:72px}.profile-baseinfo .base-info[data-v-17f0dc61]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-17f0dc61]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-17f0dc61]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-17f0dc61]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-17f0dc61]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-17f0dc61]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-17f0dc61]{margin:20px}.load-more .load-more-wrap[data-v-17f0dc61]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-17f0dc61]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-17f0dc61],.dark .pagination-wrap[data-v-17f0dc61]{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-17f0dc61]{padding:0 16px}.profile-baseinfo[data-v-17f0dc61]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-17f0dc61]{width:72px}.profile-baseinfo .base-info[data-v-17f0dc61]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-17f0dc61]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-17f0dc61]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-17f0dc61]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-17f0dc61]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-17f0dc61]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-17f0dc61]{margin:20px}.load-more .load-more-wrap[data-v-17f0dc61]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-17f0dc61]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-17f0dc61],.dark .pagination-wrap[data-v-17f0dc61]{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
@ -1 +1 @@
|
|||||||
import{a3 as E}from"./index-b4b0f710.js";import{u as S}from"./vuex-f1ee712f.js";import{u as z}from"./vue-router-edf90322.js";import{j as A}from"./vooks-e23078ea.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-b98681e0.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-702193c2.js";import{d as $,r as h,j as q,o as a,c as f,_ as o,V as e,a2 as t,O as c,a as F,Q as _,e as L,M as U,F as Q}from"./@vue-7e1ab0af.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-8c4266fc.js";import{u as S}from"./vuex-f1ee712f.js";import{u as z}from"./vue-router-edf90322.js";import{j as A}from"./vooks-e23078ea.js";import{Y as C,Z as N,_ as P,$ as D}from"./@vicons-b98681e0.js";import{a3 as R,a4 as V,j as I,e as j,a5 as x,h as H}from"./naive-ui-df120204.js";import{d as $,r as h,j as q,o as a,c as f,_ as o,V as e,a2 as t,O as c,a as F,Q as _,e as L,M as U,F as Q}from"./@vue-7e1ab0af.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 @@
|
|||||||
.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}
|
.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}
|
@ -0,0 +1 @@
|
|||||||
|
import{p as D,a as F,_ as I,b as A,c as E}from"./content-3263433b.js";import{d as Q,n as w,a4 as R,o,c as f,V as n,a8 as G,a2 as a,a as l,F as J,a5 as K,a3 as k,_ as i,e as c,M as p,Q as u,O as r,s as x}from"./@vue-7e1ab0af.js";import{u as U}from"./vuex-f1ee712f.js";import{u as W}from"./vue-router-edf90322.js";import{c as X}from"./formatTime-4210fcd1.js";import{c as Y}from"./copy-to-clipboard-4ef7d3eb.js";import{i as Z,j as ee,l as te,m as se,o as ae}from"./@vicons-b98681e0.js";import{j as m,o as ne,M as oe,e as ie,O as le,a as ue,L as re}from"./naive-ui-df120204.js";const ce={class:"post-item"},pe={class:"nickname-wrap"},_e={class:"username-wrap"},me={class:"timestamp-mobile"},de={class:"item-header-extra"},ve=["innerHTML"],he={class:"opt-item"},ge={class:"opt-item"},ze=Q({__name:"mobile-post-item",props:{post:{}},setup(b){const $=b,v=W(),C=U(),z=s=>()=>x(m,null,{default:()=>x(s)}),O=w(()=>[{label:"复制链接",key:"copyTweetLink",icon:z(ae)}]),T=async s=>{switch(s){case"copyTweetLink":Y(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板");break}},e=w(()=>{let s=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},$.post);return s.contents.map(t=>{(+t.type==1||+t.type==2)&&s.texts.push(t),+t.type==3&&s.imgs.push(t),+t.type==4&&s.videos.push(t),+t.type==6&&s.links.push(t),+t.type==7&&s.attachments.push(t),+t.type==8&&s.charge_attachments.push(t)}),s}),h=s=>{v.push({name:"post",query:{id:s}})},q=(s,t)=>{if(s.target.dataset.detail){const _=s.target.dataset.detail.split(":");if(_.length===2){C.commit("refresh"),_[0]==="tag"?v.push({name:"home",query:{q:_[1],t:"tag"}}):v.push({name:"user",query:{s:_[1]}});return}}h(t)};return(s,t)=>{const _=ne,L=R("router-link"),g=oe,M=ie,S=le,y=F,B=I,N=A,V=E,j=ue,H=re;return o(),f("div",ce,[n(H,{"content-indented":""},G({avatar:a(()=>[n(_,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:a(()=>[l("span",pe,[n(L,{onClick:t[0]||(t[0]=k(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:a(()=>[c(p(e.value.user.nickname),1)]),_:1},8,["to"])]),l("span",_e," @"+p(e.value.user.username),1),e.value.is_top?(o(),u(g,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[c(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(o(),u(g,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[c(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(o(),u(g,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[c(" 好友可见 ")]),_:1})):r("",!0),l("div",null,[l("span",me,p(i(X)(e.value.created_on))+" "+p(e.value.ip_loc),1)])]),"header-extra":a(()=>[l("div",de,[n(S,{placement:"bottom-end",trigger:"click",size:"small",options:O.value,onSelect:T},{default:a(()=>[n(M,{quaternary:"",circle:""},{icon:a(()=>[n(i(m),null,{default:a(()=>[n(i(Z))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:a(()=>[e.value.attachments.length>0?(o(),u(y,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(o(),u(y,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(o(),u(B,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(o(),u(N,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(o(),u(V,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:a(()=>[n(j,{justify:"space-between"},{default:a(()=>[l("div",he,[n(i(m),{size:"18",class:"opt-item-icon"},{default:a(()=>[n(i(ee))]),_:1}),c(" "+p(e.value.upvote_count),1)]),l("div",{class:"opt-item",onClick:t[3]||(t[3]=k(d=>h(e.value.id),["stop"]))},[n(i(m),{size:"18",class:"opt-item-icon"},{default:a(()=>[n(i(te))]),_:1}),c(" "+p(e.value.comment_count),1)]),l("div",ge,[n(i(m),{size:"18",class:"opt-item-icon"},{default:a(()=>[n(i(se))]),_:1}),c(" "+p(e.value.collection_count),1)])]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:a(()=>[l("div",{onClick:t[2]||(t[2]=d=>h(e.value.id))},[(o(!0),f(J,null,K(e.value.texts,d=>(o(),f("span",{key:d.id,class:"post-text",onClick:t[1]||(t[1]=k(P=>q(P,e.value.id),["stop"])),innerHTML:i(D)(d.content).content},null,8,ve))),128))])]),key:"0"}:void 0]),1024)])}}});export{ze as _};
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}
|
@ -0,0 +1 @@
|
|||||||
|
import{p as T,a as V,_ as j,b as L,c as D}from"./content-3263433b.js";import{d as H,n as P,a4 as S,o as n,c as f,V as o,a8 as F,a2 as a,F as I,a5 as E,a3 as k,_,a as u,e as r,M as p,Q as i,O as l}from"./@vue-7e1ab0af.js";import{u as Q}from"./vuex-f1ee712f.js";import{u as R}from"./vue-router-edf90322.js";import{c as A}from"./formatTime-4210fcd1.js";import{j as G,l as J,m as K}from"./@vicons-b98681e0.js";import{o as U,M as W,j as X,a as Y,L as Z}from"./naive-ui-df120204.js";const ee={class:"nickname-wrap"},te={class:"username-wrap"},se={class:"item-header-extra"},ae={class:"timestamp"},ne=["innerHTML"],oe={class:"opt-item"},ie={class:"opt-item"},de=H({__name:"post-item",props:{post:{}},setup(x){const C=x,d=R(),z=Q(),e=P(()=>{let s=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},C.post);return s.contents.map(t=>{(+t.type==1||+t.type==2)&&s.texts.push(t),+t.type==3&&s.imgs.push(t),+t.type==4&&s.videos.push(t),+t.type==6&&s.links.push(t),+t.type==7&&s.attachments.push(t),+t.type==8&&s.charge_attachments.push(t)}),s}),v=s=>{d.push({name:"post",query:{id:s}})},$=(s,t)=>{if(s.target.dataset.detail){const c=s.target.dataset.detail.split(":");if(c.length===2){z.commit("refresh"),c[0]==="tag"?d.push({name:"home",query:{q:c[1],t:"tag"}}):d.push({name:"user",query:{s:c[1]}});return}}v(t)};return(s,t)=>{const c=U,b=S("router-link"),h=W,y=V,w=j,q=L,B=D,g=X,M=Y,N=Z;return n(),f("div",{class:"post-item",onClick:t[3]||(t[3]=m=>v(e.value.id))},[o(N,{"content-indented":""},F({avatar:a(()=>[o(c,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:a(()=>[u("span",ee,[o(b,{onClick:t[0]||(t[0]=k(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:a(()=>[r(p(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",te," @"+p(e.value.user.username),1),e.value.is_top?(n(),i(h,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[r(" 置顶 ")]),_:1})):l("",!0),e.value.visibility==1?(n(),i(h,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[r(" 私密 ")]),_:1})):l("",!0),e.value.visibility==2?(n(),i(h,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[r(" 好友可见 ")]),_:1})):l("",!0)]),"header-extra":a(()=>[u("div",se,[u("span",ae,p(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+p(_(A)(e.value.created_on)),1)])]),footer:a(()=>[e.value.attachments.length>0?(n(),i(y,{key:0,attachments:e.value.attachments},null,8,["attachments"])):l("",!0),e.value.charge_attachments.length>0?(n(),i(y,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):l("",!0),e.value.imgs.length>0?(n(),i(w,{key:2,imgs:e.value.imgs},null,8,["imgs"])):l("",!0),e.value.videos.length>0?(n(),i(q,{key:3,videos:e.value.videos},null,8,["videos"])):l("",!0),e.value.links.length>0?(n(),i(B,{key:4,links:e.value.links},null,8,["links"])):l("",!0)]),action:a(()=>[o(M,{justify:"space-between"},{default:a(()=>[u("div",oe,[o(g,{size:"18",class:"opt-item-icon"},{default:a(()=>[o(_(G))]),_:1}),r(" "+p(e.value.upvote_count),1)]),u("div",{class:"opt-item",onClick:t[2]||(t[2]=k(m=>v(e.value.id),["stop"]))},[o(g,{size:"18",class:"opt-item-icon"},{default:a(()=>[o(_(J))]),_:1}),r(" "+p(e.value.comment_count),1)]),u("div",ie,[o(g,{size:"18",class:"opt-item-icon"},{default:a(()=>[o(_(K))]),_:1}),r(" "+p(e.value.collection_count),1)])]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:a(()=>[(n(!0),f(I,null,E(e.value.texts,m=>(n(),f("span",{key:m.id,class:"post-text",onClick:t[1]||(t[1]=k(O=>$(O,e.value.id),["stop"])),innerHTML:_(T)(m.content).content},null,8,ne))),128))]),key:"0"}:void 0]),1024)])}}});export{de as _};
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
import{U as r}from"./naive-ui-702193c2.js";import{d as c,o as s,c as n,a5 as p,a as o,V as t,F as l}from"./@vue-7e1ab0af.js";import{_ as i}from"./index-b4b0f710.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-df120204.js";import{d as c,o as s,c as n,a5 as p,a as o,V as t,F as l}from"./@vue-7e1ab0af.js";import{_ as i}from"./index-8c4266fc.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 _};
|
@ -0,0 +1 @@
|
|||||||
|
import{H as F,_ as b,I}from"./index-8c4266fc.js";import{S as k,J as $,T as B,b as U,e as W,i as z}from"./naive-ui-df120204.js";import{d as C,r,o as R,Q as V,a2 as s,a,V as n,e as l,M as i}from"./@vue-7e1ab0af.js";const M={class:"whisper-wrap"},N={class:"whisper-line"},A={class:"whisper-line send-wrap"},S=C({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:u}){const d=p,o=r(""),t=r(!1),_=()=>{u("success")},m=()=>{t.value=!0,F({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",_()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=k,w=$,f=B,v=U,g=W,y=z;return R(),V(y,{show:e.show,"onUpdate:show":_,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",M,[n(f,{"show-icon":!1},{default:s(()=>[l(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[l(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",N,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",A,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[l(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const E=b(S,[["__scopeId","data-v-0cbfe47c"]]),T={class:"whisper-wrap"},q={class:"whisper-line"},D={class:"whisper-line send-wrap"},H=C({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:u}){const d=p,o=r(""),t=r(!1),_=()=>{u("success")},m=()=>{t.value=!0,I({user_id:d.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",_()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=k,w=$,f=B,v=U,g=W,y=z;return R(),V(y,{show:e.show,"onUpdate:show":_,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",T,[n(f,{"show-icon":!1},{default:s(()=>[l(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[l(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",q,[n(v,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",D,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[l(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const G=b(H,[["__scopeId","data-v-60be56a2"]]);export{G as W,E as _};
|
@ -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}
|
@ -0,0 +1,321 @@
|
|||||||
|
<template>
|
||||||
|
<div class="post-item">
|
||||||
|
<n-thing content-indented>
|
||||||
|
<template #avatar>
|
||||||
|
<n-avatar round :size="30" :src="post.user.avatar" />
|
||||||
|
</template>
|
||||||
|
<template #header>
|
||||||
|
<span class="nickname-wrap">
|
||||||
|
<router-link
|
||||||
|
@click.stop
|
||||||
|
class="username-link"
|
||||||
|
:to="{
|
||||||
|
name: 'me',
|
||||||
|
query: { s: post.user.username },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ post.user.nickname }}
|
||||||
|
</router-link>
|
||||||
|
</span>
|
||||||
|
<span class="username-wrap"> @{{ post.user.username }} </span>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.is_top"
|
||||||
|
class="top-tag"
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
置顶
|
||||||
|
</n-tag>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.visibility == 1"
|
||||||
|
class="top-tag"
|
||||||
|
type="error"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
私密
|
||||||
|
</n-tag>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.visibility == 2"
|
||||||
|
class="top-tag"
|
||||||
|
type="info"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
好友可见
|
||||||
|
</n-tag>
|
||||||
|
<div>
|
||||||
|
<span class="timestamp-mobile">
|
||||||
|
{{ formatPrettyDate(post.created_on) }} {{ post.ip_loc }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #header-extra>
|
||||||
|
<div class="item-header-extra">
|
||||||
|
<n-dropdown
|
||||||
|
placement="bottom-end"
|
||||||
|
trigger="click"
|
||||||
|
size="small"
|
||||||
|
:options="tweetOptions"
|
||||||
|
@select="handleTweetAction"
|
||||||
|
>
|
||||||
|
<n-button quaternary circle>
|
||||||
|
<template #icon>
|
||||||
|
<n-icon>
|
||||||
|
<more-horiz-filled />
|
||||||
|
</n-icon>
|
||||||
|
</template>
|
||||||
|
</n-button>
|
||||||
|
</n-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #description v-if="post.texts.length > 0">
|
||||||
|
<div @click="goPostDetail(post.id)">
|
||||||
|
<span v-for="content in post.texts"
|
||||||
|
:key="content.id"
|
||||||
|
class="post-text"
|
||||||
|
@click.stop="doClickText($event, post.id)"
|
||||||
|
v-html="parsePostTag(content.content).content"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<post-attachment
|
||||||
|
v-if="post.attachments.length > 0"
|
||||||
|
:attachments="post.attachments" />
|
||||||
|
<post-attachment
|
||||||
|
v-if="post.charge_attachments.length > 0"
|
||||||
|
:attachments="post.charge_attachments"
|
||||||
|
:price="post.attachment_price"
|
||||||
|
/>
|
||||||
|
<post-image
|
||||||
|
v-if="post.imgs.length > 0"
|
||||||
|
:imgs="post.imgs" />
|
||||||
|
<post-video
|
||||||
|
v-if="post.videos.length > 0"
|
||||||
|
:videos="post.videos" />
|
||||||
|
<post-link
|
||||||
|
v-if="post.links.length > 0"
|
||||||
|
:links="post.links" />
|
||||||
|
</template>
|
||||||
|
<template #action>
|
||||||
|
<n-space justify="space-between">
|
||||||
|
<div class="opt-item">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<heart-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.upvote_count }}
|
||||||
|
</div>
|
||||||
|
<div class="opt-item" @click.stop="goPostDetail(post.id)">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<chatbox-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.comment_count }}
|
||||||
|
</div>
|
||||||
|
<div class="opt-item">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<bookmark-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.collection_count }}
|
||||||
|
</div>
|
||||||
|
</n-space>
|
||||||
|
</template>
|
||||||
|
</n-thing>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { h, computed } from 'vue';
|
||||||
|
import type { Component } from 'vue'
|
||||||
|
import { NIcon } from 'naive-ui'
|
||||||
|
import { useStore } from 'vuex';
|
||||||
|
import type { DropdownOption } from 'naive-ui';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { formatPrettyDate } from '@/utils/formatTime';
|
||||||
|
import { parsePostTag } from '@/utils/content';
|
||||||
|
import {
|
||||||
|
HeartOutline,
|
||||||
|
BookmarkOutline,
|
||||||
|
ChatboxOutline,
|
||||||
|
ShareSocialOutline,
|
||||||
|
} from '@vicons/ionicons5';
|
||||||
|
import { MoreHorizFilled } from '@vicons/material';
|
||||||
|
import copy from "copy-to-clipboard";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const store = useStore();
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
post: Item.PostProps,
|
||||||
|
}>(), {});
|
||||||
|
|
||||||
|
const renderIcon = (icon: Component) => {
|
||||||
|
return () => {
|
||||||
|
return h(NIcon, null, {
|
||||||
|
default: () => h(icon)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const tweetOptions = computed(() => {
|
||||||
|
let options: DropdownOption[] = [
|
||||||
|
{
|
||||||
|
label: '复制链接',
|
||||||
|
key: 'copyTweetLink',
|
||||||
|
icon: renderIcon(ShareSocialOutline),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return options;
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleTweetAction = async (
|
||||||
|
item: 'copyTweetLink'
|
||||||
|
) => {
|
||||||
|
switch (item) {
|
||||||
|
case 'copyTweetLink':
|
||||||
|
copy(`${window.location.origin}/#/post?id=${post.value.id}`);
|
||||||
|
window.$message.success('链接已复制到剪贴板');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const post = computed(() => {
|
||||||
|
let post: Item.PostComponentProps = Object.assign(
|
||||||
|
{
|
||||||
|
texts: [],
|
||||||
|
imgs: [],
|
||||||
|
videos: [],
|
||||||
|
links: [],
|
||||||
|
attachments: [],
|
||||||
|
charge_attachments: [],
|
||||||
|
},
|
||||||
|
props.post
|
||||||
|
);
|
||||||
|
post.contents.map((content) => {
|
||||||
|
if (+content.type === 1 || +content.type === 2) {
|
||||||
|
post.texts.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 3) {
|
||||||
|
post.imgs.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 4) {
|
||||||
|
post.videos.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 6) {
|
||||||
|
post.links.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 7) {
|
||||||
|
post.attachments.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 8) {
|
||||||
|
post.charge_attachments.push(content);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return post;
|
||||||
|
});
|
||||||
|
const goPostDetail = (id: number) => {
|
||||||
|
router.push({
|
||||||
|
name: 'post',
|
||||||
|
query: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const doClickText = (e: MouseEvent, id: number) => {
|
||||||
|
if ((e.target as any).dataset.detail) {
|
||||||
|
const d = (e.target as any).dataset.detail.split(':');
|
||||||
|
if (d.length === 2) {
|
||||||
|
store.commit('refresh');
|
||||||
|
if (d[0] === 'tag') {
|
||||||
|
router.push({
|
||||||
|
name: 'home',
|
||||||
|
query: {
|
||||||
|
q: d[1],
|
||||||
|
t: 'tag',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
router.push({
|
||||||
|
name: 'user',
|
||||||
|
query: {
|
||||||
|
s: d[1],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
goPostDetail(id);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.post-item {
|
||||||
|
width: 100%;
|
||||||
|
padding: 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.nickname-wrap {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.username-wrap {
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-tag {
|
||||||
|
transform: scale(0.75);
|
||||||
|
}
|
||||||
|
.timestamp-mobile {
|
||||||
|
margin-top: 2px;
|
||||||
|
opacity: 0.75;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
.item-header-extra {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0.75;
|
||||||
|
.timestamp {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.post-text {
|
||||||
|
text-align: justify;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opt-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0.7;
|
||||||
|
.opt-item-icon {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background: #f7f9f9;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n-thing-avatar {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.n-thing-header {
|
||||||
|
line-height: 16px;
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dark {
|
||||||
|
.post-item {
|
||||||
|
&:hover {
|
||||||
|
background: #18181c;
|
||||||
|
}
|
||||||
|
background-color: rgba(16, 16, 20, 0.75);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue