1 |
- import{f as e,E as s}from"./vue-bbe2430e.js";import{a0 as o,aa as i,ab as c,G as d}from"./radical-e232c97c.js";import{s as x}from"./global-4ea86c7d.js";const h=a=>({type:"object",properties:{layout:{type:"void","x-component":"FormLayout","x-component-props":{layout:"inline"},properties:{add:{type:"void","x-component":"Button","x-component-props":{"@click":()=>a()},"x-content":{default:"添加流别名",icon:()=>e(o,{icon:"ant-design:plus-outlined",class:"v-text-bottom mr-4px"},null)}}}}}}),y=()=>({type:"object",properties:{layout:{type:"void","x-component":"FormLayout","x-component-props":{layout:"horizontal",labelCol:6,wrapperCol:14},properties:{alias:{type:"string",title:"流别名","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:"请输入流别名",allowClear:!0},required:!0},streamPath:{type:"string",title:"映射流路径","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:"请输入映射流路径",allowClear:!0}},autoRemove:{type:"boolean",title:"自动删除","x-decorator":"FormItem","x-component":"Switch",default:!1}}}}}),v=({updateList:a,pause:l,resume:n},t)=>{const{FormilyForm:r,form:p,submit:u}=i({schema:y(),formProps:{initialValues:{streamPath:t==null?void 0:t.streamPath,alias:t==null?void 0:t.alias,autoRemove:t==null?void 0:t.autoRemove},effects(){}}});l(),c({content:()=>e(r,null,null),modalConfig:{title:"添加流别名",maskClosable:!1,width:700,onOk:async()=>{const m=await u();return await x(m),d.success("已添加流别名!"),a(),n(),Promise.reject(!1)},onClose:()=>{p.reset(),n()}}})},g={0:e("span",null,[e(o,{icon:"guidance:waiting-room",class:"v-text-bottom mr-8px"},null),s("等待流发布")]),1:e("span",null,[e(o,{icon:"oui:token-alias",class:"v-text-bottom mr-8px"},null),s("正常路由")]),2:e("span",null,[e(o,{icon:"ic:outline-alt-route",class:"v-text-bottom mr-8px"},null),s("顶替路由")])};export{h as q,g as s,v as u};
|