UNPKG

goldpankit

Version:

GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。

2 lines (1 loc) 2.15 kB
import{S as a}from"./ServiceInstaller-2f094645.js";import{a as l}from"./service-c7bba10e.js";import{a as p}from"./service.space-421dd6e3.js";import{_ as h,m as u,D as v,r as m,z as f,o as s,c as i,A as _,h as d,j}from"./index-7fe5b1f2.js";import"./PluginSelector-30b28ddf.js";import"./QueryModelView-d2bc63c6.js";import"./InnerRouterViewWindow-5b1fdb8b.js";import"./service.version-aec1dab2.js";import"./wechat-ae447c56.js";const g={components:{ServiceInstaller:a},data(){return{loading:!0,route:{space:null,service:null,majorVersion:null},space:null,service:null,project:null}},computed:{...u(["currentProject"])},methods:{fetchSpace(){p(this.$route.params.spaceName).then(e=>{this.space=e}).catch(e=>{this.$tip.apiFailed(e)})},fetchService(){this.loading=!0,l({space:this.route.space,service:this.route.service,majorVersion:this.route.majorVersion}).then(e=>{this.service=e}).catch(e=>{this.$tip.apiFailed(e)}).finally(()=>{this.loading=!1})},handleProjectChange(e){if(e==null||e===""){this.project=null;return}v(e).then(t=>{this.project=t}).catch(t=>{this.$tip.apiFailed(t)})}},created(){this.route.space=this.$route.params.spaceName,this.route.service=this.$route.params.serviceName,this.route.majorVersion=this.$route.query.major,this.fetchSpace(),this.fetchService(),this.currentProject!=null&&this.handleProjectChange(this.currentProject)}},S={class:"page"},P={class:"wrap"};function y(e,t,C,V,r,c){const o=m("ServiceInstaller"),n=f("loading");return s(),i("div",S,[_((s(),i("div",P,[r.space!=null&&r.service!=null?(s(),d(o,{key:0,space:r.space.name,service:r.service.name,"service-price":r.service.price.price,"service-lease":r.service.latestLease,version:r.service.defaultMajorVersion.version,versions:r.service.defaultMajorVersion.versions,"project-config":r.project,"with-title":!0,"with-install-button":!0,onChangeProject:c.handleProjectChange,onInstalled:t[0]||(t[0]=k=>e.$router.push({name:"Workbench"}))},null,8,["space","service","service-price","service-lease","version","versions","project-config","onChangeProject"])):j("",!0)])),[[n,r.loading]])])}const $=h(g,[["render",y],["__scopeId","data-v-5e217bc7"]]);export{$ as default};