UNPKG

goldpankit

Version:

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

2 lines (1 loc) 3.42 kB
import{_ as g,E as y,M as k,m as b,r as l,z as w,A as S,o as i,c as n,a as s,t,H as p,b as u,F as N,g as d,i as a,w as T,e as C}from"./index-7c4f5eaa.js";import{S as E}from"./ServiceList-d0eb0ef0.js";import{f as V}from"./service.space-431dd8e9.js";import"./BeanAmount-165fce30.js";import"./ServiceTitle-b828e3a3.js";const B={components:{ServiceList:E,Empty:y,MarkdownEditor:k},data(){return{loading:!0,route:{space:null},currentTab:"readme",space:null}},computed:{...b(["userInfo"])},methods:{fetchSpace(){V(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"},I={key:0,class:"wrap"},P={class:"tech-stack-wrap"},M={class:"tech-stack"},z={class:"content-wrap"},F={class:"dimension-wrap"},L={class:"dimensions"},U={class:"detail"},A={key:0,class:"readme"},q={class:"info"},H={class:"user-profile"},O={class:"user-info"},j=["src"],G={class:"introduce"},J={key:0,class:"opera-wrap"},K=["href"],Q={key:1},R={key:0},W={key:1};function X(o,r,Y,Z,e,$){const m=l("MarkdownEditor"),v=l("ServiceList"),h=l("Empty"),_=l("el-button"),f=w("loading");return S((i(),n("div",D,[e.space!=null?(i(),n("div",I,[s("h2",null,t(e.space.name),1),s("div",P,[s("em",null,t(e.space.withPrivate?o.$t("common.private"):o.$t("common.public")),1),s("p",M,t(e.space.services.length)+" "+t(o.$t("service.services")),1)]),s("div",z,[s("div",F,[s("ul",L,[s("li",{class:p({selected:e.currentTab==="readme"}),onClick:r[0]||(r[0]=c=>e.currentTab="readme")},t(o.$t("common.readme")),3),s("li",{class:p({selected:e.currentTab==="services"}),onClick:r[1]||(r[1]=c=>e.currentTab="services")},t(o.$t("service.services2")),3)]),s("div",U,[e.currentTab==="readme"?(i(),n("div",A,[u(m,{readonly:"","without-padding":!0,modelValue:e.space.description,"onUpdate:modelValue":r[2]||(r[2]=c=>e.space.description=c)},null,8,["modelValue"])])):e.currentTab==="services"?(i(),n(N,{key:1},[e.space.services.length>0?(i(),d(v,{key:0,space:e.space.name,services:e.space.services},null,8,["space","services"])):(i(),d(h,{key:1,description:o.$t("service.noServices")},null,8,["description"]))],64)):a("",!0)])]),s("div",q,[s("div",H,[s("div",O,[s("img",{src:o.getAvatarUri(e.space.user.avatar)},null,8,j),s("h4",null,t(o.getUserDisplayName(e.space.user)),1)]),s("p",G,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,[u(_,{type:"primary",size:"large",onClick:r[3]||(r[3]=c=>o.$router.push({name:"CreateService",query:{space:e.space.name}}))},{default:T(()=>[C(t(o.$t("service.createNewService")),1)]),_:1})])):a("",!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"))])])])])])):a("",!0)])),[[f,e.loading]])}const ie=g(B,[["render",X],["__scopeId","data-v-740387dd"]]);export{ie as default};