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
13 KiB
2 lines
13 KiB
2 years ago
|
import{_ as Te,a as qe}from"./post-item.vue_vue_type_style_index_0_lang-a64c1385.js";import{_ as xe}from"./post-skeleton-c3062ba6.js";import{d as W,r as i,j as ee,o as c,c as v,Y as $,a as x,L as t,$ as s,K as P,O as T,a0 as Q,e as L,M as X,F as G,a2 as J,n as Ie,w as ze}from"./@vue-ca177dbe.js";import{u as te}from"./vuex-d28e9067.js";import{l as Y}from"./lodash-94eb5868.js";import{g as Ue,a as Re,c as Ae,b as Ee,_ as Le}from"./index-054ae305.js";import{p as Pe}from"./content-d59ed5a8.js";import{V as z,P as V}from"./IEnum-a180d93e.js";import{I as Se,V as Ne,A as Ve,d as Fe,E as Be}from"./@vicons-6d35273b.js";import{o as Me,v as Oe,j as je,e as De,w as He,x as Ke,y as Ge,z as Je,A as Ze,B as Qe,C as Xe,a as Ye,D as We,E as et,F as tt,G as at,H as ot,I as nt}from"./naive-ui-2035804c.js";import{_ as st}from"./main-nav.vue_vue_type_style_index_0_lang-17c40ff9.js";import{b as lt,u as it}from"./vue-router-88cc84d1.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./nonesir-video-db921567.js";const rt=F=>{const q=new FileReader,r=_=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(_),I=()=>{const _=new Uint8Array(q.result).subarray(0,4);let d="";for(let p=0;p<_.length;p++)d+=_[p].toString(16);switch(d){case"504b0304":case"504b0506":case"504b0708":return r("application/zip");case"504b030414":return r("application/x-zip-compressed");case"504b0508":return r("application/x-zip");case"504b5370":return r("application/octet-stream");default:return!1}};return new Promise((_,d)=>{q.onloadend=()=>{const p=F.type;_(p===""||p==="application/octet-stream"?I():r(p))},q.readAsArrayBuffer(F.slice(0,4))})},ut={key:0,class:"compose-wrap"},ct={class:"compose-line"},pt={class:"compose-user"},_t={class:"compose-line compose-options"},dt={class:"attachment"},mt={class:"submit-wrap"},vt={class:"attachment-list-wrap"},gt={key:0,class:"attachment-price-wrap"},ft=x("span",null," 附件价格¥",-1),yt={key:0,class:"eye-wrap"},ht={key:1,class:"link-wrap"},wt={key:1,class:"compose-wrap"},bt=x("div",{class:"login-wrap"},[x("span",{class:"login-banner"}," 登录后,精彩更多")],-1),kt={key:0,class:"login-only-wrap"},Ct={key:1,class:"login-wrap"},$t=W({__name:"compose",emits:["post-success"],setup(F,{emit:q}){const r=te(),I=i([]),_=i(!1),d=i(!1),p=i(!1),w=i(!1),b=i(""),U=i([]),E=i(),S=i(0),f=i("public/image"),u=i([]),h=i([]),k=i([]),y=i([]),C=i(z.FRIEND),R=i(z.FRIEND),M=[{value:z.PUBLIC,label:"公开"},{value:z.PRIVATE,label:"私密"},{value:z.FRIEND,label:"好友可见"}],N=+"300",B=i("true".toLowerCase()==="true"),O=i("true".toLowerCase()==="true"),j=i("true".toLowerCase()==="true"),A=i("false".toLowerCase()==="true"),ae=i("true".toLowerCase()==="true"),oe="/v1/attachment",Z=i(),ne=()=>{p.value=!p.value,p.value&&w.value&&(w.value=!1)},se=()=>{w.value=!w.value,w.value&&p.value&&(p.value=!1)},le=Y.debounce(a=>{Ue({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),ie=Y.debounce(a=>{Re({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),I.value=n,_.value=!1}).catch(e=>{_.value=!1})},200),re=(a,e)=>{_.value||(_.value=!0,e==="@"?le(a):ie(a))},ue=a=>{a.length>N||(b.value=a)},D=a=>{f.value=a},ce=a=>{for(let l=0;l<a.length;l++){var e=a[l].name,n=e.split(".").slice(0,-1).join("."),o=e.split(".").pop();n.length>30&&(a[l].name=n.substring(0,18)+"..."+n.substring(n.length-9)+"."+o)}u.value=a},pe=async a=>{var e,n,o,l,g;return f.value==="public/image"&&!["image/png","i
|