UNPKG

goldpankit

Version:

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

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