Files
Nexus/web/app/assets/VTextarea-DP8HH1tw.js
T
Nexus Agent fe8b24ca0b fix(notify): 资源恢复 Telegram 联动 CPU/内存/磁盘开关
关闭分项告警后不再推送对应恢复消息;仪表盘移除服务器列表并更新设置页说明。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 13:22:38 +08:00

1 line
5.1 KiB
JavaScript

import{An as e,Cr as t,Dr as n,En as r,Fn as i,Jr as a,Rr as o,T as s,Vr as c,Yn as l,cr as u,dr as d,fr as f,gn as p,in as m,ir as h,kn as g,kr as _,qr as v,r as y,sn as b,ti as x,un as ee,vr as S,wr as C,xn as w,zr as te}from"./index-P23lP3ez.js";import{a as T,c as E,i as D,l as O,m as k,o as A,r as j,s as M,u as N}from"./VTextField-Dxz7ci9T.js";var P=w({autoGrow:Boolean,autofocus:Boolean,counter:[Boolean,Number,String],counterValue:Function,prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,noResize:Boolean,rows:{type:[Number,String],default:5,validator:e=>!isNaN(parseFloat(e))},maxHeight:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},maxRows:{type:[Number,String],validator:e=>!isNaN(parseFloat(e))},suffix:String,modelModifiers:Object,...D(),...l(N(),[`direction`]),...M()},`VTextarea`),F=p()({name:`VTextarea`,directives:{vIntersect:s},inheritAttrs:!1,props:P(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0,"update:rows":e=>!0},setup(l,{attrs:p,emit:w,slots:D}){let M=b(l,`modelValue`),{isFocused:N,focus:P,blur:F}=k(l),{onIntersect:I}=j(l),L=d(()=>typeof l.counterValue==`function`?l.counterValue(M.value):(M.value||``).toString().length),R=d(()=>{if(p.maxlength)return p.maxlength;if(!(!l.counter||typeof l.counter!=`number`&&typeof l.counter!=`string`))return l.counter}),z=v(),B=v(),V=a(``),H=v(),U=v(0),{platform:W}=m(),G=T(l),K=d(()=>l.persistentPlaceholder||N.value||l.active);function q(){G.isSuppressing.value&&G.update(),H.value!==document.activeElement&&H.value?.focus(),N.value||P()}function J(e){q(),w(`click:control`,e)}function ne(e){w(`mousedown:control`,e)}function re(e){e.stopPropagation(),q(),C(()=>{M.value=``,r(l[`onClick:clear`],e)})}function ie(e){let t=e.target;if(!l.modelModifiers?.trim){M.value=t.value;return}let n=t.value,r=t.selectionStart,i=t.selectionEnd;M.value=n,C(()=>{let e=0;n.trimStart().length===t.value.length&&(e=n.length-t.value.length),r!=null&&(t.selectionStart=r-e),i!=null&&(t.selectionEnd=i-e)})}let Y=v(),X=v(Number(l.rows)),Z=d(()=>[`plain`,`underlined`].includes(l.variant));te(()=>{l.autoGrow||(X.value=Number(l.rows))});function Q(){C(()=>{if(!H.value)return;if(W.value.firefox){U.value=12;return}let{offsetWidth:e,clientWidth:t}=H.value;U.value=Math.max(0,e-t)}),l.autoGrow&&C(()=>{if(!Y.value||!B.value)return;let t=getComputedStyle(Y.value),n=getComputedStyle(B.value.$el),r=parseFloat(t.getPropertyValue(`--v-field-padding-top`))+parseFloat(t.getPropertyValue(`--v-input-padding-top`))+parseFloat(t.getPropertyValue(`--v-field-padding-bottom`)),i=Y.value.scrollHeight,a=parseFloat(t.lineHeight),o=Math.max(parseFloat(l.rows)*a+r,parseFloat(n.getPropertyValue(`--v-input-control-height`))),s=l.maxHeight?parseFloat(l.maxHeight):parseFloat(l.maxRows)*a+r||1/0,c=g(i??0,o,s);X.value=Math.floor((c-r)/a),V.value=e(c)})}_(Q),o(M,Q),o(()=>l.rows,Q),o(()=>l.maxHeight,Q),o(()=>l.maxRows,Q),o(()=>l.density,Q),o(X,e=>{w(`update:rows`,e)});let $;return o(Y,e=>{e?($=new ResizeObserver(Q),$.observe(Y.value)):$?.disconnect()}),n(()=>{$?.disconnect()}),ee(()=>{let n=!!(D.counter||l.counter||l.counterValue),r=!!(n||D.details),[a,o]=i(p),{modelValue:d,...m}=O.filterProps(l),g={...A.filterProps(l),"onClick:clear":re};return S(O,t({ref:z,modelValue:M.value,"onUpdate:modelValue":e=>M.value=e,class:[`v-textarea v-text-field`,{"v-textarea--prefixed":l.prefix,"v-textarea--suffixed":l.suffix,"v-text-field--prefixed":l.prefix,"v-text-field--suffixed":l.suffix,"v-textarea--auto-grow":l.autoGrow,"v-textarea--no-resize":l.noResize||l.autoGrow,"v-input--plain-underlined":Z.value},l.class],style:[{"--v-textarea-max-height":l.maxHeight?e(l.maxHeight):void 0,"--v-textarea-scroll-bar-width":e(U.value)},l.style]},a,m,{centerAffix:X.value===1&&!Z.value,focused:N.value,indentDetails:l.indentDetails??!Z.value}),{...D,default:({id:e,isDisabled:n,isDirty:r,isReadonly:i,isValid:a,hasDetails:d})=>S(A,t({ref:B,style:{"--v-textarea-control-height":V.value},onClick:J,onMousedown:ne,"onClick:prependInner":l[`onClick:prependInner`],"onClick:appendInner":l[`onClick:appendInner`]},g,{id:e.value,active:K.value||r.value,labelId:`${e.value}-label`,centerAffix:X.value===1&&!Z.value,dirty:r.value||l.dirty,disabled:n.value,focused:N.value,details:d.value,error:a.value===!1}),{...D,default:({props:{class:r,...a},controlRef:d})=>f(u,null,[l.prefix&&f(`span`,{class:`v-text-field__prefix`},[l.prefix]),c(f(`textarea`,t({ref:e=>H.value=d.value=e,class:r,value:M.value,onInput:ie,autofocus:l.autofocus,readonly:i.value,disabled:n.value,placeholder:l.placeholder,rows:l.rows,name:G.fieldName.value,autocomplete:G.fieldAutocomplete.value,onFocus:q,onBlur:F,"aria-labelledby":`${e.value}-label`},a,o),null),[[s,{handler:I},null,{once:!0}]]),l.autoGrow&&c(f(`textarea`,{class:x([r,`v-textarea__sizer`]),id:`${a.id}-sizer`,"onUpdate:modelValue":e=>M.value=e,ref:Y,readonly:!0,"aria-hidden":`true`},null),[[h,M.value]]),l.suffix&&f(`span`,{class:`v-text-field__suffix`},[l.suffix])])}),details:r?e=>f(u,null,[D.details?.(e),n&&f(u,null,[f(`span`,null,null),S(E,{active:l.persistentCounter||N.value,value:L.value,max:R.value,disabled:l.disabled},D.counter)])]):void 0})}),y({},z,B,H)}});export{F as t};