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-f4a299b2.js";import{_ as Ue}from"./post-skeleton-44ec6282.js";import{d as pe,H as i,b as de,e as r,f as A,bf as z,j as D,k as e,w as n,q as R,Y as I,y as re,A as M,x as j,F as ie,u as ue,c as Te,E as Be}from"./@vue-a481fc63.js";import{u as ve}from"./vuex-44de225f.js";import{l as ce}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-ecb96a03.js";import{p as Pe}from"./content-9d6964a1.js";import{V as Y,P as K}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 me,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 _e,D as tt,E as at,F as st,G as ot,l as nt,H as lt,I as it,k as ut}from"./naive-ui-d8de3dda.js";import{_ as rt}from"./main-nav.vue_vue_type_style_index_0_lang-0ef33495.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=Q=>{const U=new FileReader,p=g=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(g),P=()=>{const g=new Uint8Array(U.result).subarray(0,4);let h="";for(let c=0;c<g.length;c++)h+=g[c].toString(16);switch(h){case"504b0304":case"504b0506":case"504b0708":return p("application/zip");case"504b030414":return p("application/x-zip-compressed");case"504b0508":return p("application/x-zip");case"504b5370":return p("application/octet-stream");default:return!1}};return new Promise((g,h)=>{U.onloadend=()=>{const c=Q.type;g(c===""||c==="application/octet-stream"?P():p(c))},U.readAsArrayBuffer(Q.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=D("span",null," 附件价格¥",-1),Ct={key:0,class:"eye-wrap"},zt={key:1,class:"link-wrap"},It={key:1,class:"compose-wrap"},Dt=D("div",{class:"login-wrap"},[D("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Et={key:0,class:"login-only-wrap"},Ut={key:1,class:"login-wrap"},Tt=pe({__name:"compose",emits:["post-success"],setup(Q,{emit:U}){const p=ve(),P=i([]),g=i(!1),h=i(!1),c=i(!1),k=i(!1),E=i(""),G=i([]),m=i(),w=i(0),d=i("public/image"),y=i([]),q=i([]),B=i([]),O=i([]),x=i(Y.FRIEND),T=i(Y.FRIEND),W=[{value:Y.PUBLIC,label:"公开"},{value:Y.PRIVATE,label:"私密"},{value:Y.FRIEND,label:"好友可见"}],S=+"400",F=i("true".toLowerCase()==="true"),H=i("true".toLowerCase()==="true"),l=i("true".toLowerCase()==="true"),v=i("false".toLowerCase()==="true"),N=i("true".toLowerCase()==="true"),b="/v1/attachment",V=i(),Z=()=>{c.value=!c.value,c.value&&k.value&&(k.value=!1)},J=()=>{k.value=!k.value,k.value&&c.value&&(c.value=!1)},X=ce.debounce(a=>{Ne({k:a}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),P.value=o,g.value=!1}).catch(t=>{g.value=!1})},200),$=ce.debounce(a=>{Ve({k:a}).then(t=>{let o=[];t.suggest.map(s=>{o.push({label:s,value:s})}),P.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>S?E.value=a.substring(0,S):E.value=a},L=a=>{d.value=a},ae=
|