| 1234 |
- /*!
- Build based on gin-vue-admin
- Time : 1757946830000 */
- !function(){function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function i(t,o,a,u){var i=o&&o.prototype instanceof l?o:l,f=Object.create(i.prototype);return e(f,"_invoke",function(t,e,o){var a,u,i,l=0,f=o||[],s=!1,p={p:0,n:0,v:n,a:d,f:d.bind(n,4),d:function(t,e){return a=t,u=0,i=n,p.n=e,c}};function d(t,e){for(u=t,i=e,r=0;!s&&l&&!o&&r<f.length;r++){var o,a=f[r],d=p.p,v=a[2];t>3?(o=v===e)&&(i=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=n):a[0]<=d&&((o=t<2&&d<a[1])?(u=0,p.v=e,p.n=a[1]):d<v&&(o=t<3||a[0]>e||e>v)&&(a[4]=t,a[5]=e,p.n=v,u=0))}if(o||t>1)return c;throw s=!0,e}return function(o,f,v){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,v),u=f,i=v;(r=u<2?n:i)||!s;){a||(u?u<3?(u>1&&(p.n=-1),d(u,i)):p.n=i:p.v=i);try{if(l=2,a){if(u||(o="next"),r=a[o]){if(!(r=r.call(a,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,u<2&&(u=0)}else 1===u&&(r=a.return)&&r.call(a),u<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=n}else if((r=(s=p.n<0)?i:t.call(e,p))!==c)break}catch(r){a=n,u=1,i=r}finally{l=1}}return{value:r,done:s}}}(t,a,u),!0),f}var c={};function l(){}function f(){}function s(){}r=Object.getPrototypeOf;var p=[][a]?r(r([][a]())):(e(r={},a,function(){return this}),r),d=s.prototype=l.prototype=Object.create(p);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,u,"GeneratorFunction")),t.prototype=Object.create(d),t}return f.prototype=s,e(d,"constructor",s),e(s,"constructor",f),f.displayName="GeneratorFunction",e(s,u,"GeneratorFunction"),e(d),e(d,u,"Generator"),e(d,a,function(){return this}),e(d,"toString",function(){return"[object Generator]"}),(t=function(){return{w:i,m:v}})()}function e(t,n,r,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}e=function(t,n,r,o){function u(n,r){e(t,n,function(t){return this._invoke(n,r,t)})}n?a?a(t,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[n]=r:(u("next",0),u("throw",1),u("return",2))},e(t,n,r,o)}function n(t,e,n,r,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise(function(o,a){var u=t.apply(e,r);function i(t){n(u,o,a,i,c,"next",t)}function c(t){n(u,o,a,i,c,"throw",t)}i(void 0)})}}function o(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}System.register(["./warningBar-legacy.CM-jno-M.js","./autoCode-legacy.BHjLoi1V.js","./api-legacy.DmeA7GOn.js","./index-legacy.C7yqTvSr.js"],function(e,n){"use strict";var a,u,i,c,l,f,s,p,d,v,m,y,h,g,b,x,w;return{setters:[function(t){a=t._},function(t){u=t.v,i=t.w,c=t.x},function(t){l=t.j},function(t){f=t.a,s=t.g,p=t.c,d=t.o,v=t.b,m=t.f,y=t.w,h=t.h,g=t.C,b=t.bj,x=t.E,w=t.k}],execute:function(){var n=document.createElement("style");n.textContent=".plugin-transfer .el-transfer-panel{width:400px!important}\n/*$vite$:1*/",document.head.appendChild(n);var j={class:"gva-form-box"},A={class:"p-4 bg-white dark:bg-slate-900"},_={class:"flex items-center gap-3"},O={class:"flex justify-end mt-2"},P={class:"flex justify-end mt-2"},T={class:"flex justify-end"};e("default",{__name:"pubPlug",setup:function(e){var n=f(""),I=f([]),V=f([]),S=f([]),k=f([]),C=f(""),B=function(t){var e=[];return t.forEach(function(t){t.children?e.push.apply(e,o(B(t.children))):e.push(t)}),e},E=function(){var e=r(t().m(function e(){var n,r;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,b();case 1:return 0===(n=t.v).code&&(V.value=B(n.data)),t.n=2,l();case 2:0===(r=t.v).code&&(k.value=r.data.apis);case 3:return t.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),G=function(t,e){return e.meta.title.indexOf(t)>-1||e.component.indexOf(t)>-1},U=function(t,e){return e.description.indexOf(t)>-1||e.path.indexOf(t)>-1};E();var z=function(){var e=r(t().m(function e(){return t().w(function(e){for(;;)switch(e.n){case 0:w.confirm("请检查server下的/plugin/".concat(n.value,"/plugin.go是否已放开需要的 initialize.Api(ctx) 和 initialize.Menu(ctx)?"),"打包",{confirmButtonText:"打包",cancelButtonText:"取消",type:"warning"}).then(r(t().m(function e(){var r;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c({plugName:n.value});case 1:0===(r=t.v).code&&x.success(r.msg);case 2:return t.a(2)}},e)}))).catch(function(){x({type:"info",message:"关闭打包"})});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),N=function(){C.value?0!==I.value.length?""!==n.value?w.confirm("点击后将会覆盖server下的/plugin/".concat(n.value,"/initialize/menu. 是否继续?"),"生成初始菜单",{confirmButtonText:"生成",cancelButtonText:"取消",type:"warning"}).then(function(){var t={plugName:n.value,parentMenu:C.value,menus:I.value};u(t)}).catch(function(){x({type:"info",message:"关闭生成菜单"})}):x.error("请填写插件名"):x.error("请至少选择一个菜单"):x.error("请填写菜单组名")},F=function(){0!==S.value.length?""!==n.value?w.confirm("点击后将会覆盖server下的/plugin/".concat(n.value,"/initialize/api. 是否继续?"),"生成初始API",{confirmButtonText:"生成",cancelButtonText:"取消",type:"warning"}).then(function(){var t={plugName:n.value,apis:S.value};i(t)}).catch(function(){x({type:"info",message:"关闭生成API"})}):x.error("请填写插件名"):x.error("请至少选择一个API")};return function(t,e){var r=s("el-input"),u=s("el-transfer"),i=s("el-button"),c=s("el-card");return d(),p("div",j,[v("div",A,[m(a,{title:"目前只支持标准插件(通过插件模板生成的标准目录插件),非标准插件请自行打包"}),v("div",_,[m(r,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=function(t){return n.value=t}),placeholder:"插件模板处填写的【插件名】"},null,8,["modelValue"])]),m(c,{class:"mt-2 text-center"},{default:y(function(){return[m(a,{title:"穿梭框请只选择子级菜单即可"}),m(r,{modelValue:C.value,"onUpdate:modelValue":e[1]||(e[1]=function(t){return C.value=t}),placeholder:"请输入菜单组名,例:公告管理",class:"mb-2"},null,8,["modelValue"]),m(u,{modelValue:I.value,"onUpdate:modelValue":e[2]||(e[2]=function(t){return I.value=t}),props:{key:"ID"},class:"plugin-transfer",data:V.value,filterable:"","filter-method":G,"filter-placeholder":"请输入菜单名称/路径",titles:["可选菜单","使用菜单"],"button-texts":["移除","选中"]},{default:y(function(t){var e=t.option;return[h(g(e.meta.title)+" "+g(e.component),1)]}),_:1},8,["modelValue","data"]),v("div",O,[m(i,{type:"primary",onClick:N},{default:y(function(){return o(e[4]||(e[4]=[h(" 定义安装菜单 ",-1)]))}),_:1})])]}),_:1}),m(c,{class:"mt-2 text-center"},{default:y(function(){return[m(u,{modelValue:S.value,"onUpdate:modelValue":e[3]||(e[3]=function(t){return S.value=t}),props:{key:"ID"},class:"plugin-transfer",data:k.value,filterable:"","filter-method":U,"filter-placeholder":"请输入API描述/PATH",titles:["可选API","使用API"],"button-texts":["移除","选中"]},{default:y(function(t){var e=t.option;return[h(g(e.description)+" "+g(e.path),1)]}),_:1},8,["modelValue","data"]),v("div",P,[m(i,{type:"primary",onClick:F},{default:y(function(){return o(e[5]||(e[5]=[h(" 定义安装API ",-1)]))}),_:1})])]}),_:1})]),v("div",T,[m(i,{type:"primary",onClick:z},{default:y(function(){return o(e[6]||(e[6]=[h(" 打包插件 ",-1)]))}),_:1})])])}}})}}})}();
|