epic-designer-gold 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/attributeView-CPrGnVQ8.js +106 -0
  2. package/dist/attributeView-DEg9mFCt.cjs +1 -0
  3. package/dist/axios-BAhOY32t.cjs +6 -0
  4. package/dist/{js.cookie-oHpRFPCO.js → axios-BFVeUxau.js} +942 -737
  5. package/dist/col-BNNn9Yx8.cjs +1 -0
  6. package/dist/{col-Dy6oYMf5.js → col-u5YiB-UK.js} +8 -8
  7. package/dist/index-B8V7odtp.cjs +1 -0
  8. package/dist/index-BEXliJtJ.cjs +1 -0
  9. package/dist/index-BN_dXDiO.cjs +1 -0
  10. package/dist/index-BPRzjSrH.cjs +10 -0
  11. package/dist/index-BPmq8lmK.js +72 -0
  12. package/dist/index-BY9j66Gp.js +4 -0
  13. package/dist/{index-DNeYX6HK.js → index-BiXYEiWV.js} +1 -1
  14. package/dist/index-BoVrWUpL.js +271 -0
  15. package/dist/{index-DLMH0OSJ.js → index-BstMY1Nn.js} +1 -1
  16. package/dist/index-Bsv8EECz.js +71 -0
  17. package/dist/index-C2Sx6r6b.cjs +1 -0
  18. package/dist/index-C5-ZZLug.cjs +1 -0
  19. package/dist/index-C6C5D9M8.js +602 -0
  20. package/dist/index-CIwV58Ko.js +1359 -0
  21. package/dist/index-CgisEnmm.cjs +1 -0
  22. package/dist/index-CtkdvWFN.cjs +1 -0
  23. package/dist/{index-DkyxbMHi.js → index-Cwgv4MbW.js} +24 -24
  24. package/dist/{index-CYDtBJTI.cjs → index-D3Uft3bJ.cjs} +1 -1
  25. package/dist/{index-BKDRMrcc.js → index-D7z34DMU.js} +28 -47
  26. package/dist/index-DAhVvQNH.cjs +1 -0
  27. package/dist/index-DO5DuUPL.js +581 -0
  28. package/dist/index-DddOVmF6.cjs +1 -0
  29. package/dist/index-DdsHIglg.js +104 -0
  30. package/dist/index-Dru9G2MF.js +195 -0
  31. package/dist/index-KGGnmoAO.cjs +1 -0
  32. package/dist/{index-XUQ1VGQg.js → index-Sin3ac_7.js} +1 -1
  33. package/dist/{index-DJxuHxdI.js → index-dUOJH8fj.js} +24 -24
  34. package/dist/index-dcjty1Ho.cjs +1 -0
  35. package/dist/{index-Dyo12Kua.cjs → index-g1W7IHK_.cjs} +1 -1
  36. package/dist/index-ykB9CsYG.cjs +1 -0
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +35 -35
  39. package/dist/locale/index.d.ts +4 -0
  40. package/dist/locale/lang/en-US.d.ts +246 -0
  41. package/dist/locale/lang/zh-cn.d.ts +246 -0
  42. package/dist/modal-BLOgN3us.cjs +1 -0
  43. package/dist/modal-UFu4bD6x.js +57 -0
  44. package/dist/{outline-CNayBNNC.js → outline-CG-aHThT.js} +2 -2
  45. package/dist/outline-Coy4TGIa.cjs +1 -0
  46. package/dist/row-BWnbt6dh.cjs +1 -0
  47. package/dist/{row-qOviQw5w.js → row-DAy14ve9.js} +4 -4
  48. package/dist/sign-BlMhTkWG.cjs +1 -0
  49. package/dist/sign-C0z0Ygs4.js +219 -0
  50. package/dist/style.css +1 -1
  51. package/dist/{styleView-BLVqzqPV.js → styleView-CkbdwQhA.js} +34 -33
  52. package/dist/styleView-D0W-N4vW.cjs +1 -0
  53. package/dist/tree.vue_vue_type_script_setup_true_lang-KKt_Qgqv.cjs +1 -0
  54. package/dist/{tree.vue_vue_type_script_setup_true_lang-BntCm43E.js → tree.vue_vue_type_script_setup_true_lang-RWHCYpkY.js} +1 -1
  55. package/dist/ui/antd/date-picker/datePicker.d.ts +2 -2
  56. package/dist/ui/elementPlus/index.cjs +1 -1
  57. package/dist/ui/elementPlus/index.js +553 -542
  58. package/dist/ui/naiveUi/index.cjs +1 -1
  59. package/dist/ui/naiveUi/index.js +1 -1
  60. package/dist/uploadFile-Bh5GyGFd.js +77 -0
  61. package/dist/uploadFile-CmKFRZMw.cjs +1 -0
  62. package/dist/{uploadImage-742IA7ei.js → uploadImage-CbVsUivh.js} +34 -33
  63. package/dist/uploadImage-CcMA6CyX.cjs +1 -0
  64. package/dist/uploadImage-DENhzttU.cjs +1 -0
  65. package/dist/{uploadImage-CnNnAISs.js → uploadImage-qHq6JX83.js} +17 -20
  66. package/package.json +1 -1
  67. package/dist/attributeView-B-IswSw7.js +0 -105
  68. package/dist/attributeView-CQBVIMGW.cjs +0 -1
  69. package/dist/col-RWuL5Zuz.cjs +0 -1
  70. package/dist/index-0GtpyUBx.js +0 -64
  71. package/dist/index-B4ido7VJ.cjs +0 -1
  72. package/dist/index-BGvqo4s7.js +0 -104
  73. package/dist/index-BMtRXkSh.cjs +0 -1
  74. package/dist/index-BSLudrcT.cjs +0 -1
  75. package/dist/index-BXO8Zj1H.cjs +0 -1
  76. package/dist/index-B_9x_cPH.js +0 -1633
  77. package/dist/index-B_TFfRwe.js +0 -194
  78. package/dist/index-C3_E7xcD.js +0 -270
  79. package/dist/index-C3a1hfUC.cjs +0 -10
  80. package/dist/index-CucdgcqX.cjs +0 -1
  81. package/dist/index-CvEzOhT_.cjs +0 -1
  82. package/dist/index-DEPx91yu.cjs +0 -1
  83. package/dist/index-DKVv0PbJ.js +0 -56
  84. package/dist/index-DSzJgAzW.cjs +0 -1
  85. package/dist/index-Dz1OM1dD.cjs +0 -1
  86. package/dist/index-HNPgHrkl.cjs +0 -1
  87. package/dist/index-JhxJizMR.js +0 -601
  88. package/dist/index-aBofZ4Mk.js +0 -4
  89. package/dist/index-sKJ91s0r.cjs +0 -1
  90. package/dist/js.cookie-BH1G_HRi.cjs +0 -6
  91. package/dist/modal-BPJM1Muh.js +0 -59
  92. package/dist/modal-_fid8E1T.cjs +0 -1
  93. package/dist/outline-6Qt3qlWm.cjs +0 -1
  94. package/dist/row-Bm8OjIsU.cjs +0 -1
  95. package/dist/sign--js815Se.cjs +0 -1
  96. package/dist/sign-CO47QOTw.js +0 -218
  97. package/dist/styleView-C1zTBeyd.cjs +0 -1
  98. package/dist/tree.vue_vue_type_script_setup_true_lang-BjjL_VlR.cjs +0 -1
  99. package/dist/uploadFile-CYDDVa_x.js +0 -76
  100. package/dist/uploadFile-eWBMdZ9d.cjs +0 -1
  101. package/dist/uploadImage-BQhv5ymq.cjs +0 -1
  102. package/dist/uploadImage-BXcN2FA_.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./axios-BAhOY32t.cjs"),O=require("./index-BPRzjSrH.cjs"),U=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),oe=require("./vuedraggable.umd-BqhSJIAi.cjs"),le={class:"epic-widget-action-item whitespace-nowrap"},ae={key:0,class:"flex items-center"},re=e.defineComponent({__name:"previewWidgets",setup(F,{expose:R}){const p=e.inject("pageManager",{}),g=e.inject("pageSchema"),l=e.inject("designer"),b=e.inject("designerProps"),c=e.inject("revoke"),h=e.ref(null),B=e.ref(null),C=e.ref(null),$=e.ref(!1),a=e.ref(!1),r=e.ref(!0),i=e.ref("top"),{canvasScale:s,disabledZoom:N}=O.useStore();let o=null;const j=e.computed(()=>{const t=l.state.checkedNode;return!(!(t!=null&&t.id)||b.value.lockDefaultSchemaEdit&&p.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-col")}),z=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table-col"}),V=e.computed(()=>{const t=l.state.checkedNode;return(t==null?void 0:t.type)==="table"}),m=e.computed(()=>{var v,_,x,u,M,L;const t=p.componentInstances.value,d=(v=l.state.checkedNode)==null?void 0:v.id;if((x=(_=l.state.checkedNode)==null?void 0:_.componentProps)!=null&&x.hidden)return null;const f=w.pluginManager.getComponentConfingByType((u=l.state.checkedNode)==null?void 0:u.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((M=l.state.checkedNode)==null?void 0:M.noFormItem)!==!0)return(L=t[d+"formItem"])==null?void 0:L.$el;const n=t[d];return!(n!=null&&n.$el)||(n==null?void 0:n.$el.nodeName)==="#text"||!(n!=null&&n.$el.getBoundingClientRect)?null:n==null?void 0:n.$el}),y=e.computed(()=>{var v,_,x,u;const t=p.componentInstances.value,d=(v=l.state.hoverNode)==null?void 0:v.id,f=w.pluginManager.getComponentConfingByType((_=l.state.hoverNode)==null?void 0:_.type)??null;if(!d||!(t!=null&&t[d]))return null;if(f!=null&&f.defaultSchema.input&&((x=l.state.hoverNode)==null?void 0:x.noFormItem)!==!0)return(u=t[d+"formItem"])==null?void 0:u.$el;const n=t[d];return(n==null?void 0:n.$el.nodeName)==="#text"?null:n==null?void 0:n.$el}),{mutationObserver:k,observerConfig:D}=Q(J),{startTimedQuery:W,stopTimedQuery:E}=O.useTimedQuery(J);e.watch(()=>m.value,t=>{if(t){$.value=!0,k.observe(t,D);const d=t.parentNode;d&&(d.ondragstart=()=>{r.value=!1,W()},d.ondragend=()=>{r.value=!0,E()}),J()}else $.value=!1});const{mutationObserver:S,observerConfig:T}=Q(Z);e.watch(()=>y.value,t=>{t&&(S.observe(t,T),Z())});let H=0;e.watch(()=>{var t;return(t=l.state.hoverNode)==null?void 0:t.id},t=>{if(t){a.value=!0,clearTimeout(H);return}H=setTimeout(()=>{a.value=!1},300)});let A=0,I=0;function J(){const t=m.value;if(!t||!o)return;const{top:d,left:f}=o==null?void 0:o.getBoundingClientRect(),{top:n,left:v,width:_,height:x}=t.getBoundingClientRect(),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u,P=x/u;h.value&&(h.value.style.width=`${_/u}px`,h.value.style.height=`${P}px`,h.value.style.top=`${M/u}px`,h.value.style.left=`${L/u}px`,X(M,L)),C.value&&(M<45&&P<100?(C.value.style.top="",C.value.style.bottom="-30px",C.value.style["border-radius"]="0px 0px 4px 4px",i.value="bottom"):M<45?(C.value.style.top="0px",C.value.style["border-radius"]="0px 0px 4px 0",i.value="center"):(C.value.style.top="-30px",C.value.style["border-radius"]="4px 4px 0px 0px",i.value="top"))}function X(t,d){const f=m.value;if(!o||!f)return;const n=o.getBoundingClientRect(),{width:v}=f.getBoundingClientRect(),_=N.value?1:s.value,x=t/_-n.top;let u=d/_-n.left+v/_;u<n.width&&(u=0);const M=o.scrollTop-n.height/3+60,L=o.scrollTop+n.height/3*2,P=o.scrollLeft-n.width+200,q=o.scrollLeft+n.width-200;Math.abs(x-A)<10&&Math.abs(u-I)<10||(A=x,I=u,!(x>M&&x<L&&u>P&&u<q)&&(o.scrollTop=x,o.scrollLeft=u))}function Z(){var P,q;const t=y.value;if(!t)return;const{top:d,left:f}=(o==null?void 0:o.getBoundingClientRect())??{top:0,left:0},{top:n,left:v,width:_,height:x}=((P=t.getBoundingClientRect)==null?void 0:P.call(t))??((q=t.nextElementSibling)==null?void 0:q.getBoundingClientRect()),u=N.value?1:s.value,M=n-d+((o==null?void 0:o.scrollTop)??0)*u,L=v-f+((o==null?void 0:o.scrollLeft)??0)*u;B.value&&(B.value.style.width=`${_/u}px`,B.value.style.height=`${x/u}px`,B.value.style.top=`${M/u}px`,B.value.style.left=`${L/u}px`)}function Q(t){const d=window.MutationObserver,f={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new d(t),observerConfig:f}}function Y(){var n,v;const t=w.findSchemaInfoById(g.schemas,((n=l.state.checkedNode)==null?void 0:n.id)??"root");if(!t||!t.list||!t.list.length||!t.list[0].children||!t.list[0].children.length)return!1;let d=JSON.parse(JSON.stringify((v=t.list[0])==null?void 0:v.children[0]));d.children.forEach((_,x)=>{d.children[x].children=[]});const f=w.generateNewSchema(d);t.list[0].children.push(f),l.setCheckedNode(f),c.push(g.schemas,"表格增加一行")}function G(){var f,n,v,_;const t=w.findSchemaInfoById(g.schemas,((f=l.state.checkedNode)==null?void 0:f.id)??"root");if(!((n=t==null?void 0:t.list)!=null&&n.length)||!((_=(v=t.list[0])==null?void 0:v.children)!=null&&_.length))return!1;t.list[0].children.forEach(x=>{const u=x.children.length+1,M=Math.floor(24/u);x.children.forEach(L=>{L.componentProps.span=M}),x.children.push(w.generateNewSchema({type:"table-col",children:[],componentProps:{span:M}}))}),c.push(g.schemas,"表格增加一列")}function ee(){var _;const t=w.findSchemaInfoById(g.schemas,((_=l.state.checkedNode)==null?void 0:_.id)??"root");if(!t)return!1;const{list:d,schema:f,index:n}=t,v=w.generateNewSchema(f);d.splice(n+1,0,v),l.setCheckedNode(v),c.push(g.schemas,"复制组件")}function te(){var v;const t=w.findSchemaInfoById(g.schemas,((v=l.state.checkedNode)==null?void 0:v.id)??"root");if(!t)return!1;let{list:d,schema:f,index:n}=t;d.splice(n,1),n===d.length&&n--,l.setCheckedNode(d[n]),c.push(g.schemas,"删除组件")}function ne(t){o=t,o==null||o.addEventListener("scroll",()=>{J()}),O.useResizeObserver(m,J),O.useResizeObserver(y,Z)}return R({handleInit:ne}),(t,d)=>{var f,n,v,_,x;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:h,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",i.value+" "+(r.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:C},[e.createElementVNode("div",le,e.toDisplayString((n=e.unref(w.pluginManager).getComponentConfingByType(((f=e.unref(l).state.checkedNode)==null?void 0:f.type)??""))==null?void 0:n.defaultSchema.label),1),j.value||V.value||z.value?(e.openBlock(),e.createElementBlock("div",ae,[j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:ee},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"插入新行",class:"epic-widget-action-item pointer-events-auto",onClick:Y},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),V.value?(e.openBlock(),e.createElementBlock("div",{key:2,title:"插入新列",class:"epic-widget-action-item pointer-events-auto",onClick:G,style:{transform:"rotate(270deg)"}},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--account-tree-outline-rounded"})])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",{key:3,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:te},[e.createVNode(e.unref(U._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,$.value&&((v=e.unref(l).state.checkedNode)==null?void 0:v.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:B,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,a.value&&((_=e.unref(l).state.checkedNode)==null?void 0:_.id)!==((x=e.unref(l).state.hoverNode)==null?void 0:x.id)]])],64)}}}),se=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(F,{emit:R}){const p=e.inject("designer"),g=e.inject("pageSchema"),l=e.inject("revoke"),b=F,c=R,h=e.computed({get(){return b.schemas},set(r){c("update:schemas",r)}});function B(r){p.setCheckedNode(h.value[r]),p.setDisableHover(!0)}function C(){p.setDisableHover(),l.push(g.schemas,"拖拽组件")}function $(){l.push(g.schemas,"插入组件")}function a(r){var i,s,N;return r.id===((i=g.schemas[0])==null?void 0:i.id)||(N=(s=w.pluginManager.getComponentConfingByType(r.type))==null?void 0:s.editConstraints)!=null&&N.immovable?"unmover-item":"draggable-item"}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(oe.draggable),e.mergeProps({modelValue:h.value,"onUpdate:modelValue":i[0]||(i[0]=s=>h.value=s),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:i[1]||(i[1]=s=>B(s.oldIndex)),onEnd:i[2]||(i[2]=s=>C()),onAdd:i[3]||(i[3]=s=>{B(s.newIndex),$()})}),{item:e.withCtx(({element:s,index:N})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",a(s)]),key:N},[e.createVNode(K,{schema:s},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),K=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(F){const R=e.useAttrs(),p=e.inject("designer"),g=e.inject("pageManager",{}),l=e.inject("pageSchema",{}),b=e.ref(null);e.provide("nodeAttrs",R);const c=F,h=e.computed(()=>{var N,o,j,z,V;const a=g.componentInstances.value,r=(N=c.schema)==null?void 0:N.id,i=w.pluginManager.getComponentConfingByType((o=c.schema)==null?void 0:o.type)??null;if(!r||!(a!=null&&a[r]))return null;if(i!=null&&i.defaultSchema.input&&((j=c.schema)==null?void 0:j.noFormItem)!==!0)return(z=a[r+"formItem"])==null?void 0:z.$el;const s=a[r];return((V=s==null?void 0:s.$el)==null?void 0:V.nodeName)==="#text"?null:s==null?void 0:s.$el});e.watch(()=>h.value,a=>{a==null||a.addEventListener("click",B,!1),a==null||a.addEventListener("mouseover",C,!1),a==null||a.addEventListener("mouseout",$,!1)}),e.onUnmounted(()=>{var a,r,i;(a=h.value)==null||a.removeEventListener("click",B,!1),(r=h.value)==null||r.removeEventListener("mouseover",C,!1),(i=h.value)==null||i.removeEventListener("mouseout",$,!1)});function B(a){a.stopPropagation(),p.setCheckedNode(c.schema)}function C(a){var r;c.schema.id!==((r=l.schemas[0])==null?void 0:r.id)&&(a.stopPropagation(),p.setHoverNode(c.schema))}function $(a){a.stopPropagation(),p.setHoverNode(null)}return(a,r)=>{var s,N;const i=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(O._sfc_main),{ref_key:"nodeRef",ref:b,componentSchema:c.schema},e.createSlots({_:2},[(N=(s=e.unref(w.pluginManager).getComponentConfingByType(c.schema.type))==null?void 0:s.editConstraints)!=null&&N.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.schema.children,o=>(e.openBlock(),e.createBlock(i,{key:o.id,schema:o},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[c.schema.children?(e.openBlock(),e.createBlock(se,{key:0,schemas:c.schema.children,"onUpdate:schemas":r[0]||(r[0]=o=>c.schema.children=o)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),ce={class:"min-w-750px rounded h-full"},ie=e.defineComponent({__name:"previewJson",setup(F,{expose:R}){const p=w.pluginManager.getComponent("modal"),g=w.pluginManager.getComponent("monacoEditor"),l={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},b=e.ref(null),c=e.ref(!1),h=e.inject("pageSchema");function B(){c.value=!1}function C(){c.value=!0,b.value?b.value.setValue(JSON.stringify(h,null,2)):setTimeout(()=>{C()},300)}function $(a="epic-data.json"){const r=JSON.stringify(h,null,2);var i=`data:text/json;charset=utf-8,${encodeURIComponent(r)}`,s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",a),s.click()}return R({handleOpen:C}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(p),{modelValue:c.value,"onUpdate:modelValue":r[0]||(r[0]=i=>c.value=i),title:"查看数据",class:"w-900px",width:"900px",onClose:B,onOk:$,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",ce,[e.createVNode(e.unref(g),{ref_key:"monacoEditorRef",ref:b,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:l,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),de={class:"epic-edit-toolbar flex items-center justify-between px-2"},ue={class:"flex-1 h-full flex items-center"},fe={key:0,class:"epic-divider"},pe=["title","onClick"],he={class:"flex-1 h-full flex items-center justify-end"},me={key:0,class:"flex items-center ml-12px"},ve={class:"pr-8px w-82px cursor-pointer"},ge={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ye=["title","onClick"],ke=e.defineComponent({__name:"toolbar",setup(F){const R=w.pluginManager.getComponent("select"),{canvasScale:p,disabledZoom:g}=O.useStore(),l=e.ref("pc"),b=e.inject("pageSchema"),c=e.inject("designer"),h=e.inject("revoke"),B=e.ref(null),C=[{icon:"icon--epic--computer-outline-rounded",title:"pc",key:"pc"},{icon:"icon--epic--tablet-android-outline-rounded",title:"平板",key:"pad"},{icon:"icon--epic--phone-iphone-outline-sharp",title:"手机",key:"mobile"}],$=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:o},{icon:"icon--epic--undo",title:"撤销",on:s,disabled:!h.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:N,disabled:!h.undoList.value.length}]),a=e.ref(null),r=e.computed({get(){return`${(p.value*100).toFixed(0)}%`},set(m){const y=parseFloat(m);p.value=y/100}}),i=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function s(){const m=h.undo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function N(){const m=h.redo();m&&(w.deepCompareAndModify(b.schemas,m),c.setCheckedNode(b.schemas[0]))}function o(){c.reset()}function j(m){var D;const y=(D=m.target.files)==null?void 0:D[0];if(!y)return;m.target.value=null;const k=new FileReader;k.readAsText(y),k.onload=W=>{var E;z((E=W.target)==null?void 0:E.result)}}function z(m){try{let y=JSON.parse(m??"");y.schemas||(y=w.convertKFormData(y)),w.deepCompareAndModify(b,y)}catch(y){console.error(y)}}function V(m){c.handleToggleDeviceMode(m),l.value=m;const y={pc:{},pad:{width:"780px",mode:m},mobile:{width:"390px",height:"844px",mode:m}};b.canvas=y[m],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",b)}return(m,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",de,[e.createElementVNode("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(k,D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:D},[k.divider?(e.openBlock(),e.createElementBlock("div",fe)):e.createCommentVNode("",!0),e.createElementVNode("div",{title:k.title,class:e.normalizeClass(["epic-action-item text-base h-90% px-10px flex items-center cursor-pointer",{disabled:k.disabled}]),onClick:k.on},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,pe)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:a,accept:".json,.txt",onChange:j},null,544),[[e.vShow,!1]]),e.createElementVNode("div",he,[e.unref(g)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ve,[e.createVNode(e.unref(R),{value:r.value,"onUpdate:value":y[0]||(y[0]=k=>r.value=k),modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=k=>r.value=k),options:i,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",ge,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(C,k=>e.createElementVNode("div",{key:k.key,title:k.title,class:e.normalizeClass(["epic-device-item h-full px-1 flex items-center cursor-pointer text-base transition-colors rounded-sm",{checked:k.key===l.value}]),onClick:D=>V(k.key)},[e.createVNode(e.unref(U._sfc_main),{name:k.icon},null,8,["name"])],10,ye)),64))])])]),e.createVNode(ie,{ref_key:"previewJson",ref:B},null,512)],64))}}),xe={class:"h-full flex flex-col relative"},be=["draggable"],_e=e.defineComponent({__name:"editScreenContainer",setup(F){const R=e.inject("pageSchema"),p=e.ref(null),g=e.ref(null),l=e.ref(null),{pressSpace:b,disabledZoom:c}=O.useStore(),{handleElementDragStart:h,handleElementDrag:B,handleElementDragEnd:C}=O.useElementDrag(p),{width:$,height:a}=O.useElementSize(p),{canvasScale:r,handleZoom:i}=O.useElementZoom(g);let s=0,N=0;const o=e.ref({}),j=e.ref({}),z=e.ref({}),V=e.shallowRef({width:0,height:0});e.watchEffect(y),e.watch(z,()=>{e.nextTick(m)});function m(){l.value&&(V.value={width:l.value.clientWidth,height:l.value.clientHeight})}function y(){var E,S;z.value={width:((E=R.canvas)==null?void 0:E.width)??"0",height:((S=R.canvas)==null?void 0:S.height)??"0"}}O.watchOnce($,k),e.watch(V,k);function k(){let E=V.value.width||s,S=V.value.height||N;o.value={width:$.value+E+"px",height:a.value+S+"px"},j.value={width:E+"px",height:S+"px"},D()}function D(){e.nextTick(()=>{var A;let E=V.value.width||s;const T=(V.value.height||N)/2,H=E/2;(A=p.value)==null||A.scrollTo(H,T)})}O.useResizeObserver(p,W),O.useResizeObserver(g,W);function W(){var S;if(!p.value)return;const E=p.value.getBoundingClientRect();if(s=E.width-60,N=E.height-80,!c.value)if(V.value.width===0)r.value=1;else{const T=(s-20)/V.value.width,H=N/(V.value.height||((S=g.value)==null?void 0:S.clientHeight)||1),A=Math.abs(T-1)<Math.abs(H-1);let I=1;A?I=T:I=H,(T<1||H<1)&&(I=Math.min(T,H)),I<1.4&&I>.5&&(r.value=I)}O.debounce(k,50)()}return(E,S)=>(e.openBlock(),e.createElementBlock("div",xe,[e.createVNode(ke),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:p,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(b)}]),draggable:e.unref(b),onWheel:S[0]||(S[0]=(...T)=>e.unref(i)&&e.unref(i)(...T)),onDragstart:S[1]||(S[1]=(...T)=>e.unref(h)&&e.unref(h)(...T)),onDragend:S[2]||(S[2]=(...T)=>e.unref(C)&&e.unref(C)(...T)),onDrag:S[3]||(S[3]=(...T)=>e.unref(B)&&e.unref(B)(...T))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(o.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:g,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(b)}),style:e.normalizeStyle(j.value)},[e.renderSlot(E.$slots,"default")],6)],512)],4)],42,be),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:l,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(z.value)},null,4)]))}}),Ce={class:"epic-edit-canvas"},Ne=e.defineComponent({__name:"index",setup(F){const R=e.ref(null),p=e.ref(null),g=e.inject("pageSchema"),l=e.computed(()=>g.schemas[0]),b=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var c;(c=p.value)==null||c.handleInit(R.value)}),(c,h)=>(e.openBlock(),e.createElementBlock("section",Ce,[e.createVNode(_e,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:R,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(b.value)},[e.createVNode(K,{schema:l.value},null,8,["schema"]),e.createVNode(re,{ref_key:"ePreviewWidgetsRef",ref:p},null,512)],4)]),_:1})]))}});exports.default=Ne;
@@ -0,0 +1,602 @@
1
+ import { defineComponent as te, ref as O, reactive as oe, onMounted as ue, openBlock as m, createElementBlock as p, createVNode as t, unref as a, withCtx as s, createElementVNode as n, toDisplayString as v, Fragment as D, renderList as J, normalizeClass as de, normalizeStyle as re, createTextVNode as V, createCommentVNode as R } from "vue";
2
+ import { p as f, E as q, e as se } from "./axios-BFVeUxau.js";
3
+ import { ElMessage as L } from "element-plus";
4
+ import { _ } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
5
+ import { u as ne, a as ie } from "./index-DO5DuUPL.js";
6
+ const ce = { class: "e-data-source" }, me = { class: "icon-numbers" }, pe = { class: "drawer-content" }, ve = { class: "drawer-content-left" }, fe = ["onClick"], he = { class: "source-item-title" }, ye = ["onClick"], be = { class: "drawer-content-right" }, ge = { class: "content" }, Ve = {
7
+ key: 0,
8
+ class: "content-empty"
9
+ }, _e = {
10
+ key: 1,
11
+ class: "content-form"
12
+ }, Se = { class: "form-flex" }, ke = { class: "form-item" }, Le = { class: "form-item-title" }, Ne = {
13
+ key: 0,
14
+ class: "form-item-content"
15
+ }, Ce = { class: "form-item" }, Ee = { class: "form-item-title" }, we = {
16
+ key: 0,
17
+ class: "form-item-content"
18
+ }, Oe = { class: "form-item" }, Ue = { class: "form-item-title" }, De = {
19
+ key: 0,
20
+ class: "form-item-content"
21
+ }, Je = { class: "content-right-btn" }, Be = /* @__PURE__ */ te({
22
+ __name: "index",
23
+ emits: ["update:modelValue", "update:sourceData"],
24
+ setup(qe, { emit: Pe }) {
25
+ const { t: u } = ne(), y = f.getComponent("button"), x = f.getComponent("Drawer"), h = f.getComponent("input"), N = f.getComponent("FormItem"), F = f.getComponent("Form"), B = f.getComponent("RadioGroup"), U = f.getComponent("RadioButton");
26
+ f.getComponent("select"), f.getComponent("switch");
27
+ const P = O(), A = {
28
+ GET: "#67c23a",
29
+ POST: "#e6a23c",
30
+ PUT: "#409eff",
31
+ DELETE: "#f56c6c"
32
+ }, M = O(0), $ = oe({
33
+ apiName: [{ required: !0, message: u("pleaseEnterApiName"), trigger: "blur" }],
34
+ url: [{ required: !0, message: u("pleaseEnterRequestUrl"), trigger: "blur" }],
35
+ dataKey: [{ required: !0, message: u("pleaseEnterLabelKey"), trigger: "blur" }],
36
+ dataValue: [{ required: !0, message: u("pleaseEnterValueKey"), trigger: "blur" }]
37
+ }), T = O(!1), b = O([]), e = O(), C = [
38
+ {
39
+ label: "1",
40
+ value: "1"
41
+ }
42
+ ];
43
+ function j() {
44
+ T.value = !0;
45
+ }
46
+ function G() {
47
+ const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
48
+ return o.charAt(Math.floor(Math.random() * o.length));
49
+ }
50
+ function I(o) {
51
+ let l = "";
52
+ for (let d = 0; d < o; d++)
53
+ l += G();
54
+ return l;
55
+ }
56
+ function z() {
57
+ !e.value || e.value.id || !Object.keys(e.value).length ? (e.value = {
58
+ id: "",
59
+ url: "",
60
+ body: {},
61
+ bodyList: [],
62
+ apiName: `${u("dataSource")}_${I(5)}`,
63
+ method: "get",
64
+ params: {},
65
+ paramsList: [],
66
+ dataKey: "name",
67
+ headers: {},
68
+ headerList: [],
69
+ dataPath: "",
70
+ dataValue: "id"
71
+ }, b.value.push(e.value)) : e.value.id || K();
72
+ }
73
+ function H(o) {
74
+ var l;
75
+ !e.value || e.value.id || !Object.keys(e.value).length ? (b.value = JSON.parse(JSON.stringify(f.getSourceData())), ((l = e.value) == null ? void 0 : l.id) === o ? e.value = {} : (e.value = b.value.find((d) => d.id === o), e.value.paramsList = Object.keys(JSON.parse(e.value.params)).map((d) => ({
76
+ label: d,
77
+ value: JSON.parse(e.value.params)[d]
78
+ })), e.value.bodyList = Object.keys(JSON.parse(e.value.body)).map((d) => ({
79
+ label: d,
80
+ value: JSON.parse(e.value.body)[d]
81
+ })), e.value.headerList = Object.keys(JSON.parse(e.value.headers)).map((d) => ({
82
+ label: d,
83
+ value: JSON.parse(e.value.headers)[d]
84
+ })))) : K();
85
+ }
86
+ function Q(o) {
87
+ o ? (q.emit("deleteSourceData", o), e.value = {}) : (b.value = b.value.filter((l) => l.id !== o), e.value = {});
88
+ }
89
+ function W() {
90
+ var o;
91
+ (o = e.value) == null || o.paramsList.push({
92
+ label: "",
93
+ value: ""
94
+ });
95
+ }
96
+ function X(o) {
97
+ e.value.paramsList.splice(o, 1);
98
+ }
99
+ function Y() {
100
+ var o;
101
+ (o = e.value) == null || o.headerList.push({
102
+ label: "",
103
+ value: ""
104
+ });
105
+ }
106
+ function Z(o) {
107
+ e.value.headerList.splice(o, 1);
108
+ }
109
+ function ee() {
110
+ var o;
111
+ (o = e.value) == null || o.bodyList.push({
112
+ label: "",
113
+ value: ""
114
+ });
115
+ }
116
+ function ae(o) {
117
+ e.value.bodyList.splice(o, 1);
118
+ }
119
+ ue(() => {
120
+ b.value = JSON.parse(JSON.stringify(f.getSourceData()));
121
+ }), q.on("updateSource", (o) => {
122
+ b.value = JSON.parse(JSON.stringify(f.getSourceData()));
123
+ });
124
+ async function le() {
125
+ P.value.validate(async (o) => {
126
+ if (o)
127
+ try {
128
+ const l = {};
129
+ e.value.paramsList.forEach((i) => {
130
+ l[i.label] = i.value;
131
+ });
132
+ const d = {};
133
+ e.value.bodyList.forEach((i) => {
134
+ d[i.label] = i.value;
135
+ });
136
+ const S = {};
137
+ e.value.headerList.forEach((i) => {
138
+ S[i.label] = i.value;
139
+ });
140
+ let g = await se({
141
+ method: e.value.method,
142
+ // url: formData.value.url,
143
+ // url: "http://localhost:3333/users",
144
+ url: e.value.url,
145
+ params: l,
146
+ data: d,
147
+ headers: {
148
+ ...S,
149
+ Authorization: "Bearer " + ie.get("Admin-Token")
150
+ }
151
+ });
152
+ if (e.value.dataPath) {
153
+ const E = e.value.dataPath.split(".").reduce((k, r) => k[r], g.data);
154
+ E && E.length ? L({
155
+ message: E.map((k) => ({
156
+ label: k[e.value.dataKey],
157
+ value: k[e.value.dataValue]
158
+ }))
159
+ }) : L.info(u("configError"));
160
+ } else
161
+ g.data && g.data.length ? L({
162
+ message: g.data.map((i) => ({
163
+ label: i[e.value.dataKey],
164
+ value: i[e.value.dataValue]
165
+ }))
166
+ }) : L.info(u("configError"));
167
+ } catch {
168
+ L.error(u("requestFailed"));
169
+ } finally {
170
+ }
171
+ else
172
+ L.error(u("fillRequiredFields"));
173
+ });
174
+ }
175
+ async function K() {
176
+ e.value.body = e.value.bodyList.reduce((o, l) => (o[l.label] = l.value, o), {}), e.value.params = e.value.paramsList.reduce(
177
+ (o, l) => (o[l.label] = l.value, o),
178
+ {}
179
+ ), e.value.headers = e.value.headerList.reduce(
180
+ (o, l) => (o[l.label] = l.value, o),
181
+ {}
182
+ ), P.value.validate((o) => {
183
+ o ? e.value.id ? (q.emit("updateSourceData", {
184
+ ...e.value,
185
+ body: JSON.stringify(e.value.body),
186
+ params: JSON.stringify(e.value.params),
187
+ headers: JSON.stringify(e.value.headers)
188
+ }), e.value = {}) : (q.emit("saveSourceData", {
189
+ ...e.value,
190
+ body: JSON.stringify(e.value.body),
191
+ params: JSON.stringify(e.value.params),
192
+ headers: JSON.stringify(e.value.headers)
193
+ }), e.value = {}) : L.warning(u("completeFormFirst"));
194
+ });
195
+ }
196
+ return (o, l) => (m(), p("div", ce, [
197
+ t(a(y), {
198
+ class: "btn",
199
+ onClick: j
200
+ }, {
201
+ default: s(() => [
202
+ t(a(_), {
203
+ name: "icon--epic--window-outline",
204
+ class: "mr-4px"
205
+ }),
206
+ n("span", null, v(a(u)("configuration")), 1),
207
+ n("span", me, v(M.value || b.value.length), 1)
208
+ ]),
209
+ _: 1
210
+ }),
211
+ t(a(x), {
212
+ size: 960,
213
+ modelValue: T.value,
214
+ "onUpdate:modelValue": l[7] || (l[7] = (d) => T.value = d),
215
+ "append-to-body": "",
216
+ title: a(u)("dataSources")
217
+ }, {
218
+ default: s(() => [
219
+ n("div", pe, [
220
+ n("div", ve, [
221
+ t(a(y), {
222
+ type: "primary",
223
+ class: "btn",
224
+ onClick: z
225
+ }, {
226
+ default: s(() => [
227
+ t(a(_), {
228
+ name: "icon--epic--add-rounded",
229
+ class: "mr-4px"
230
+ }),
231
+ n("span", null, v(a(u)("addDataSource")), 1)
232
+ ]),
233
+ _: 1
234
+ }),
235
+ n("div", null, [
236
+ (m(!0), p(D, null, J(b.value, (d) => {
237
+ var S;
238
+ return m(), p("div", {
239
+ class: de(["source-item", { active: d.id === ((S = e.value) == null ? void 0 : S.id) }]),
240
+ key: d.id,
241
+ onClick: (g) => H(d.id)
242
+ }, [
243
+ n("div", he, [
244
+ n("div", {
245
+ style: re({
246
+ color: A[d.method.toLocaleUpperCase()]
247
+ })
248
+ }, v(d.method.toLocaleUpperCase()), 5),
249
+ n("div", null, v(d.apiName), 1)
250
+ ]),
251
+ n("div", {
252
+ onClick: (g) => Q(d.id),
253
+ class: "source-item-icon"
254
+ }, [
255
+ t(a(_), { name: "icon--epic--delete-outline-rounded" })
256
+ ], 8, ye)
257
+ ], 10, fe);
258
+ }), 128))
259
+ ])
260
+ ]),
261
+ n("div", be, [
262
+ n("div", ge, [
263
+ !e.value || !Object.keys(e.value).length ? (m(), p("div", Ve, v(a(u)("pleaseSelectDataSource")), 1)) : (m(), p("div", _e, [
264
+ t(a(F), {
265
+ ref_key: "ruleFormRef",
266
+ ref: P,
267
+ model: e.value,
268
+ "label-position": "top",
269
+ rules: $,
270
+ "label-width": 120
271
+ }, {
272
+ default: s(() => {
273
+ var d, S, g, i, E, k;
274
+ return [
275
+ t(a(N), {
276
+ prop: "apiName",
277
+ label: a(u)("apiName")
278
+ }, {
279
+ default: s(() => [
280
+ t(a(h), {
281
+ clearable: "",
282
+ modelValue: e.value.apiName,
283
+ "onUpdate:modelValue": l[0] || (l[0] = (r) => e.value.apiName = r),
284
+ placeholder: a(u)("pleaseEnterApiName")
285
+ }, null, 8, ["modelValue", "placeholder"])
286
+ ]),
287
+ _: 1
288
+ }, 8, ["label"]),
289
+ t(a(N), {
290
+ prop: "url",
291
+ label: a(u)("requestUrl")
292
+ }, {
293
+ default: s(() => [
294
+ t(a(h), {
295
+ modelValue: e.value.url,
296
+ "onUpdate:modelValue": l[1] || (l[1] = (r) => e.value.url = r),
297
+ clearable: "",
298
+ placeholder: a(u)("pleaseEnterRequestUrl")
299
+ }, null, 8, ["modelValue", "placeholder"])
300
+ ]),
301
+ _: 1
302
+ }, 8, ["label"]),
303
+ t(a(N), {
304
+ label: a(u)("requestMethod"),
305
+ required: ""
306
+ }, {
307
+ default: s(() => [
308
+ t(a(B), {
309
+ modelValue: e.value.method,
310
+ "onUpdate:modelValue": l[2] || (l[2] = (r) => e.value.method = r)
311
+ }, {
312
+ default: s(() => [
313
+ t(a(U), {
314
+ label: "GET",
315
+ value: "get"
316
+ }, {
317
+ default: s(() => l[8] || (l[8] = [
318
+ V("GET")
319
+ ])),
320
+ _: 1
321
+ }),
322
+ t(a(U), {
323
+ label: "POST",
324
+ value: "post"
325
+ }, {
326
+ default: s(() => l[9] || (l[9] = [
327
+ V("POST")
328
+ ])),
329
+ _: 1
330
+ }),
331
+ t(a(U), {
332
+ label: "PUT",
333
+ value: "put"
334
+ }, {
335
+ default: s(() => l[10] || (l[10] = [
336
+ V("PUT")
337
+ ])),
338
+ _: 1
339
+ }),
340
+ t(a(U), {
341
+ label: "DELETE",
342
+ value: "delete"
343
+ }, {
344
+ default: s(() => l[11] || (l[11] = [
345
+ V("DELETE")
346
+ ])),
347
+ _: 1
348
+ })
349
+ ]),
350
+ _: 1
351
+ }, 8, ["modelValue"])
352
+ ]),
353
+ _: 1
354
+ }, 8, ["label"]),
355
+ n("div", Se, [
356
+ t(a(N), {
357
+ prop: "dataKey",
358
+ style: { width: "30%" },
359
+ label: a(u)("labelKey")
360
+ }, {
361
+ default: s(() => [
362
+ t(a(h), {
363
+ modelValue: e.value.dataKey,
364
+ "onUpdate:modelValue": l[3] || (l[3] = (r) => e.value.dataKey = r),
365
+ clearable: "",
366
+ placeholder: a(u)("pleaseEnterLabelKey")
367
+ }, null, 8, ["modelValue", "placeholder"])
368
+ ]),
369
+ _: 1
370
+ }, 8, ["label"]),
371
+ t(a(N), {
372
+ prop: "dataValue",
373
+ style: { width: "30%" },
374
+ label: a(u)("valueKey")
375
+ }, {
376
+ default: s(() => [
377
+ t(a(h), {
378
+ modelValue: e.value.dataValue,
379
+ "onUpdate:modelValue": l[4] || (l[4] = (r) => e.value.dataValue = r),
380
+ clearable: "",
381
+ placeholder: a(u)("pleaseEnterValueKey")
382
+ }, null, 8, ["modelValue", "placeholder"])
383
+ ]),
384
+ _: 1
385
+ }, 8, ["label"]),
386
+ t(a(N), {
387
+ style: { width: "33%" },
388
+ label: a(u)("dataPath")
389
+ }, {
390
+ default: s(() => [
391
+ t(a(h), {
392
+ modelValue: e.value.dataPath,
393
+ "onUpdate:modelValue": l[5] || (l[5] = (r) => e.value.dataPath = r),
394
+ clearable: "",
395
+ placeholder: a(u)("nestedPath")
396
+ }, null, 8, ["modelValue", "placeholder"])
397
+ ]),
398
+ _: 1
399
+ }, 8, ["label"])
400
+ ]),
401
+ n("div", ke, [
402
+ n("div", Le, [
403
+ n("div", null, v(a(u)("requestParams")), 1),
404
+ t(a(y), {
405
+ onClick: W,
406
+ text: "",
407
+ type: "primary",
408
+ class: "btn"
409
+ }, {
410
+ default: s(() => [
411
+ t(a(_), { name: "icon--epic--add-rounded" }),
412
+ V(" " + v(a(u)("add")), 1)
413
+ ]),
414
+ _: 1
415
+ })
416
+ ]),
417
+ (d = e.value) != null && d.paramsList && ((S = e.value) != null && S.paramsList.length) ? (m(), p("div", Ne, [
418
+ (m(!0), p(D, null, J(e.value.paramsList, (r, w) => (m(), p("div", {
419
+ class: "content-item",
420
+ key: r.value
421
+ }, [
422
+ t(a(h), {
423
+ modelValue: r.label,
424
+ "onUpdate:modelValue": (c) => r.label = c,
425
+ filterable: "",
426
+ "allow-create": "",
427
+ style: { width: "42%" },
428
+ options: C,
429
+ placeholder: a(u)("paramName")
430
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
431
+ t(a(h), {
432
+ modelValue: r.value,
433
+ "onUpdate:modelValue": (c) => r.value = c,
434
+ filterable: "",
435
+ "allow-create": "",
436
+ style: { width: "42%" },
437
+ options: C,
438
+ placeholder: a(u)("paramValue")
439
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
440
+ t(a(y), {
441
+ onClick: (c) => X(w),
442
+ type: "danger",
443
+ circle: ""
444
+ }, {
445
+ default: s(() => [
446
+ t(a(_), {
447
+ style: { color: "#fff" },
448
+ name: "icon--epic--delete-outline-rounded"
449
+ })
450
+ ]),
451
+ _: 2
452
+ }, 1032, ["onClick"])
453
+ ]))), 128))
454
+ ])) : R("", !0)
455
+ ]),
456
+ n("div", Ce, [
457
+ n("div", Ee, [
458
+ n("div", null, v(a(u)("requestHeaders")), 1),
459
+ t(a(y), {
460
+ onClick: Y,
461
+ text: "",
462
+ type: "primary",
463
+ class: "btn"
464
+ }, {
465
+ default: s(() => [
466
+ t(a(_), { name: "icon--epic--add-rounded" }),
467
+ V(" " + v(a(u)("add")), 1)
468
+ ]),
469
+ _: 1
470
+ })
471
+ ]),
472
+ (g = e.value) != null && g.headerList && ((i = e.value) != null && i.headerList.length) ? (m(), p("div", we, [
473
+ (m(!0), p(D, null, J(e.value.headerList, (r, w) => (m(), p("div", {
474
+ class: "content-item",
475
+ key: w
476
+ }, [
477
+ t(a(h), {
478
+ modelValue: r.label,
479
+ "onUpdate:modelValue": (c) => r.label = c,
480
+ filterable: "",
481
+ "allow-create": "",
482
+ style: { width: "42%" },
483
+ options: C,
484
+ placeholder: a(u)("paramName")
485
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
486
+ t(a(h), {
487
+ modelValue: r.value,
488
+ "onUpdate:modelValue": (c) => r.value = c,
489
+ filterable: "",
490
+ "allow-create": "",
491
+ style: { width: "42%" },
492
+ options: C,
493
+ placeholder: a(u)("paramValue")
494
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
495
+ t(a(y), {
496
+ onClick: (c) => Z(w),
497
+ type: "danger",
498
+ circle: ""
499
+ }, {
500
+ default: s(() => [
501
+ t(a(_), {
502
+ style: { color: "#fff" },
503
+ name: "icon--epic--delete-outline-rounded"
504
+ })
505
+ ]),
506
+ _: 2
507
+ }, 1032, ["onClick"])
508
+ ]))), 128))
509
+ ])) : R("", !0)
510
+ ]),
511
+ n("div", Oe, [
512
+ n("div", Ue, [
513
+ n("div", null, v(a(u)("requestBody")), 1),
514
+ t(a(y), {
515
+ onClick: ee,
516
+ text: "",
517
+ type: "primary",
518
+ class: "btn"
519
+ }, {
520
+ default: s(() => [
521
+ t(a(_), { name: "icon--epic--add-rounded" }),
522
+ V(" " + v(a(u)("add")), 1)
523
+ ]),
524
+ _: 1
525
+ })
526
+ ]),
527
+ (E = e.value) != null && E.bodyList && ((k = e.value) != null && k.bodyList.length) ? (m(), p("div", De, [
528
+ (m(!0), p(D, null, J(e.value.bodyList, (r, w) => (m(), p("div", {
529
+ class: "content-item",
530
+ key: w
531
+ }, [
532
+ t(a(h), {
533
+ modelValue: r.label,
534
+ "onUpdate:modelValue": (c) => r.label = c,
535
+ filterable: "",
536
+ "allow-create": "",
537
+ style: { width: "42%" },
538
+ options: C,
539
+ placeholder: a(u)("paramName")
540
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
541
+ t(a(h), {
542
+ modelValue: r.value,
543
+ "onUpdate:modelValue": (c) => r.value = c,
544
+ filterable: "",
545
+ "allow-create": "",
546
+ style: { width: "42%" },
547
+ options: C,
548
+ placeholder: a(u)("paramValue")
549
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
550
+ t(a(y), {
551
+ onClick: l[6] || (l[6] = (c) => ae(o.i)),
552
+ type: "danger",
553
+ circle: ""
554
+ }, {
555
+ default: s(() => [
556
+ t(a(_), {
557
+ style: { color: "#fff" },
558
+ name: "icon--epic--delete-outline-rounded"
559
+ })
560
+ ]),
561
+ _: 1
562
+ })
563
+ ]))), 128))
564
+ ])) : R("", !0)
565
+ ]),
566
+ n("div", Je, [
567
+ t(a(y), {
568
+ type: "info",
569
+ onClick: le
570
+ }, {
571
+ default: s(() => [
572
+ V(v(a(u)("requestTest")), 1)
573
+ ]),
574
+ _: 1
575
+ }),
576
+ t(a(y), {
577
+ type: "primary",
578
+ onClick: K
579
+ }, {
580
+ default: s(() => [
581
+ V(v(a(u)("save")), 1)
582
+ ]),
583
+ _: 1
584
+ })
585
+ ])
586
+ ];
587
+ }),
588
+ _: 1
589
+ }, 8, ["model", "rules"])
590
+ ]))
591
+ ])
592
+ ])
593
+ ])
594
+ ]),
595
+ _: 1
596
+ }, 8, ["modelValue", "title"])
597
+ ]));
598
+ }
599
+ });
600
+ export {
601
+ Be as default
602
+ };