mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
20 KiB
2 lines
20 KiB
1 year ago
|
import{_ as De,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-68b9f7c4.js";import{_ as Ue}from"./post-skeleton-649e932a.js";import{d as de,H as l,b as ve,e as c,f as A,bf as C,j as I,k as e,w as n,q as x,Y as z,y as ce,A as S,x as H,F as re,u as ue,c as Be,E as Te}from"./@vue-a481fc63.js";import{u as me}from"./vuex-44de225f.js";import{l as pe}from"./lodash-e0b37ac3.js";import{g as Ne,a as Ve,c as xe,b as Re,d as Ge,e as Oe,_ as Ye}from"./index-4afa107a.js";import{p as Pe}from"./content-bb278a07.js";import{V as G,P as Q}from"./IEnum-a180d93e.js";import{I as qe,V as Me,A as Se,d as Fe,E as Le}from"./@vicons-9939c40b.js";import{o as _e,v as Ke,j as Qe,e as We,w as je,x as He,y as Ze,z as Je,A as Xe,B as $e,C as et,a as ge,D as tt,E as at,F as st,G as ot,l as nt,H as lt,I as it,k as rt}from"./naive-ui-d8de3dda.js";import{_ as ut}from"./main-nav.vue_vue_type_style_index_0_lang-088e2761.js";import{b as ct,u as pt}from"./vue-router-e5a2430e.js";import{W as dt}from"./v3-infinite-loading-2c58ec2f.js";import{S as vt}from"./@opentiny-d73a2d67.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"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const mt=W=>{const U=new FileReader,d=g=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(g),O=()=>{const g=new Uint8Array(U.result).subarray(0,4);let B="";for(let p=0;p<g.length;p++)B+=g[p].toString(16);switch(B){case"504b0304":case"504b0506":case"504b0708":return d("application/zip");case"504b030414":return d("application/x-zip-compressed");case"504b0508":return d("application/x-zip");case"504b5370":return d("application/octet-stream");default:return!1}};return new Promise((g,B)=>{U.onloadend=()=>{const p=W.type;g(p===""||p==="application/octet-stream"?O():d(p))},U.readAsArrayBuffer(W.slice(0,4))})},_t={key:0,class:"compose-wrap"},gt={class:"compose-line"},ft={class:"compose-user"},ht={class:"compose-line compose-options"},wt={class:"attachment"},yt={class:"submit-wrap"},At={class:"attachment-list-wrap"},kt={key:0,class:"attachment-price-wrap"},bt=I("span",null," 附件价格¥",-1),Ct={key:0,class:"eye-wrap"},zt={key:1,class:"link-wrap"},It={key:1,class:"compose-wrap"},Dt=I("div",{class:"login-wrap"},[I("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Et={key:0,class:"login-only-wrap"},Ut={key:1,class:"login-wrap"},Bt=de({__name:"compose",emits:["post-success"],setup(W,{emit:U}){const d=me(),O=l([]),g=l(!1),B=l(!1),p=l(!1),w=l(!1),f=l(""),R=l([]),F=l(),v=l(0),r=l("public/image"),y=l([]),E=l([]),Y=l([]),T=l([]),P=l(G.FRIEND),V=l(G.FRIEND),q=[{value:G.PUBLIC,label:"公开"},{value:G.PRIVATE,label:"私密"},{value:G.FRIEND,label:"好友可见"}],M=+"400",j=l("true".toLowerCase()==="true"),L=l("true".toLowerCase()==="true"),Z=l("true".toLowerCase()==="true"),i=l("false".toLowerCase()==="true"),m=l("true".toLowerCase()==="true"),N="/v1/attachment",k=l(),D=()=>{p.value=!p.value,p.value&&w.value&&(w.value=!1)},J=()=>{w.value=!w.value,w.value&&p.value&&(p.value=!1)},X=pe.debounce(a=>{Ne({k:a}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),O.value=o,g.value=!1}).catch(t=>{g.value=!1})},200),$=pe.debounce(a=>{Ve({k:a}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),O.value=o,g.value=!1}).catch(t=>{g.value=!1})},200),ee=(a,t)=>{g.value||(g.value=!0,t==="@"?X(a):$(a))},te=a=>{a.length>M?f.value=a.substring(0,M):f.value=a},K=a=>{r.value=a},ae=
|