goldpankit
Version:
GoldPanKit是一款极速研发套件,可在套件中快速构建各类技术框架和项目。开源作者可发布自己的项目,并为其设定金额,实现开源项目的盈利。
2 lines (1 loc) • 3.45 kB
JavaScript
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 as o,H as p,b as u,F as N,g as d,i as a,w as T,e as C}from"./index-4d897c91.js";import{S as E}from"./ServiceList-982253d1.js";import{f as V}from"./service.space-2b983a85.js";import"./BeanAmount-40bf4e8b.js";import"./ServiceTitle-2a0b6c6e.js";const I={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(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()}},B={class:"page"},D={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"},q={key:0,class:"readme"},A={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(t,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",B,[e.space!=null?(i(),n("div",D,[s("h2",null,o(e.space.name),1),s("div",P,[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",U,[e.currentTab==="readme"?(i(),n("div",q,[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:t.$t("service.noServices")},null,8,["description"]))],64)):a("",!0)])]),s("div",A,[s("div",H,[s("div",O,[s("img",{src:t.getImageUri(e.space.user.avatar,"/images/avatar/default.png")},null,8,j),s("h4",null,o(t.getUserDisplayName(e.space.user)),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:T(()=>[C(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(I,[["render",X],["__scopeId","data-v-cadf6992"]]);export{ie as default};