← Back
Editing: index-legacy196.js
!function(){function t(e){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(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var d="suspendedStart",y="suspendedYield",m="executing",v="completed",g={};function b(){}function w(){}function x(){}var _={};f(_,l,(function(){return this}));var L=Object.getPrototypeOf,j=L&&L(L(T([])));j&&j!==o&&i.call(j,l)&&(_=j);var k=x.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,r){function n(o,a,c,l){var u=p(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,l)}),(function(t){n("throw",t,c,l)})):r.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,l)}))}l(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function S(t,e,n){var o=d;return function(i,a){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var u=p(t,e,n);if("normal"===u.type){if(o=n.done?v:y,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=v,n.method="throw",n.arg=u.arg)}}}function C(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,C(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,a(k,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},n.awrap=function(t){return{__await:t}},E(O.prototype),f(O.prototype,u,(function(){return this})),n.AsyncIterator=O,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new O(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(k),f(k,s,"Generator"),f(k,l,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,l,"next",t)}function l(t){r(a,o,i,c,l,"throw",t)}c(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./add-compose-template-legacy.js?v=VERSION_NUMBER","./index-legacy101.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./useMethods-legacy.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./form-item-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./index-legacy140.js?v=VERSION_NUMBER","./ace-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER"],(function(t,r){"use strict";var o,i,a,c,l,u,s,f,h,p,d,y,m,v,g,b,w,x,_,L,j,k,E,O,S,C,N,P,G,T,V,F;return{setters:[function(t){o=t.ay,i=t.M,a=t.K,c=t.gN,l=t.gO,u=t.l,s=t.e,f=t.al},function(t){h=t.c,p=t.k,d=t.r,y=t.G,m=t.q,v=t.v,g=t.e,b=t.A,w=t.y,x=t.x,_=t.B,L=t.H,j=t.z,k=t.Q,E=t.ar,O=t.T,S=t.D,C=t.a7,N=t.P,P=t.aA},function(t){G=t.default},function(t){T=t._},function(t){V=t.f},function(t){F=t.l},null,null,null,null,null,null],execute:function(){var r={class:"container-dialog !p-0"},I={class:"flex items-center relative"},A={class:"table w-full mt-[1rem]"},D={class:"pl-[2rem]"},q={class:"help-info-text c7 list-disc text-[#ff0000] mt-[1.5rem]"},U=h({__name:"search-local-template",emits:["close","complate"],setup:function(t,s){var f=s.expose,h=s.emit,N=o().refs.isRefreshTemplateList,P=p({path:"",checked:!1}),G=p({loading:!1,list:[],selection:[]}),U=F(),z=d(),H=p({selectList:[]}),J=function(){V({type:"dir",change:function(t){P.path=t}})},M=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(""!==P.path){t.next=3;break}return i.error("请选择路径"),t.abrupt("return",!1);case 3:a({request:c({data:JSON.stringify({path:P.path,sub_dir:P.checked?"1":"0"})}),data:[Array,E(G,"list")],loading:E(G,"loading")});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(t){H.selectList=t};return f({confirm:function(){0!==H.selectList.length?a({request:l({data:JSON.stringify({template_list:H.selectList})}),message:!0,success:function(t){t.status&&(h("complate",t),N.value=!0,h("close"))}}):i.error("请选择模板")}}),function(t,e){var n=T,o=O,i=S,a=u,c=C,l=y("bt-loading");return m(),v("div",r,[g(c,{ref_key:"cmdFormRef",ref:z,size:"default",model:x(P),class:"relative w-full","label-position":"right",onSubmit:e[3]||(e[3]=k((function(){}),["prevent"]))},{default:b((function(){return[w("div",I,[g(n,{modelValue:x(P).path,"onUpdate:modelValue":e[0]||(e[0]=function(t){return x(P).path=t}),width:"51rem",icon:"icon-file_mode",onIconClick:J,onChangePassive:e[1]||(e[1]=function(t){P.path=P.path.replace(/\s+/g,"")}),placeholder:"请输入镜像路径"},null,8,["modelValue"]),g(o,{class:"!absolute top-[0rem] left-[36rem]",modelValue:x(P).checked,"onUpdate:modelValue":e[2]||(e[2]=function(t){return x(P).checked=t})},{default:b((function(){return e[4]||(e[4]=[_("包含子目录")])})),_:1},8,["modelValue"]),g(i,{class:"ml-8px",type:"primary",onClick:M},{default:b((function(){return e[5]||(e[5]=[_("搜索")])})),_:1})]),w("div",A,[L(g(a,{ref:"ftpTable",column:x(U),height:"33rem",data:x(G).list,description:"模板列表为空",onSelectionChange:R},null,8,["column","data"]),[[l,x(G).loading],[l,"正在加载模板列表,请稍后...","title"]])]),w("div",D,[w("ul",q,[w("li",null,"选中需要添加的Compose 【已选中:"+j(x(H).selectList.length)+"个】",1)])])]})),_:1},8,["model"])])}}}),z=s(U,[["__scopeId","data-v-4f929258"]]),H={class:"flex flex-col p-[1.6rem] lib-box"},J=h({__name:"index",props:{compData:{default:function(){return{}}}},emits:["close"],setup:function(t,r){var o=r.expose,i=r.emit,a=t,c=d("first"),l=d(),u=d(),s=function(t){var e;null!==(e=a.compData)&&void 0!==e&&e.callback&&a.compData.callback(t)},h=function(){var t=n(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{"first"==c.value?l.value.onConfirm():u.value.confirm()}catch(e){}case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),p=function(){i("close")};return o({onConfirm:h}),function(t,e){var r=P,n=f;return m(),v("div",H,[g(n,{type:"card",modelValue:x(c),"onUpdate:modelValue":e[0]||(e[0]=function(t){return N(c)?c.value=t:null})},{default:b((function(){return[g(r,{label:"添加Compose模板",name:"first"},{default:b((function(){return[g(G,{ref_key:"first",ref:l,onClose:p,onComplate:s},null,512)]})),_:1}),g(r,{label:"搜索本地模板",name:"second"},{default:b((function(){return[g(z,{ref_key:"second",ref:u,onClose:p,onComplate:s},null,512)]})),_:1})]})),_:1},8,["modelValue"])])}}});t("default",s(J,[["__scopeId","data-v-36c9a99e"]]))}}}))}();
Save File
Cancel