UNPKG

goldpankit

Version:

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

2 lines (1 loc) 2.57 kB
import{_ as f,M as h,Y as b,Z as V,r as a,o as v,c as w,a as m,b as o,w as s,e as S,t as k,p as U,l as g}from"./index-feb3a4f9.js";import{c as x}from"./service.space-68dc415a.js";const y={components:{MarkdownEditor:h,HelpButton:b,I18nInput:V},data(){return{form:{name:"",label:"",techDocUrl:"",withPrivate:!1,subServiceReceivable:!1,description:""},rules:{name:[{required:!0,message:"请输入项目唯一标识符"}],label:[{required:!0,message:"请输入项目名称"}]}}},methods:{create(){this.$refs.form.validate(r=>{r&&x(this.form).then(()=>{this.$router.push({name:"CreateService",query:{space:this.form.name}})}).catch(l=>{this.$tip.apiFailed(l)})})}}},I=r=>(U("data-v-85648cb1"),r=r(),g(),r),q={class:"page"},C={class:"wrap"},D=I(()=>m("h2",null,"创建项目空间",-1)),B={class:"form-wrap"},E={class:"opera"};function M(r,l,N,P,e,p){const c=a("el-input"),n=a("el-form-item"),i=a("el-checkbox"),d=a("el-form"),u=a("MarkdownEditor"),_=a("el-button");return v(),w("div",q,[m("div",C,[D,m("div",B,[o(d,{ref:"form",model:e.form,rules:e.rules},{default:s(()=>[o(n,{label:"项目标识符",prop:"name",required:""},{default:s(()=>[o(c,{modelValue:e.form.name,"onUpdate:modelValue":l[0]||(l[0]=t=>e.form.name=t),placeholder:"请输入项目标识符"},null,8,["modelValue"])]),_:1}),o(n,{label:"项目名称",prop:"label",required:""},{default:s(()=>[o(c,{modelValue:e.form.label,"onUpdate:modelValue":l[1]||(l[1]=t=>e.form.label=t),placeholder:"请输入项目名称"},null,8,["modelValue"])]),_:1}),o(n,{label:"技术文档",prop:"techDocUrl"},{default:s(()=>[o(c,{modelValue:e.form.techDocUrl,"onUpdate:modelValue":l[2]||(l[2]=t=>e.form.techDocUrl=t),placeholder:"请输入项目技术文档地址"},null,8,["modelValue"])]),_:1}),o(n,{label:r.$t("space.otherSettings"),class:"item-other-settings"},{default:s(()=>[m("div",null,[o(i,{modelValue:e.form.withPrivate,"onUpdate:modelValue":l[3]||(l[3]=t=>e.form.withPrivate=t),label:"这是一个私有项目"},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model","rules"]),o(d,{ref:"descForm",class:"description-form",model:e.form},{default:s(()=>[o(n,{label:"项目描述",prop:"description"},{default:s(()=>[o(u,{modelValue:e.form.description,"onUpdate:modelValue":l[4]||(l[4]=t=>e.form.description=t),placeholder:"请撰写项目描述"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),m("div",E,[o(_,{type:"primary",onClick:p.create},{default:s(()=>[S(k(r.$t("space.createSpace")),1)]),_:1},8,["onClick"])])])])}const R=f(y,[["render",M],["__scopeId","data-v-85648cb1"]]);export{R as default};