← Back
Editing: index-legacy292.js
!function(){function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function i(r,o,a,u){var i=o&&o.prototype instanceof l?o:l,f=Object.create(i.prototype);return e(f,"_invoke",function(r,e,o){var a,u,i,l=0,f=o||[],s=!1,p={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,e){return a=r,u=0,i=t,p.n=e,c}};function v(r,e){for(u=r,i=e,n=0;!s&&l&&!o&&n<f.length;n++){var o,a=f[n],v=p.p,d=a[2];r>3?(o=d===e)&&(i=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=v&&((o=r<2&&v<a[1])?(u=0,p.v=e,p.n=a[1]):v<d&&(o=r<3||a[0]>e||e>d)&&(a[4]=r,a[5]=e,p.n=d,u=0))}if(o||r>1)return c;throw s=!0,e}return function(o,f,d){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&v(f,d),u=f,i=d;(n=u<2?t:i)||!s;){a||(u?u<3?(u>1&&(p.n=-1),v(u,i)):p.n=i:p.v=i);try{if(l=2,a){if(u||(o="next"),n=a[o]){if(!(n=n.call(a,i)))throw TypeError("iterator result is not an object");if(!n.done)return n;i=n.value,u<2&&(u=0)}else 1===u&&(n=a.return)&&n.call(a),u<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((n=(s=p.n<0)?i:r.call(e,p))!==c)break}catch(n){a=t,u=1,i=n}finally{l=1}}return{value:n,done:s}}}(r,a,u),!0),f}var c={};function l(){}function f(){}function s(){}n=Object.getPrototypeOf;var p=[][a]?n(n([][a]())):(e(n={},a,function(){return this}),n),v=s.prototype=l.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,u,"GeneratorFunction")),t.prototype=Object.create(v),t}return f.prototype=s,e(v,"constructor",s),e(s,"constructor",f),f.displayName="GeneratorFunction",e(s,u,"GeneratorFunction"),e(v),e(v,u,"Generator"),e(v,a,function(){return this}),e(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:i,m:d}})()}function e(t,r,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}e=function(t,r,n,o){function u(r,n){e(t,r,function(t){return this._invoke(r,n,t)})}r?a?a(t,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[r]=n:(u("next",0),u("throw",1),u("return",2))},e(t,r,n,o)}function n(r,e,n){return(e=function(r){var e=function(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"==t(e)?e:e+""}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function o(t,r,e,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void e(t)}i.done?r(c):Promise.resolve(c).then(n,o)}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./useStore-legacy7.js?v=1765440387","./form-item-legacy.js?v=1765440387","./validator-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387"],function(t,e){"use strict";var a,u,i,c,l,f,s,p,v,d,y,m,h,w,b,g,_,j;return{setters:[function(t){a=t.hT,u=t.hU,i=t.bT,c=t.G},function(t){l=t.r,f=t.c,s=t.g,p=t.q,v=t.v,d=t.e,y=t.x},function(t){m=t.a,h=t.u,w=t.q},function(t){b=t.b,g=t.m,_=t.k},function(t){j=t.f},null,null,null],execute:function(){var e=m(),P=e.isEdit,T=(e.addFtpRef,e.ftpForm,e.defaultPath),S=h().rowData;l({name:[{validator:function(t,r,e){0===r.length?e(new Error("FTP用户名不能为空!")):/^[a-zA-Z0-9_]+$/g.test(r)?r.length<=3?e(new Error("FTP用户名长度错误,需要大于3个字符!")):e():e(new Error("FTP用户名只能包含字母、数字和下划线!"))},required:!0,trigger:["blur","change"]}],password:[a({complex:{length:6}}),{required:!0}],path:[u(),{required:!0}]});var E=function(){try{var t,r,e,n=T.value||"/www/wwwroot";return P.value&&(n=null===(t=S.value)||void 0===t?void 0:t.path),{ftp_username:(null===(r=S.value)||void 0===r?void 0:r.name)||"",path:n,ftp_password:(null===(e=S.value)||void 0===e?void 0:e.password)||i(12)}}catch(o){return{}}},F={class:"p-[2rem]"};t("default",f({__name:"index",setup:function(t,e){var l,f,P=e.expose,T=m(),S=T.isEdit,x=T.defaultPath,O=h().rowData,G=c({data:E,options:function(t){return s(function(){return[b("用户名","ftp_username",{attrs:{class:"!w-[320px]",clearable:!0,placeholder:"请输入用户名",disabled:S.value,onInput:function(r){t.value.path="".concat(x.value).concat(t.value.ftp_username.length>0?"/"+t.value.ftp_username:"")}},rules:[{validator:function(t,r,e){0===r.length?e(new Error("FTP用户名不能为空!")):/^[a-zA-Z0-9_]+$/g.test(r)?r.length<=3?e(new Error("FTP用户名长度错误,需要大于3个字符!")):e():e(new Error("FTP用户名只能包含字母、数字和下划线!"))},trigger:["blur","change"]}]}),g("密码","ftp_password",{attrs:{class:"!w-[32rem]",placeholder:"请输入密码"},rules:[a({complex:{length:6}})]},function(){return t.value.ftp_password=i(12)}),_("根目录","path",{attrs:{class:"!w-[32rem]",placeholder:"请输入根目录"},rules:[u()]},function(){j({type:"dir",path:"/www/wwwroot",change:function(r){t.value.path=r}})})]})},submit:(l=r().m(function t(e,o,a){var u,i,c,l,f;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,o();case 1:return u=e.value,i=u.ftp_username,c=u.path,l=u.ftp_password,f=n(n({ftp_username:i,path:c},S.value?"new_password":"ftp_password",l),"ps",i),S.value&&(f.id=O.value.id),t.n=2,w(f,S.value);case 2:return t.a(2,t.v)}},t)}),f=function(){var t=this,r=arguments;return new Promise(function(e,n){var a=l.apply(t,r);function u(t){o(a,e,n,u,i,"next",t)}function i(t){o(a,e,n,u,i,"throw",t)}u(void 0)})},function(t,r,e){return f.apply(this,arguments)})}),q=G.BtForm;return P({onConfirm:G.submit}),function(t,r){return p(),v("div",F,[d(y(q))])}}}))}}})}();
Save File
Cancel