UNPKG

goldpankit

Version:

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

2 lines (1 loc) 3.44 kB
import{_ as k,E as g,M as b,m as w,r,z as S,A as N,o as i,c as n,a as s,t,I as u,b as a,F as T,h as m,j as p,w as C,e as E}from"./index-f90ee4ed.js";import{S as V}from"./ServiceList-3139a21d.js";import{f as I}from"./service.space-34973348.js";import"./BeanAmount-2cb079fe.js";import"./ServiceTitle-0d931c73.js";const B={components:{ServiceList:V,Empty:g,MarkdownEditor:b},data(){return{loading:!0,route:{space:null},currentTab:"readme",space:null}},computed:{...w(["userInfo"])},methods:{fetchSpace(){I(this.route.space).then(o=>{this.space=o,this.space.description==null&&(this.space.description="")}).catch(o=>{this.$tip.apiFailed(o)}).finally(()=>{this.loading=!1})}},created(){this.route.space=this.$route.params.name,this.fetchSpace()}},D={class:"page"},P={key:0,class:"wrap"},M={class:"tech-stack-wrap"},z={class:"tech-stack"},A={class:"content-wrap"},F={class:"dimension-wrap"},L={class:"dimensions"},U={class:"detail"},j={key:0,class:"readme"},q={class:"info"},O={class:"user-profile"},G={class:"user-info"},H={class:"introduce"},J={key:0,class:"opera-wrap"},K=["href"],Q={key:1},R={key:0},W={key:1};function X(o,c,Y,Z,e,x){const d=r("MarkdownEditor"),v=r("ServiceList"),h=r("Empty"),_=r("Avatar"),f=r("el-button"),y=S("loading");return N((i(),n("div",D,[e.space!=null?(i(),n("div",P,[s("h2",null,t(e.space.name),1),s("div",M,[s("em",null,t(e.space.withPrivate?o.$t("common.private"):o.$t("common.public")),1),s("p",z,t(e.space.services.length)+" "+t(o.$t("service.services")),1)]),s("div",A,[s("div",F,[s("ul",L,[s("li",{class:u({selected:e.currentTab==="readme"}),onClick:c[0]||(c[0]=l=>e.currentTab="readme")},t(o.$t("common.readme")),3),s("li",{class:u({selected:e.currentTab==="services"}),onClick:c[1]||(c[1]=l=>e.currentTab="services")},t(o.$t("service.services2")),3)]),s("div",U,[e.currentTab==="readme"?(i(),n("div",j,[a(d,{readonly:"","without-padding":!0,modelValue:e.space.description,"onUpdate:modelValue":c[2]||(c[2]=l=>e.space.description=l)},null,8,["modelValue"])])):e.currentTab==="services"?(i(),n(T,{key:1},[e.space.services.length>0?(i(),m(v,{key:0,space:e.space.name,services:e.space.services},null,8,["space","services"])):(i(),m(h,{key:1,description:o.$t("service.noServices")},null,8,["description"]))],64)):p("",!0)])]),s("div",q,[s("div",O,[s("div",G,[a(_,{"file-key":e.space.user.avatar,size:"30px",margin:"0 10px 0 0"},null,8,["file-key"]),s("h4",null,t(o.getUserDisplayName(e.space.user)),1)]),s("p",H,t(e.space.user.introduce===""||e.space.user.introduce==null?"No introduce":e.space.user.introduce),1)]),o.userInfo!=null&&o.userInfo.id===e.space.userId?(i(),n("div",J,[a(f,{type:"primary",onClick:c[3]||(c[3]=l=>o.$router.push({name:"CreateService",query:{space:e.space.name}}))},{default:C(()=>[E(t(o.$t("service.createNewService")),1)]),_:1})])):p("",!0),s("ul",null,[s("li",null,[s("label",null,t(o.$t("space.homePage")),1),e.space.homepage!=null&&e.space.homepage!==""?(i(),n("a",{key:0,href:e.space.homepage,target:"_blank"},t(e.space.homepage),9,K)):(i(),n("p",Q,t(o.$t("common.none")),1))]),s("li",null,[s("label",null,t(o.$t("service.services2")),1),s("p",null,t(e.space.services.length),1)]),s("li",null,[s("label",null,t(o.$t("service.lastPublish")),1),e.space.lastPublish!=null?(i(),n("p",R,t(o.getDateOffsetText(e.space.lastPublish)),1)):(i(),n("p",W,"None"))])])])])])):p("",!0)])),[[y,e.loading]])}const ie=k(B,[["render",X],["__scopeId","data-v-65994c71"]]);export{ie as default};