diff --git a/mail-vue/src/components/email-scroll/index.vue b/mail-vue/src/components/email-scroll/index.vue
index 2c241ce..6f5aede 100644
--- a/mail-vue/src/components/email-scroll/index.vue
+++ b/mail-vue/src/components/email-scroll/index.vue
@@ -55,7 +55,7 @@
effect="dark"
content="已发送"
>
-
${ formatDetailDate(email.createTime) },${email.name} <${email.sendEmail}> 来信:
-
${email.content}` +
+` open() + console.log(defValue.value) }) +} +function formatImage(content) { + content = content || ''; + const domain = settingStore.settings.r2Domain; + console.log(content) + return content.replace(/{{domain}}/g, domain + '/'); } function open() { diff --git a/mail-vue/src/views/content/index.vue b/mail-vue/src/views/content/index.vue index 4585531..2f64d49 100644 --- a/mail-vue/src/views/content/index.vue +++ b/mail-vue/src/views/content/index.vue @@ -35,7 +35,7 @@+ ${formatImage(email.content) || ` ${email.text}`} + +
{{email.text}}
O||ie
O?O:P,I&&n(Nt,ie)),ie},C=(D,I=!0)=>{var O;const P=s.currentValue,N=S(D);if(!I){n(Nt,N);return}P===N&&D||(s.userInput=null,n(Nt,N),P!==N&&n(Qt,N,P),r.validateEvent&&((O=l?.validate)==null||O.call(l,"change").catch(W=>void 0)),s.currentValue=N)},x=D=>{s.userInput=D;const I=D===""?null:Number(D);n(Ri,I),C(I,!1)},E=D=>{const I=D!==""?Number(D):"";(et(I)&&!Number.isNaN(I)||D==="")&&C(I),B(),s.userInput=null},T=()=>{var D,I;(I=(D=o.value)==null?void 0:D.focus)==null||I.call(D)},A=()=>{var D,I;(I=(D=o.value)==null?void 0:D.blur)==null||I.call(D)},k=D=>{n("focus",D)},R=D=>{var I,O;s.userInput=null,lD()&&s.currentValue===null&&((I=o.value)!=null&&I.input)&&(o.value.input.value=""),n("blur",D),r.validateEvent&&((O=l?.validate)==null||O.call(l,"blur").catch(P=>void 0))},B=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},F=D=>{document.activeElement===D.target&&D.preventDefault()};return Ce(()=>r.modelValue,(D,I)=>{const O=S(D,!0);s.userInput===null&&O!==I&&(s.currentValue=O)},{immediate:!0}),ut(()=>{var D;const{min:I,max:O,modelValue:P}=r,N=(D=o.value)==null?void 0:D.input;if(N.setAttribute("role","spinbutton"),Number.isFinite(O)?N.setAttribute("aria-valuemax",String(O)):N.removeAttribute("aria-valuemax"),Number.isFinite(I)?N.setAttribute("aria-valuemin",String(I)):N.removeAttribute("aria-valuemin"),N.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),N.setAttribute("aria-disabled",String(p.value)),!et(P)&&P!=null){let W=Number(P);Number.isNaN(W)&&(W=null),n(Nt,W)}N.addEventListener("wheel",F,{passive:!1})}),Fu(()=>{var D,I;const O=(D=o.value)==null?void 0:D.input;O?.setAttribute("aria-valuenow",`${(I=s.currentValue)!=null?I:""}`)}),t({focus:T,blur:A}),(D,I)=>(L(),j("div",{class:Y([w(a).b(),w(a).m(w(h)),w(a).is("disabled",w(p)),w(a).is("without-controls",!D.controls),w(a).is("controls-right",w(d))]),onDragstart:qe(()=>{},["prevent"])},[D.controls?nt((L(),j("span",{key:0,role:"button","aria-label":w(i)("el.inputNumber.decrease"),class:Y([w(a).e("decrease"),w(a).is("disabled",w(u))]),onKeydown:or(_,["enter"])},[we(D.$slots,"decrease-icon",{},()=>[$(w(ct),null,{default:U(()=>[w(d)?(L(),Q(w(dd),{key:0})):(L(),Q(w(wV),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[w(B2),_]]):re("v-if",!0),D.controls?nt((L(),j("span",{key:1,role:"button","aria-label":w(i)("el.inputNumber.increase"),class:Y([w(a).e("increase"),w(a).is("disabled",w(c))]),onKeydown:or(b,["enter"])},[we(D.$slots,"increase-icon",{},()=>[$(w(ct),null,{default:U(()=>[w(d)?(L(),Q(w(nD),{key:0})):(L(),Q(w(MV),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[w(B2),b]]):re("v-if",!0),$(w(Ui),{id:D.id,ref_key:"input",ref:o,type:"number",step:D.step,"model-value":w(v),placeholder:D.placeholder,readonly:D.readonly,disabled:w(p),size:w(h),max:D.max,min:D.min,name:D.name,"aria-label":D.ariaLabel,"validate-event":!1,onKeydown:[or(qe(b,["prevent"]),["up"]),or(qe(_,["prevent"]),["down"])],onBlur:R,onFocus:k,onInput:x,onChange:E},Z_({_:2},[D.$slots.prefix?{name:"prefix",fn:U(()=>[we(D.$slots,"prefix")])}:void 0,D.$slots.suffix?{name:"suffix",fn:U(()=>[we(D.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var jG=ze(KG,[["__file","input-number.vue"]]);const vP=Ft(jG),YG=Xe({modelValue:{type:$e(Array)},max:Number,tagType:{...Rf.type,default:"info"},tagEffect:Rf.effect,trigger:{type:$e(String),default:Ze.enter},draggable:{type:Boolean,default:!1},size:pi,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},saveOnBlur:{type:Boolean,default:!0},ariaLabel:String}),qG={[Nt]:e=>Me(e)||It(e),[Qt]:e=>Me(e)||It(e),[Ri]:e=>He(e),"add-tag":e=>He(e),"remove-tag":e=>He(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0};function XG({props:e,emit:t,formItem:n}){const r=as(),i=li(),a=Rr(),o=z(),s=V(()=>["small"].includes(i.value)?"small":"default"),l=V(()=>{var T;return(T=e.modelValue)!=null&&T.length?void 0:e.placeholder}),u=V(()=>!(e.readonly||r.value)),c=V(()=>{var T,A;return It(e.max)?!1:((A=(T=e.modelValue)==null?void 0:T.length)!=null?A:0)>=e.max}),f=T=>{if(c.value){o.value=void 0;return}S.value||t(Ri,T.target.value)},d=T=>{var A;if(!S.value)switch(T.code){case e.trigger:T.preventDefault(),T.stopPropagation(),h();break;case Ze.numpadEnter:e.trigger===Ze.enter&&(T.preventDefault(),T.stopPropagation(),h());break;case Ze.backspace:!o.value&&((A=e.modelValue)!=null&&A.length)&&(T.preventDefault(),T.stopPropagation(),p(e.modelValue.length-1));break}},h=()=>{var T,A;const k=(T=o.value)==null?void 0:T.trim();if(!k||c.value)return;const R=[...(A=e.modelValue)!=null?A:[],k];t(Nt,R),t(Qt,R),t("add-tag",k),o.value=void 0},p=T=>{var A;const k=((A=e.modelValue)!=null?A:[]).slice(),[R]=k.splice(T,1);t(Nt,k),t(Qt,k),t("remove-tag",R)},v=()=>{o.value=void 0,t(Nt,void 0),t(Qt,void 0),t("clear")},g=(T,A,k)=>{var R;const B=((R=e.modelValue)!=null?R:[]).slice(),[F]=B.splice(T,1),D=A>T&&k==="before"?-1:A R||ie R?R:P,I&&n(Nt,ie)),ie},C=(D,I=!0)=>{var R;const P=s.currentValue,N=S(D);if(!I){n(Nt,N);return}P===N&&D||(s.userInput=null,n(Nt,N),P!==N&&n(Qt,N,P),r.validateEvent&&((R=l?.validate)==null||R.call(l,"change").catch(W=>void 0)),s.currentValue=N)},x=D=>{s.userInput=D;const I=D===""?null:Number(D);n(Ri,I),C(I,!1)},A=D=>{const I=D!==""?Number(D):"";(et(I)&&!Number.isNaN(I)||D==="")&&C(I),F(),s.userInput=null},T=()=>{var D,I;(I=(D=o.value)==null?void 0:D.focus)==null||I.call(D)},E=()=>{var D,I;(I=(D=o.value)==null?void 0:D.blur)==null||I.call(D)},k=D=>{n("focus",D)},O=D=>{var I,R;s.userInput=null,lD()&&s.currentValue===null&&((I=o.value)!=null&&I.input)&&(o.value.input.value=""),n("blur",D),r.validateEvent&&((R=l?.validate)==null||R.call(l,"blur").catch(P=>void 0))},F=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},B=D=>{document.activeElement===D.target&&D.preventDefault()};return Ce(()=>r.modelValue,(D,I)=>{const R=S(D,!0);s.userInput===null&&R!==I&&(s.currentValue=R)},{immediate:!0}),ut(()=>{var D;const{min:I,max:R,modelValue:P}=r,N=(D=o.value)==null?void 0:D.input;if(N.setAttribute("role","spinbutton"),Number.isFinite(R)?N.setAttribute("aria-valuemax",String(R)):N.removeAttribute("aria-valuemax"),Number.isFinite(I)?N.setAttribute("aria-valuemin",String(I)):N.removeAttribute("aria-valuemin"),N.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),N.setAttribute("aria-disabled",String(p.value)),!et(P)&&P!=null){let W=Number(P);Number.isNaN(W)&&(W=null),n(Nt,W)}N.addEventListener("wheel",B,{passive:!1})}),Fu(()=>{var D,I;const R=(D=o.value)==null?void 0:D.input;R?.setAttribute("aria-valuenow",`${(I=s.currentValue)!=null?I:""}`)}),t({focus:T,blur:E}),(D,I)=>(L(),j("div",{class:Y([w(a).b(),w(a).m(w(h)),w(a).is("disabled",w(p)),w(a).is("without-controls",!D.controls),w(a).is("controls-right",w(d))]),onDragstart:qe(()=>{},["prevent"])},[D.controls?nt((L(),j("span",{key:0,role:"button","aria-label":w(i)("el.inputNumber.decrease"),class:Y([w(a).e("decrease"),w(a).is("disabled",w(u))]),onKeydown:or(_,["enter"])},[we(D.$slots,"decrease-icon",{},()=>[$(w(ct),null,{default:U(()=>[w(d)?(L(),Q(w(dd),{key:0})):(L(),Q(w(wV),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[w(B2),_]]):re("v-if",!0),D.controls?nt((L(),j("span",{key:1,role:"button","aria-label":w(i)("el.inputNumber.increase"),class:Y([w(a).e("increase"),w(a).is("disabled",w(c))]),onKeydown:or(b,["enter"])},[we(D.$slots,"increase-icon",{},()=>[$(w(ct),null,{default:U(()=>[w(d)?(L(),Q(w(nD),{key:0})):(L(),Q(w(MV),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[w(B2),b]]):re("v-if",!0),$(w(Ui),{id:D.id,ref_key:"input",ref:o,type:"number",step:D.step,"model-value":w(v),placeholder:D.placeholder,readonly:D.readonly,disabled:w(p),size:w(h),max:D.max,min:D.min,name:D.name,"aria-label":D.ariaLabel,"validate-event":!1,onKeydown:[or(qe(b,["prevent"]),["up"]),or(qe(_,["prevent"]),["down"])],onBlur:O,onFocus:k,onInput:x,onChange:A},Z_({_:2},[D.$slots.prefix?{name:"prefix",fn:U(()=>[we(D.$slots,"prefix")])}:void 0,D.$slots.suffix?{name:"suffix",fn:U(()=>[we(D.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var jG=ze(KG,[["__file","input-number.vue"]]);const vP=Ft(jG),YG=Xe({modelValue:{type:$e(Array)},max:Number,tagType:{...Rf.type,default:"info"},tagEffect:Rf.effect,trigger:{type:$e(String),default:Ze.enter},draggable:{type:Boolean,default:!1},size:vi,clearable:Boolean,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:String,default:"off"},saveOnBlur:{type:Boolean,default:!0},ariaLabel:String}),qG={[Nt]:e=>Me(e)||It(e),[Qt]:e=>Me(e)||It(e),[Ri]:e=>He(e),"add-tag":e=>He(e),"remove-tag":e=>He(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0};function XG({props:e,emit:t,formItem:n}){const r=as(),i=ui(),a=Rr(),o=z(),s=V(()=>["small"].includes(i.value)?"small":"default"),l=V(()=>{var T;return(T=e.modelValue)!=null&&T.length?void 0:e.placeholder}),u=V(()=>!(e.readonly||r.value)),c=V(()=>{var T,E;return It(e.max)?!1:((E=(T=e.modelValue)==null?void 0:T.length)!=null?E:0)>=e.max}),f=T=>{if(c.value){o.value=void 0;return}S.value||t(Ri,T.target.value)},d=T=>{var E;if(!S.value)switch(T.code){case e.trigger:T.preventDefault(),T.stopPropagation(),h();break;case Ze.numpadEnter:e.trigger===Ze.enter&&(T.preventDefault(),T.stopPropagation(),h());break;case Ze.backspace:!o.value&&((E=e.modelValue)!=null&&E.length)&&(T.preventDefault(),T.stopPropagation(),p(e.modelValue.length-1));break}},h=()=>{var T,E;const k=(T=o.value)==null?void 0:T.trim();if(!k||c.value)return;const O=[...(E=e.modelValue)!=null?E:[],k];t(Nt,O),t(Qt,O),t("add-tag",k),o.value=void 0},p=T=>{var E;const k=((E=e.modelValue)!=null?E:[]).slice(),[O]=k.splice(T,1);t(Nt,k),t(Qt,k),t("remove-tag",O)},v=()=>{o.value=void 0,t(Nt,void 0),t(Qt,void 0),t("clear")},g=(T,E,k)=>{var O;const F=((O=e.modelValue)!=null?O:[]).slice(),[B]=F.splice(T,1),D=E>T&&k==="before"?-1:E=t||x<0||f&&A>=a}function m(){var C=Im();if(g(C))return y(C);s=setTimeout(m,v(C))}function y(C){return s=void 0,d&&r?h(C):(r=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function _(){return s===void 0?o:y(Im())}function S(){var C=Im(),x=g(C);if(r=arguments,i=this,l=C,x){if(s===void 0)return p(l);if(f)return clearTimeout(s),s=setTimeout(m,t),h(l)}return s===void 0&&(s=setTimeout(m,t)),o}return S.cancel=b,S.flush=_,S}function z0(e,t,n){(n!==void 0&&!sd(e[t],n)||n===void 0&&!(t in e))&&o1(e,t,n)}function q6(e){return jo(e)&&Vu(e)}function V0(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function X6(e){return K8(e,CI(e))}function Z6(e,t,n,r,i,a,o){var s=V0(e,n),l=V0(t,n),u=o.get(l);if(u){z0(e,n,u);return}var c=a?a(s,l,n+"",e,t,o):void 0,f=c===void 0;if(f){var d=Ar(l),h=!d&&zp(l),p=!d&&!h&&u1(l);c=l,d||h||p?Ar(s)?c=s:q6(s)?c=O8(s):h?(f=!1,c=$F(l)):p?(f=!1,c=ZF(l)):c=[]:kF(l)||Ef(l)?(c=s,Ef(s)?c=X6(s):(!Mr(s)||a1(s))&&(c=JF(l))):f=!1}f&&(o.set(l,c),i(c,l,r,a,o),o.delete(l)),z0(e,n,c)}function RI(e,t,n,r,i){e!==t&&OI(t,function(a,o){if(i||(i=new ua),Mr(a))Z6(e,t,o,n,RI,r,i);else{var s=r?r(V0(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),z0(e,o,s)}},CI)}function J6(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=r-1;return V8(e,LI(t),i)}function Q6(e,t){var n=-1,r=Vu(e)?Array(e.length):[];return G6(e,function(i,a,o){r[++n]=t(i,a,o)}),r}function ez(e,t){var n=Ar(e)?hI:Q6;return n(e,LI(t))}function tz(e,t){return TI(ez(e,t))}function kf(e){for(var t=-1,n=e==null?0:e.length,r={};++t0?(this.cropW=r-this.cropChangeX-u<=r-a?this.cropOldW-u:this.cropOldW+this.cropChangeX-a,this.cropOffsertX=r-this.cropChangeX-u<=r-a?this.cropChangeX+u:a):(this.cropW=Math.abs(u)+this.cropChangeX<=r?Math.abs(u)-this.cropOldW:r-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+u0?(this.cropW=this.cropOldW+u+this.cropOffsertX<=r?this.cropOldW+u:r-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-a?Math.abs(u+this.cropOldW):this.cropChangeX-a,this.cropOffsertX=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-a?this.cropChangeX-Math.abs(u+this.cropOldW):a))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-cr?(this.cropW=r-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=d}})},checkCropLimitSize(){let{cropW:e,cropH:t,limitMinSize:n}=this,r=new Array;return Array.isArray(n)?r=n:r=[n,n],e=parseFloat(r[0]),t=parseFloat(r[1]),[e,t]},changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(e,t,n,r,i,a){const o=e/t;let s=i,l=a;return s0?(this.cropW=r-this.cropChangeX-u<=r-a?this.cropOldW-u:this.cropOldW+this.cropChangeX-a,this.cropOffsertX=r-this.cropChangeX-u<=r-a?this.cropChangeX+u:a):(this.cropW=Math.abs(u)+this.cropChangeX<=r?Math.abs(u)-this.cropOldW:r-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+u0?(this.cropW=this.cropOldW+u+this.cropOffsertX<=r?this.cropOldW+u:r-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-a?Math.abs(u+this.cropOldW):this.cropChangeX-a,this.cropOffsertX=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-a?this.cropChangeX-Math.abs(u+this.cropOldW):a))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-cr?(this.cropW=r-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=d}})},checkCropLimitSize(){let{cropW:e,cropH:t,limitMinSize:n}=this,r=new Array;return Array.isArray(n)?r=n:r=[n,n],e=parseFloat(r[0]),t=parseFloat(r[1]),[e,t]},changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(e,t,n,r,i,a){const o=e/t;let s=i,l=a;return s