← Back
Editing: index-legacy186.js
!function(){function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function n(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function l(n,o,a,i){var l=o&&o.prototype instanceof u?o:u,s=Object.create(l.prototype);return r(s,"_invoke",function(n,r,o){var a,i,l,u=0,s=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,i=0,l=e,d.n=n,c}};function p(n,r){for(i=n,l=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,a=s[t],p=d.p,m=a[2];n>3?(o=m===r)&&(l=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(i=0,d.v=r,d.n=a[1]):p<m&&(o=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,d.n=m,i=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,m){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,m),i=s,l=m;(t=i<2?e:l)||!f;){a||(i?i<3?(i>1&&(d.n=-1),p(i,l)):d.n=l:d.v=l);try{if(u=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(f=d.n<0)?l:n.call(r,d))!==c)break}catch(t){a=e,i=1,l=t}finally{u=1}}return{value:t,done:f}}}(n,a,i),!0),s}var c={};function u(){}function s(){}function f(){}t=Object.getPrototypeOf;var d=[][a]?t(t([][a]())):(r(t={},a,function(){return this}),t),p=f.prototype=u.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,i,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=f,r(p,"constructor",f),r(f,"constructor",s),s.displayName="GeneratorFunction",r(f,i,"GeneratorFunction"),r(p),r(p,i,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:l,m:m}})()}function r(e,t,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}r=function(e,t,n,o){function i(t,n){r(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},r(e,t,n,o)}function o(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function l(e){o(i,r,a,l,c,"next",e)}function c(e){o(i,r,a,l,c,"throw",e)}l(void 0)})}}System.register(["./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./add-compose-template-legacy.js?v=1765440387","./index-legacy91.js?v=1765440387","./validator-legacy.js?v=1765440387","./useMethods-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./form-item-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./index-legacy130.js?v=1765440387","./ace-legacy.js?v=1765440387","./column-legacy.js?v=1765440387"],function(t,r){"use strict";var o,i,l,c,u,s,f,d,p,m,y,v,h,g,b,_,j,k,x,w,S,C,O,T,A,V,P,G,I,L,D,E;return{setters:[function(e){o=e.ay,i=e.M,l=e.K,c=e.gk,u=e.gl,s=e.k,f=e.e,d=e.al},function(e){p=e.c,m=e.k,y=e.r,v=e.G,h=e.q,g=e.v,b=e.e,_=e.A,j=e.y,k=e.x,x=e.B,w=e.H,S=e.z,C=e.Q,O=e.as,T=e.T,A=e.D,V=e.a8,P=e.P,G=e.aB},function(e){I=e.default},function(e){L=e._},function(e){D=e.f},function(e){E=e.l},null,null,null,null,null,null],execute:function(){var r={class:"container-dialog !p-0"},F={class:"flex items-center relative"},U={class:"table w-full mt-[1rem]"},q={class:"pl-[2rem]"},M={class:"help-info-text c7 list-disc text-[#ff0000] mt-[1.5rem]"},N=p({__name:"search-local-template",emits:["close","complate"],setup:function(t,f){var d=f.expose,p=f.emit,P=o().refs.isRefreshTemplateList,G=m({path:"",checked:!1}),I=m({loading:!1,list:[],selection:[]}),N=E(),z=y(),B=m({selectList:[]}),H=function(){D({type:"dir",change:function(e){G.path=e}})},J=function(){var e=a(n().m(function e(){return n().w(function(e){for(;;)switch(e.n){case 0:if(""!==G.path){e.n=1;break}return i.error("请选择路径"),e.a(2,!1);case 1:l({request:c({data:JSON.stringify({path:G.path,sub_dir:G.checked?"1":"0"})}),data:[Array,O(I,"list")],loading:O(I,"loading")});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),R=function(e){B.selectList=e};return d({confirm:function(){0!==B.selectList.length?l({request:u({data:JSON.stringify({template_list:B.selectList})}),message:!0,success:function(e){e.status&&(p("complate",e),P.value=!0,p("close"))}}):i.error("请选择模板")}}),function(t,n){var o=L,a=T,i=A,l=s,c=V,u=v("bt-loading");return h(),g("div",r,[b(c,{ref_key:"cmdFormRef",ref:z,size:"default",model:k(G),class:"relative w-full","label-position":"right",onSubmit:n[3]||(n[3]=C(function(){},["prevent"]))},{default:_(function(){return[j("div",F,[b(o,{modelValue:k(G).path,"onUpdate:modelValue":n[0]||(n[0]=function(e){return k(G).path=e}),width:"51rem",icon:"icon-file_mode",onIconClick:H,onChangePassive:n[1]||(n[1]=function(e){G.path=G.path.replace(/\s+/g,"")}),placeholder:"请输入镜像路径"},null,8,["modelValue"]),b(a,{class:"!absolute top-[0rem] left-[36rem]",modelValue:k(G).checked,"onUpdate:modelValue":n[2]||(n[2]=function(e){return k(G).checked=e})},{default:_(function(){return e(n[4]||(n[4]=[x("包含子目录",-1)]))}),_:1},8,["modelValue"]),b(i,{class:"ml-8px",type:"primary",onClick:J},{default:_(function(){return e(n[5]||(n[5]=[x("搜索",-1)]))}),_:1})]),j("div",U,[w(b(l,{ref:"ftpTable",column:k(N),height:"33rem",data:k(I).list,description:"模板列表为空",onSelectionChange:R},null,8,["column","data"]),[[u,k(I).loading],[u,"正在加载模板列表,请稍后...","title"]])]),j("div",q,[j("ul",M,[j("li",null,"选中需要添加的Compose 【已选中:"+S(k(B).selectList.length)+"个】",1)])])]}),_:1},8,["model"])])}}}),z=f(N,[["__scopeId","data-v-4f929258"]]),B={class:"flex flex-col p-[1.6rem] lib-box"},H=p({__name:"index",props:{compData:{default:function(){return{}}}},emits:["close"],setup:function(e,t){var r=t.expose,o=t.emit,i=e,l=y("first"),c=y(),u=y(),s=function(e){var t;null!==(t=i.compData)&&void 0!==t&&t.callback&&i.compData.callback(e)},f=function(){var e=a(n().m(function e(){return n().w(function(e){for(;;)switch(e.n){case 0:try{"first"==l.value?c.value.onConfirm():u.value.confirm()}catch(t){}case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),p=function(){o("close")};return r({onConfirm:f}),function(e,t){var n=G,r=d;return h(),g("div",B,[b(r,{type:"card",modelValue:k(l),"onUpdate:modelValue":t[0]||(t[0]=function(e){return P(l)?l.value=e:null})},{default:_(function(){return[b(n,{label:"添加Compose模板",name:"first"},{default:_(function(){return[b(I,{ref_key:"first",ref:c,onClose:p,onComplate:s},null,512)]}),_:1}),b(n,{label:"搜索本地模板",name:"second"},{default:_(function(){return[b(z,{ref_key:"second",ref:u,onClose:p,onComplate:s},null,512)]}),_:1})]}),_:1},8,["modelValue"])])}}});t("default",f(H,[["__scopeId","data-v-36c9a99e"]]))}}})}();
Save File
Cancel