epic-designer-gold 1.0.24 → 1.0.26
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.
- package/dist/{attributeView-BBN4W9TM.js → attributeView-CFfmxcU9.js} +1 -1
- package/dist/{attributeView-gzxLavkO.cjs → attributeView-DZE3sT--.cjs} +1 -1
- package/dist/{index-BokMTYeM.js → index-BA7FMts9.js} +1 -1
- package/dist/{index-D50jfb6U.cjs → index-BLihjCNa.cjs} +1 -1
- package/dist/{index-ClvhnVWp.cjs → index-Bhxsxvjz.cjs} +1 -1
- package/dist/index-Btz7ejRx.cjs +10 -0
- package/dist/{index-CSX7EJ3h.cjs → index-C6FCo-HH.cjs} +1 -1
- package/dist/{index-4GSgwHdx.cjs → index-Cdk7yCxQ.cjs} +1 -1
- package/dist/{index-hOLbkmql.js → index-CjOFrMw5.js} +1 -1
- package/dist/{index-CItH08Va.js → index-CzAoXJXL.js} +1 -1
- package/dist/{index-DrBumgPi.js → index-D0AvdGjo.js} +1 -1
- package/dist/{index-BBYobbqk.cjs → index-D79BnQLI.cjs} +1 -1
- package/dist/{index-rQwg6K9E.js → index-D83uXkXA.js} +314 -308
- package/dist/index-DGRQyNXm.js +4 -0
- package/dist/{index-BAUyJdDp.cjs → index-DOZDUgRO.cjs} +1 -1
- package/dist/{index-B7wRhLwc.js → index-Dk08eIJW.js} +1 -1
- package/dist/{index-Cy4M38xz.cjs → index-DzGAy8Ku.cjs} +1 -1
- package/dist/{index-CKI_3hdd.cjs → index-LMTPTgvs.cjs} +1 -1
- package/dist/{index-CNtDbtWP.js → index-jj4e1UZY.js} +1 -1
- package/dist/{index-BUt-kkII.js → index-y2l3KPim.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{selectPage-DoF_EREC.cjs → selectPage-CBIYwH5Q.cjs} +1 -1
- package/dist/{selectPage-DU5m5Bop.js → selectPage-D7EWbQEt.js} +34 -28
- package/dist/style.css +1 -1
- package/dist/{styleView-DN0aAYgR.js → styleView-BqdHZS9i.js} +1 -1
- package/dist/{styleView-D3pbuMzI.cjs → styleView-BymvZDlS.cjs} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-5XsDINLZ.js +0 -4
- package/dist/index-CDH3QO51.cjs +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./pluginManager-DWHAX8kP.cjs"),I=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),B=require("./vuedraggable.umd-BqhSJIAi.cjs"),S=require("./tree.vue_vue_type_script_setup_true_lang-VGvT-OYl.cjs"),$=require("./index-CDH3QO51.cjs"),w={class:"epic-event-info"},M=["title"],O={class:"epic-event-btn text-lg flex items-center text-$epic-text-secondary"},A={class:"epic-action-editor-main"},U={class:"epic-editor-item rounded"},D={class:"w-36px flex items-center text-lg"},j={class:"flex-1"},L={key:0},K={key:1},R={key:2},T={class:"epic-action-box text-lg text-$epic-text-medium"},q=["onClick"],F=["onClick"],z=e.defineComponent({__name:"EActionEditorItem",props:{itemEvents:{type:Array,default:()=>[]},allEvents:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>[]},events:{type:Object,default:()=>({})}},emits:["add","edit","update:modelValue"],setup(k,{emit:E}){const m=k,h=E,v=e.inject("pageSchema");function V(p){h("add",p)}function f(p){return y.findSchemaById(v.schemas,p).label}function u(p,i){var t;const a=o(i);a[i]=m.events[i].filter((N,x)=>p!==x),(t=a[i])!=null&&t.length||delete a[i],h("update:modelValue",a)}function r(p,i,a){h("edit",p,i,a)}function o(p){const i={};return m.allEvents.forEach(a=>{if(!m.events[a.type].length||a.type===p)return!1;i[a.type]=m.events[a.type]}),i}return(p,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.itemEvents,a=>(e.openBlock(),e.createElementBlock("div",{key:a.type,class:"epic-event-item"},[e.createElementVNode("div",w,[e.createElementVNode("div",{class:"epic-event-label",title:a.describe},e.toDisplayString(a.describe),9,M),e.createElementVNode("div",O,[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--add-rounded",onClick:t=>V(a.type)},null,8,["onClick"])])]),e.createElementVNode("div",A,[e.createVNode(e.unref(B.draggable),{modelValue:m.events[a.type],"onUpdate:modelValue":t=>m.events[a.type]=t,"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:t,index:N})=>[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createVNode(e.unref(I._sfc_main),{class:"mr-2 text-lg cursor-move handle text-$epic-text-medium",name:"icon--epic--drag"})]),e.createElementVNode("div",j,[t.type==="component"?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(f(t.componentId)),1)):t.type==="custom"?(e.openBlock(),e.createElementBlock("div",K," 自定义函数 ")):t.type==="public"?(e.openBlock(),e.createElementBlock("div",R," 公共函数 ")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.methodName),1)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"epic-edit-btn",onClick:x=>r(N,a.type,t)},[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--page-info-outline-rounded"})],8,q),e.createElementVNode("div",{class:"epic-del-btn",onClick:x=>u(N,a.type)},[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,F)])])]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128))}}),J={class:"h-full flex flex-col"},P=e.defineComponent({__name:"EScriptEdit",setup(k){const E=y.pluginManager.getComponent("monacoEditor"),m={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1}},h=e.ref(null),v=e.inject("pageSchema");return(V,f)=>(e.openBlock(),e.createElementBlock("div",J,[f[1]||(f[1]=e.createElementVNode("div",{class:"pb-2"}," 自定义函数编辑 ",-1)),e.createVNode(e.unref(E),{ref_key:"monacoEditorRef",ref:h,autoToggleTheme:"",modelValue:e.unref(v).script,"onUpdate:modelValue":f[0]||(f[0]=u=>e.unref(v).script=u),class:"epic-editor flex-1",config:m,language:"javascript"},null,8,["modelValue"])]))}}),G={class:"epic-attribute-view"},H=["title"],Q={class:"epic-attr-input"},W=e.defineComponent({__name:"EArgsEditor",props:{modelValue:{},actionArgsConfigs:{}},emits:["update:modelValue"],setup(k,{emit:E}){const m=k,h=E,v=e.computed(()=>m.modelValue?JSON.parse(m.modelValue):[]);function V(u){var r;return typeof u.show=="boolean"?u.show:typeof u.show=="function"?(r=u.show)==null?void 0:r.call(u,{values:v.value}):!0}function f(u,r){const o=[...JSON.parse(m.modelValue??"[]")];o[r]=u,h("update:modelValue",JSON.stringify(o))}return(u,r)=>(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.actionArgsConfigs,o=>(e.openBlock(),e.createElementBlock("div",{key:o.field+o.type},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-item",o.layout])},[e.createElementVNode("div",{class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,H),e.createElementVNode("div",Q,[e.createVNode(e.unref($._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":v.value[o.field],"onUpdate:modelValue":p=>f(p,o.field)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2),[[e.vShow,V(o)]])]))),128))]))}}),X={class:"rounded epic-modal-action-main"},Y={class:"epic-modal-left-panel h-full flex flex-col"},Z={class:"flex flex-1 h-0 flex-col"},ee={class:"flex-1 h-0"},te={class:"epic-action-select h-30/100 flex flex-col"},ne={class:"flex-1 overflow-auto pr-8px"},oe=["onClick"],le={class:"text-center pt-42px text-gray-400"},ae={class:"epic-modal-right-panel"},ce={key:1,class:"text-center pt-42px text-gray-400"},se=e.defineComponent({__name:"EActionModal",emits:["add","edit"],setup(k,{expose:E,emit:m}){const h=y.pluginManager.getComponent("modal"),v=e.ref(!0),V=e.inject("pageSchema"),f=e.inject("pageManager",{}),u=e.ref(!1),r=e.ref([]),o=e.ref(null),p=m,i=e.computed(()=>{var l;return t.actionItem.type==="component"?o.value?(l=y.pluginManager.getComponentConfings()[o.value.type].config.action)==null?void 0:l.map(n=>({label:n.describe,value:n.type})):[]:t.actionItem.type==="custom"?Object.entries(f.funcs.value).filter(([n,_])=>typeof _=="function").map(([n])=>({label:n,value:n})):t.actionItem.type==="public"?Object.entries(y.pluginManager.publicMethods).map(([n])=>({label:n,value:n})):[]}),a=e.computed(()=>{if(t.actionItem.type==="component"&&o.value){const l=y.pluginManager.getComponentConfings()[o.value.type].config.action,n=l==null?void 0:l.find(_=>_.type===t.actionItem.methodName);if(n!=null&&n.argsConfigs){const _=n.argsConfigs.findIndex(g=>g.label==="设置数据");_!==-1&&(n.argsConfigs[_]={...o.value,label:"设置数据",field:"0",id:y.getUUID()})}return(n==null?void 0:n.argsConfigs)??[]}return[]}),t=e.reactive({actionItem:{type:"custom",methodName:"test",componentId:null},cacheData:{}});function N(){var l;u.value=!0,v.value=!0,t.actionItem.type="custom",t.actionItem.componentId=null,(l=i.value)!=null&&l.length&&d(i.value[0].value)}function x(l){if(u.value=!0,v.value=!1,o.value=null,l.componentId){const n=y.findSchemaById(V.schemas,l.componentId);o.value=n,r.value=[l.componentId]}e.nextTick(()=>{t.actionItem.componentId=l.componentId,t.actionItem.methodName=l.methodName,t.actionItem.type=l.type,t.actionItem.args=l.args})}function b(){if(!t.actionItem.methodName){alert("请先选择动作方法");return}p(v.value?"add":"edit",y.deepClone(e.toRaw(t.actionItem))),C()}function C(){u.value=!1,r.value=[],t.cacheData={}}function s(l){var n;t.actionItem.componentId=null,t.actionItem.type=l,o.value=null,t.actionItem.methodName=null,r.value=[],(n=i.value)!=null&&n.length&&d(i.value[0].value)}function c(l){var n;t.actionItem.args&&(t.cacheData[t.actionItem.componentId+t.actionItem.methodName]=t.actionItem.args),t.actionItem.componentId=l.id,t.actionItem.type="component",t.actionItem.methodName=null,o.value=l.componentSchema,(n=i.value)!=null&&n.length&&d(i.value[0].value)}function d(l){t.actionItem.methodName=l,t.actionItem.args=t.cacheData[t.actionItem.componentId+t.actionItem.methodName]}return E({handleOpen:N,handleOpenEdit:x}),(l,n)=>(e.openBlock(),e.createBlock(e.unref(h),{modelValue:u.value,"onUpdate:modelValue":n[4]||(n[4]=_=>u.value=_),class:"w-1200px",width:"1200px",onClose:C,onOk:b,title:"动作配置"},{default:e.withCtx(()=>{var _;return[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="custom"}]),onClick:n[0]||(n[0]=g=>s("custom"))}," 自定义函数 ",2),e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="public"}]),onClick:n[1]||(n[1]=g=>s("public"))}," 公共函数 ",2),n[5]||(n[5]=e.createTextVNode(" 组件 ")),e.createElementVNode("div",ee,[e.createVNode(e.unref(S._sfc_main),{selectedKeys:r.value,"onUpdate:selectedKeys":n[2]||(n[2]=g=>r.value=g),options:e.unref(V).schemas,onNodeClick:c},null,8,["selectedKeys","options"])])]),e.createElementVNode("div",te,[n[6]||(n[6]=e.createElementVNode("div",{class:"mb-2"},"动作选择",-1)),e.createElementVNode("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,g=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{checked:g.value===t.actionItem.methodName},"epic-action-item"]),onClick:de=>d(g.value),key:g.value},[e.createElementVNode("span",null,e.toDisplayString(g.label),1)],10,oe))),128)),e.withDirectives(e.createElementVNode("div",le," 当前组件暂无动作 ",512),[[e.vShow,!((_=i.value)!=null&&_.length)]])])])]),e.createElementVNode("div",ae,[t.actionItem.type==="custom"?(e.openBlock(),e.createBlock(P,{key:0})):a.value.length===0?(e.openBlock(),e.createElementBlock("div",ce," 暂无配置 ")):(e.openBlock(),e.createBlock(W,{key:2,modelValue:t.actionItem.args,"onUpdate:modelValue":n[3]||(n[3]=g=>t.actionItem.args=g),actionArgsConfigs:a.value},null,8,["modelValue","actionArgsConfigs"]))])])]}),_:1},8,["modelValue"]))}}),ie=e.defineComponent({__name:"index",props:{eventList:{type:Array,default:()=>[]},modelValue:{type:Object}},emits:["update:modelValue"],setup(k,{emit:E}){const m=y.pluginManager.getComponent("Collapse"),h=y.pluginManager.getComponent("CollapseItem"),v=e.ref(null);let V=0;const f=k,u=E,r=e.computed({get(){return f.modelValue},set(s){u("update:modelValue",s)}}),o=e.ref([]),p=e.computed(()=>f.eventList.filter(s=>s.events.length)),i=e.computed(()=>f.eventList.map(s=>s.events).flat()),a=e.ref({});i.value.forEach(s=>{a.value[s.type]=e.computed({get(){var c;return((c=r.value)==null?void 0:c[s.type])??[]},set(c){c&&c.length?r.value[s.type]=c.map(d=>e.toRaw(d)):delete r.value[s.type]}})}),e.watch(()=>p.value,s=>{s.length&&(o.value=s.filter(c=>{for(let d=0;d<c.events.length;d++){const l=c.events[d].type;if(a.value[l].length)return!0}return!1}).map(c=>c.title))},{immediate:!0});let t="";function N(s){var c;(c=v.value)==null||c.handleOpen(),t=s}function x(s,c,d){var l;(l=v.value)==null||l.handleOpenEdit(d),V=s,t=c}function b(s){a.value[t][V]=s,r.value[t]=[...a.value[t]??[]]}function C(s){if(!r.value){r.value={[t]:[...a.value[t]??[],s]};return}r.value[t]=[...a.value[t]??[],s]}return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m),{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=d=>o.value=d),activeKey:o.value,"onUpdate:activeKey":c[2]||(c[2]=d=>o.value=d),"expanded-names":o.value,"onUpdate:expandedNames":c[3]||(c[3]=d=>o.value=d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,d=>(e.openBlock(),e.createBlock(e.unref(h),{key:d.title,title:d.title,header:d.title,name:d.title},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=l=>r.value=l),"item-events":d.events,"all-events":i.value,events:a.value,onAdd:N,onEdit:x},null,8,["modelValue","item-events","all-events","events"])]),_:2},1032,["title","header","name"]))),128))]),_:1},8,["modelValue","activeKey","expanded-names"]),e.createVNode(se,{ref_key:"EActionModalRef",ref:v,onAdd:C,onEdit:b},null,512)],64))}});exports.default=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./pluginManager-DWHAX8kP.cjs"),I=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),B=require("./vuedraggable.umd-BqhSJIAi.cjs"),S=require("./tree.vue_vue_type_script_setup_true_lang-VGvT-OYl.cjs"),$=require("./index-Btz7ejRx.cjs"),w={class:"epic-event-info"},M=["title"],O={class:"epic-event-btn text-lg flex items-center text-$epic-text-secondary"},A={class:"epic-action-editor-main"},U={class:"epic-editor-item rounded"},D={class:"w-36px flex items-center text-lg"},j={class:"flex-1"},L={key:0},K={key:1},R={key:2},T={class:"epic-action-box text-lg text-$epic-text-medium"},q=["onClick"],F=["onClick"],z=e.defineComponent({__name:"EActionEditorItem",props:{itemEvents:{type:Array,default:()=>[]},allEvents:{type:Array,default:()=>[]},modelValue:{type:Object,default:()=>[]},events:{type:Object,default:()=>({})}},emits:["add","edit","update:modelValue"],setup(k,{emit:E}){const m=k,h=E,v=e.inject("pageSchema");function V(p){h("add",p)}function f(p){return y.findSchemaById(v.schemas,p).label}function u(p,i){var t;const a=o(i);a[i]=m.events[i].filter((N,x)=>p!==x),(t=a[i])!=null&&t.length||delete a[i],h("update:modelValue",a)}function r(p,i,a){h("edit",p,i,a)}function o(p){const i={};return m.allEvents.forEach(a=>{if(!m.events[a.type].length||a.type===p)return!1;i[a.type]=m.events[a.type]}),i}return(p,i)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.itemEvents,a=>(e.openBlock(),e.createElementBlock("div",{key:a.type,class:"epic-event-item"},[e.createElementVNode("div",w,[e.createElementVNode("div",{class:"epic-event-label",title:a.describe},e.toDisplayString(a.describe),9,M),e.createElementVNode("div",O,[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--add-rounded",onClick:t=>V(a.type)},null,8,["onClick"])])]),e.createElementVNode("div",A,[e.createVNode(e.unref(B.draggable),{modelValue:m.events[a.type],"onUpdate:modelValue":t=>m.events[a.type]=t,"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:t,index:N})=>[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createVNode(e.unref(I._sfc_main),{class:"mr-2 text-lg cursor-move handle text-$epic-text-medium",name:"icon--epic--drag"})]),e.createElementVNode("div",j,[t.type==="component"?(e.openBlock(),e.createElementBlock("div",L,e.toDisplayString(f(t.componentId)),1)):t.type==="custom"?(e.openBlock(),e.createElementBlock("div",K," 自定义函数 ")):t.type==="public"?(e.openBlock(),e.createElementBlock("div",R," 公共函数 ")):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.methodName),1)]),e.createElementVNode("div",T,[e.createElementVNode("div",{class:"epic-edit-btn",onClick:x=>r(N,a.type,t)},[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--page-info-outline-rounded"})],8,q),e.createElementVNode("div",{class:"epic-del-btn",onClick:x=>u(N,a.type)},[e.createVNode(e.unref(I._sfc_main),{name:"icon--epic--delete-outline-rounded"})],8,F)])])]),_:2},1032,["modelValue","onUpdate:modelValue"])])]))),128))}}),J={class:"h-full flex flex-col"},P=e.defineComponent({__name:"EScriptEdit",setup(k){const E=y.pluginManager.getComponent("monacoEditor"),m={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1}},h=e.ref(null),v=e.inject("pageSchema");return(V,f)=>(e.openBlock(),e.createElementBlock("div",J,[f[1]||(f[1]=e.createElementVNode("div",{class:"pb-2"}," 自定义函数编辑 ",-1)),e.createVNode(e.unref(E),{ref_key:"monacoEditorRef",ref:h,autoToggleTheme:"",modelValue:e.unref(v).script,"onUpdate:modelValue":f[0]||(f[0]=u=>e.unref(v).script=u),class:"epic-editor flex-1",config:m,language:"javascript"},null,8,["modelValue"])]))}}),G={class:"epic-attribute-view"},H=["title"],Q={class:"epic-attr-input"},W=e.defineComponent({__name:"EArgsEditor",props:{modelValue:{},actionArgsConfigs:{}},emits:["update:modelValue"],setup(k,{emit:E}){const m=k,h=E,v=e.computed(()=>m.modelValue?JSON.parse(m.modelValue):[]);function V(u){var r;return typeof u.show=="boolean"?u.show:typeof u.show=="function"?(r=u.show)==null?void 0:r.call(u,{values:v.value}):!0}function f(u,r){const o=[...JSON.parse(m.modelValue??"[]")];o[r]=u,h("update:modelValue",JSON.stringify(o))}return(u,r)=>(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.actionArgsConfigs,o=>(e.openBlock(),e.createElementBlock("div",{key:o.field+o.type},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["epic-attr-item",o.layout])},[e.createElementVNode("div",{class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,H),e.createElementVNode("div",Q,[e.createVNode(e.unref($._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":v.value[o.field],"onUpdate:modelValue":p=>f(p,o.field)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2),[[e.vShow,V(o)]])]))),128))]))}}),X={class:"rounded epic-modal-action-main"},Y={class:"epic-modal-left-panel h-full flex flex-col"},Z={class:"flex flex-1 h-0 flex-col"},ee={class:"flex-1 h-0"},te={class:"epic-action-select h-30/100 flex flex-col"},ne={class:"flex-1 overflow-auto pr-8px"},oe=["onClick"],le={class:"text-center pt-42px text-gray-400"},ae={class:"epic-modal-right-panel"},ce={key:1,class:"text-center pt-42px text-gray-400"},se=e.defineComponent({__name:"EActionModal",emits:["add","edit"],setup(k,{expose:E,emit:m}){const h=y.pluginManager.getComponent("modal"),v=e.ref(!0),V=e.inject("pageSchema"),f=e.inject("pageManager",{}),u=e.ref(!1),r=e.ref([]),o=e.ref(null),p=m,i=e.computed(()=>{var l;return t.actionItem.type==="component"?o.value?(l=y.pluginManager.getComponentConfings()[o.value.type].config.action)==null?void 0:l.map(n=>({label:n.describe,value:n.type})):[]:t.actionItem.type==="custom"?Object.entries(f.funcs.value).filter(([n,_])=>typeof _=="function").map(([n])=>({label:n,value:n})):t.actionItem.type==="public"?Object.entries(y.pluginManager.publicMethods).map(([n])=>({label:n,value:n})):[]}),a=e.computed(()=>{if(t.actionItem.type==="component"&&o.value){const l=y.pluginManager.getComponentConfings()[o.value.type].config.action,n=l==null?void 0:l.find(_=>_.type===t.actionItem.methodName);if(n!=null&&n.argsConfigs){const _=n.argsConfigs.findIndex(g=>g.label==="设置数据");_!==-1&&(n.argsConfigs[_]={...o.value,label:"设置数据",field:"0",id:y.getUUID()})}return(n==null?void 0:n.argsConfigs)??[]}return[]}),t=e.reactive({actionItem:{type:"custom",methodName:"test",componentId:null},cacheData:{}});function N(){var l;u.value=!0,v.value=!0,t.actionItem.type="custom",t.actionItem.componentId=null,(l=i.value)!=null&&l.length&&d(i.value[0].value)}function x(l){if(u.value=!0,v.value=!1,o.value=null,l.componentId){const n=y.findSchemaById(V.schemas,l.componentId);o.value=n,r.value=[l.componentId]}e.nextTick(()=>{t.actionItem.componentId=l.componentId,t.actionItem.methodName=l.methodName,t.actionItem.type=l.type,t.actionItem.args=l.args})}function b(){if(!t.actionItem.methodName){alert("请先选择动作方法");return}p(v.value?"add":"edit",y.deepClone(e.toRaw(t.actionItem))),C()}function C(){u.value=!1,r.value=[],t.cacheData={}}function s(l){var n;t.actionItem.componentId=null,t.actionItem.type=l,o.value=null,t.actionItem.methodName=null,r.value=[],(n=i.value)!=null&&n.length&&d(i.value[0].value)}function c(l){var n;t.actionItem.args&&(t.cacheData[t.actionItem.componentId+t.actionItem.methodName]=t.actionItem.args),t.actionItem.componentId=l.id,t.actionItem.type="component",t.actionItem.methodName=null,o.value=l.componentSchema,(n=i.value)!=null&&n.length&&d(i.value[0].value)}function d(l){t.actionItem.methodName=l,t.actionItem.args=t.cacheData[t.actionItem.componentId+t.actionItem.methodName]}return E({handleOpen:N,handleOpenEdit:x}),(l,n)=>(e.openBlock(),e.createBlock(e.unref(h),{modelValue:u.value,"onUpdate:modelValue":n[4]||(n[4]=_=>u.value=_),class:"w-1200px",width:"1200px",onClose:C,onOk:b,title:"动作配置"},{default:e.withCtx(()=>{var _;return[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",Z,[e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="custom"}]),onClick:n[0]||(n[0]=g=>s("custom"))}," 自定义函数 ",2),e.createElementVNode("div",{class:e.normalizeClass(["fun-btn",{checked:t.actionItem.type==="public"}]),onClick:n[1]||(n[1]=g=>s("public"))}," 公共函数 ",2),n[5]||(n[5]=e.createTextVNode(" 组件 ")),e.createElementVNode("div",ee,[e.createVNode(e.unref(S._sfc_main),{selectedKeys:r.value,"onUpdate:selectedKeys":n[2]||(n[2]=g=>r.value=g),options:e.unref(V).schemas,onNodeClick:c},null,8,["selectedKeys","options"])])]),e.createElementVNode("div",te,[n[6]||(n[6]=e.createElementVNode("div",{class:"mb-2"},"动作选择",-1)),e.createElementVNode("div",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,g=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{checked:g.value===t.actionItem.methodName},"epic-action-item"]),onClick:de=>d(g.value),key:g.value},[e.createElementVNode("span",null,e.toDisplayString(g.label),1)],10,oe))),128)),e.withDirectives(e.createElementVNode("div",le," 当前组件暂无动作 ",512),[[e.vShow,!((_=i.value)!=null&&_.length)]])])])]),e.createElementVNode("div",ae,[t.actionItem.type==="custom"?(e.openBlock(),e.createBlock(P,{key:0})):a.value.length===0?(e.openBlock(),e.createElementBlock("div",ce," 暂无配置 ")):(e.openBlock(),e.createBlock(W,{key:2,modelValue:t.actionItem.args,"onUpdate:modelValue":n[3]||(n[3]=g=>t.actionItem.args=g),actionArgsConfigs:a.value},null,8,["modelValue","actionArgsConfigs"]))])])]}),_:1},8,["modelValue"]))}}),ie=e.defineComponent({__name:"index",props:{eventList:{type:Array,default:()=>[]},modelValue:{type:Object}},emits:["update:modelValue"],setup(k,{emit:E}){const m=y.pluginManager.getComponent("Collapse"),h=y.pluginManager.getComponent("CollapseItem"),v=e.ref(null);let V=0;const f=k,u=E,r=e.computed({get(){return f.modelValue},set(s){u("update:modelValue",s)}}),o=e.ref([]),p=e.computed(()=>f.eventList.filter(s=>s.events.length)),i=e.computed(()=>f.eventList.map(s=>s.events).flat()),a=e.ref({});i.value.forEach(s=>{a.value[s.type]=e.computed({get(){var c;return((c=r.value)==null?void 0:c[s.type])??[]},set(c){c&&c.length?r.value[s.type]=c.map(d=>e.toRaw(d)):delete r.value[s.type]}})}),e.watch(()=>p.value,s=>{s.length&&(o.value=s.filter(c=>{for(let d=0;d<c.events.length;d++){const l=c.events[d].type;if(a.value[l].length)return!0}return!1}).map(c=>c.title))},{immediate:!0});let t="";function N(s){var c;(c=v.value)==null||c.handleOpen(),t=s}function x(s,c,d){var l;(l=v.value)==null||l.handleOpenEdit(d),V=s,t=c}function b(s){a.value[t][V]=s,r.value[t]=[...a.value[t]??[]]}function C(s){if(!r.value){r.value={[t]:[...a.value[t]??[],s]};return}r.value[t]=[...a.value[t]??[],s]}return(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(m),{modelValue:o.value,"onUpdate:modelValue":c[1]||(c[1]=d=>o.value=d),activeKey:o.value,"onUpdate:activeKey":c[2]||(c[2]=d=>o.value=d),"expanded-names":o.value,"onUpdate:expandedNames":c[3]||(c[3]=d=>o.value=d)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,d=>(e.openBlock(),e.createBlock(e.unref(h),{key:d.title,title:d.title,header:d.title,name:d.title},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=l=>r.value=l),"item-events":d.events,"all-events":i.value,events:a.value,onAdd:N,onEdit:x},null,8,["modelValue","item-events","all-events","events"])]),_:2},1032,["title","header","name"]))),128))]),_:1},8,["modelValue","activeKey","expanded-names"]),e.createVNode(se,{ref_key:"EActionModalRef",ref:v,onAdd:C,onEdit:b},null,512)],64))}});exports.default=ie;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as g, ref as p, onMounted as h, watch as v, nextTick as V, openBlock as _, createElementBlock as T } from "vue";
|
|
2
2
|
import * as a from "monaco-editor";
|
|
3
|
-
import { h as b } from "./index-
|
|
3
|
+
import { h as b } from "./index-D83uXkXA.js";
|
|
4
4
|
import { _ as y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const x = /* @__PURE__ */ g({
|
|
6
6
|
__name: "index",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./pluginManager-DWHAX8kP.cjs"),H=require("./index-CDH3QO51.cjs"),Q=require("element-plus"),ee=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),we=require("./vuedraggable.umd-BqhSJIAi.cjs"),Ce={class:"epic-widget-action-item whitespace-nowrap"},Ne={key:0,class:"flex items-center"},_e={key:0,title:"单元格操作",class:"epic-widget-action-item pointer-events-auto"},be=e.defineComponent({__name:"previewWidgets",setup(Z,{expose:L}){const v=e.inject("pageManager",{}),o=e.inject("pageSchema"),n=e.inject("designer"),w=e.inject("designerProps"),i=e.inject("revoke"),g=e.ref(null),R=e.ref(null),N=e.ref(null),z=e.ref(!1),c=e.ref(!1),d=e.ref(!0),h=e.ref("top"),{canvasScale:u,disabledZoom:T}=H.useStore();let s=null;const P=e.computed(()=>{const t=n.state.checkedNode;return!(!(t!=null&&t.id)||w.value.lockDefaultSchemaEdit&&v.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-cell")}),j=e.computed(()=>{const t=n.state.checkedNode;return(t==null?void 0:t.type)==="eTd"});e.computed(()=>{const t=n.state.checkedNode;return(t==null?void 0:t.type)==="table"});const $=e.computed(()=>{var C,b,V,m,O,A;const t=v.componentInstances.value,r=(C=n.state.checkedNode)==null?void 0:C.id;if((V=(b=n.state.checkedNode)==null?void 0:b.componentProps)!=null&&V.hidden)return null;const y=l.pluginManager.getComponentConfingByType((m=n.state.checkedNode)==null?void 0:m.type)??null;if(!r||!(t!=null&&t[r]))return null;if(y!=null&&y.defaultSchema.input&&((O=n.state.checkedNode)==null?void 0:O.noFormItem)!==!0)return(A=t[r+"formItem"])==null?void 0:A.$el;const a=t[r];return!(a!=null&&a.$el)||(a==null?void 0:a.$el.nodeName)==="#text"||!(a!=null&&a.$el.getBoundingClientRect)?null:a==null?void 0:a.$el}),x=e.computed(()=>{var C,b,V,m;const t=v.componentInstances.value,r=(C=n.state.hoverNode)==null?void 0:C.id,y=l.pluginManager.getComponentConfingByType((b=n.state.hoverNode)==null?void 0:b.type)??null;if(!r||!(t!=null&&t[r]))return null;if(y!=null&&y.defaultSchema.input&&((V=n.state.hoverNode)==null?void 0:V.noFormItem)!==!0)return(m=t[r+"formItem"])==null?void 0:m.$el;const a=t[r];return(a==null?void 0:a.$el.nodeName)==="#text"?null:a==null?void 0:a.$el}),{mutationObserver:_,observerConfig:k}=ae(F),{startTimedQuery:q,stopTimedQuery:G}=H.useTimedQuery(F);e.watch(()=>$.value,t=>{if(t){z.value=!0,_.observe(t,k);const r=t.parentNode;r&&(r.ondragstart=()=>{d.value=!1,q()},r.ondragend=()=>{d.value=!0,G()}),F()}else z.value=!1});const{mutationObserver:M,observerConfig:E}=ae(oe);e.watch(()=>x.value,t=>{t&&(M.observe(t,E),oe())});let U=0;e.watch(()=>{var t;return(t=n.state.hoverNode)==null?void 0:t.id},t=>{if(t){c.value=!0,clearTimeout(U);return}U=setTimeout(()=>{c.value=!1},300)});let J=0,K=0;function F(){const t=$.value;if(!t||!s)return;const{top:r,left:y}=s==null?void 0:s.getBoundingClientRect(),{top:a,left:C,width:b,height:V}=t.getBoundingClientRect(),m=T.value?1:u.value,O=a-r+((s==null?void 0:s.scrollTop)??0)*m,A=C-y+((s==null?void 0:s.scrollLeft)??0)*m,W=V/m;g.value&&(g.value.style.width=`${b/m}px`,g.value.style.height=`${W}px`,g.value.style.top=`${O/m}px`,g.value.style.left=`${A/m}px`,ve(O,A)),N.value&&(O<45&&W<100?(N.value.style.top="",N.value.style.bottom="-30px",N.value.style["border-radius"]="0px 0px 4px 4px",h.value="bottom"):O<45?(N.value.style.top="0px",N.value.style["border-radius"]="0px 0px 4px 0",h.value="center"):(N.value.style.top="-30px",N.value.style["border-radius"]="4px 4px 0px 0px",h.value="top"))}function ve(t,r){const y=$.value;if(!s||!y)return;const a=s.getBoundingClientRect(),{width:C}=y.getBoundingClientRect(),b=T.value?1:u.value,V=t/b-a.top;let m=r/b-a.left+C/b;m<a.width&&(m=0);const O=s.scrollTop-a.height/3+60,A=s.scrollTop+a.height/3*2,W=s.scrollLeft-a.width+200,X=s.scrollLeft+a.width-200;Math.abs(V-J)<10&&Math.abs(m-K)<10||(J=V,K=m,!(V>O&&V<A&&m>W&&m<X)&&(s.scrollTop=V,s.scrollLeft=m))}function oe(){var W,X;const t=x.value;if(!t)return;const{top:r,left:y}=(s==null?void 0:s.getBoundingClientRect())??{top:0,left:0},{top:a,left:C,width:b,height:V}=((W=t.getBoundingClientRect)==null?void 0:W.call(t))??((X=t.nextElementSibling)==null?void 0:X.getBoundingClientRect()),m=T.value?1:u.value,O=a-r+((s==null?void 0:s.scrollTop)??0)*m,A=C-y+((s==null?void 0:s.scrollLeft)??0)*m;R.value&&(R.value.style.width=`${b/m}px`,R.value.style.height=`${V/m}px`,R.value.style.top=`${O/m}px`,R.value.style.left=`${A/m}px`)}function ae(t){const r=window.MutationObserver,y={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new r(t),observerConfig:y}}function ge(t){var r,y,a,C,b,V,m,O,A,W,X,se,re,ie,ce,de,ue,fe;if(t==="right"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(y=l.findSchemaInfoById(o.schemas,((r=n.state.checkedNode)==null?void 0:r.id)??"root"))==null?void 0:y.index;(a=S.list)==null||a[0].children.forEach(I=>{var D;(D=I.children)==null||D.splice(B+1,0,{type:"eTd",id:"eTd_"+l.getUUID(),children:[]})}),i.push(o.schemas,"添加右列")}else if(t==="left"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(b=l.findSchemaInfoById(o.schemas,((C=n.state.checkedNode)==null?void 0:C.id)??"root"))==null?void 0:b.index;(V=S.list)==null||V[0].children.forEach(I=>{var D;B===0?I.children.unshift({type:"eTd",id:"eTd_"+l.getUUID(),children:[]}):(D=I.children)==null||D.splice(B-1,0,{type:"eTd",id:"eTd_"+l.getUUID(),children:[]})}),i.push(o.schemas,"添加左列")}else if(t==="top"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((m=n.state.checkedNode)==null?void 0:m.id)??"root");I.index===0?(O=B.list)==null||O[0].children.unshift({type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}):(A=B.list)==null||A[0].children.splice(I.index-1,0,{type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}),i.push(o.schemas,"添加上列")}else if(t==="bottom"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((W=n.state.checkedNode)==null?void 0:W.id)??"root");(X=B.list)==null||X[0].children.splice(I.index+1,0,{type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}),i.push(o.schemas,"添加下列")}else if(t==="merge-right"){n.state.matched.find(I=>I.type==="eTr");const f=l.findSchemaInfoById(o.schemas,((se=n.state.checkedNode)==null?void 0:se.id)??"root");if(f.index===f.list.length-1)return;const S=f.list[f.index],B=f.list[f.index+1];S.colspan=(S.colspan||1)+(B.colspan||1),f.list.splice(f.index+1,1),i.push(o.schemas,"向右合并")}else if(t==="merge-bottom"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr");l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root");const B=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((re=n.state.checkedNode)==null?void 0:re.id)??"root").index;if(B.index!==B.list.length-1){const p=B.list[B.index];let te=0,ne=0;p.children.forEach((Y,le)=>{Y.colSpan||(Y.colSpan=1),ne=ne+Y.colSpan,ne===D+1&&(te=le)}),p.children[te].rowSpan=(p.children[te].rowSpan||1)+1;const Se=B.list[B.index+p.children[te].rowSpan-1];let he=0,me=0;p.children.forEach((Y,le)=>{Y.colSpan||(Y.colSpan=1),me=me+Y.colSpan,ne===D+1&&(he=le)}),Se.children.splice(he,1)}i.push(o.schemas,"向下合并")}else if(t==="delete-col"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(ce=l.findSchemaInfoById(o.schemas,((ie=n.state.checkedNode)==null?void 0:ie.id)??"root"))==null?void 0:ce.index;(de=S.list)==null||de[0].children.forEach(I=>{var D;(D=I.children)==null||D.splice(B,1)}),i.push(o.schemas,"删除当前列")}else if(t==="delete-row"){const f=n.state.matched.find(D=>D.type==="eTable"),S=n.state.matched.find(D=>D.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root");l.findSchemaInfoById(o.schemas,((ue=n.state.checkedNode)==null?void 0:ue.id)??"root"),(fe=B.list)==null||fe[0].children.splice(I.index,1),i.push(o.schemas,"删除当前行")}}function xe(){var b;const t=l.findSchemaInfoById(o.schemas,((b=n.state.checkedNode)==null?void 0:b.id)??"root");if(!t)return!1;const{list:r,schema:y,index:a}=t,C=l.generateNewSchema(y);r.splice(a+1,0,C),n.setCheckedNode(C),i.push(o.schemas,"复制组件")}function ye(){var C;const t=l.findSchemaInfoById(o.schemas,((C=n.state.checkedNode)==null?void 0:C.id)??"root");if(!t)return!1;let{list:r,schema:y,index:a}=t;r.splice(a,1),a===r.length&&a--,n.setCheckedNode(r[a]),i.push(o.schemas,"删除组件")}function ke(t){s=t,s==null||s.addEventListener("scroll",()=>{F()}),H.useResizeObserver($,F),H.useResizeObserver(x,oe)}return L({handleInit:ke}),(t,r)=>{var y,a,C,b,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:g,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",h.value+" "+(d.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:N},[e.createElementVNode("div",Ce,e.toDisplayString((a=e.unref(l.pluginManager).getComponentConfingByType(((y=e.unref(n).state.checkedNode)==null?void 0:y.type)??""))==null?void 0:a.defaultSchema.label),1),P.value?(e.openBlock(),e.createElementBlock("div",Ne,[P.value&&!j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:xe},[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElDropdown),{onCommand:ge,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(Q.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElDropdownItem),{command:"left"},{default:e.withCtx(()=>r[0]||(r[0]=[e.createTextVNode("添加左列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"right"},{default:e.withCtx(()=>r[1]||(r[1]=[e.createTextVNode("添加右列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"top"},{default:e.withCtx(()=>r[2]||(r[2]=[e.createTextVNode("添加上列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"bottom"},{default:e.withCtx(()=>r[3]||(r[3]=[e.createTextVNode("添加下列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"delete-row",divided:""},{default:e.withCtx(()=>r[4]||(r[4]=[e.createTextVNode("删除当前行")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"delete-col"},{default:e.withCtx(()=>r[5]||(r[5]=[e.createTextVNode("删除当前列")])),_:1})]),_:1})]),default:e.withCtx(()=>[j.value?(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--window-outline"})])):e.createCommentVNode("",!0)]),_:1}),P.value&&!j.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:ye},[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,z.value&&((C=e.unref(n).state.checkedNode)==null?void 0:C.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:R,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,c.value&&((b=e.unref(n).state.checkedNode)==null?void 0:b.id)!==((V=e.unref(n).state.hoverNode)==null?void 0:V.id)]])],64)}}}),Be=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(Z,{emit:L}){const v=e.inject("designer"),o=e.inject("pageSchema"),n=e.inject("revoke"),w=Z,i=L,g=e.computed({get(){return w.schemas},set(d){i("update:schemas",d)}});function R(d){v.setCheckedNode(g.value[d]),v.setDisableHover(!0)}function N(){v.setDisableHover(),n.push(o.schemas,"拖拽组件")}function z(){n.push(o.schemas,"插入组件")}function c(d){var h,u,T;return d.id===((h=o.schemas[0])==null?void 0:h.id)||(T=(u=l.pluginManager.getComponentConfingByType(d.type))==null?void 0:u.editConstraints)!=null&&T.immovable?"unmover-item":"draggable-item"}return(d,h)=>(e.openBlock(),e.createBlock(e.unref(we.draggable),e.mergeProps({modelValue:g.value,"onUpdate:modelValue":h[0]||(h[0]=u=>g.value=u),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:h[1]||(h[1]=u=>R(u.oldIndex)),onEnd:h[2]||(h[2]=u=>N()),onAdd:h[3]||(h[3]=u=>{R(u.newIndex),z()})}),{item:e.withCtx(({element:u,index:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",c(u)]),key:T},[e.createVNode(pe,{schema:u},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),pe=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(Z){const L=e.useAttrs(),v=e.inject("designer"),o=e.inject("pageManager",{}),n=e.inject("pageSchema",{}),w=e.ref(null);e.provide("nodeAttrs",L);const i=Z,g=e.computed(()=>{var T,s,P,j,$;const c=o.componentInstances.value,d=(T=i.schema)==null?void 0:T.id,h=l.pluginManager.getComponentConfingByType((s=i.schema)==null?void 0:s.type)??null;if(!d||!(c!=null&&c[d]))return null;if(h!=null&&h.defaultSchema.input&&((P=i.schema)==null?void 0:P.noFormItem)!==!0)return(j=c[d+"formItem"])==null?void 0:j.$el;const u=c[d];return(($=u==null?void 0:u.$el)==null?void 0:$.nodeName)==="#text"?null:u==null?void 0:u.$el});e.watch(()=>g.value,c=>{c==null||c.addEventListener("click",R,!1),c==null||c.addEventListener("mouseover",N,!1),c==null||c.addEventListener("mouseout",z,!1)}),e.onUnmounted(()=>{var c,d,h;(c=g.value)==null||c.removeEventListener("click",R,!1),(d=g.value)==null||d.removeEventListener("mouseover",N,!1),(h=g.value)==null||h.removeEventListener("mouseout",z,!1)});function R(c){c.stopPropagation(),v.setCheckedNode(i.schema)}function N(c){var d;i.schema.id!==((d=n.schemas[0])==null?void 0:d.id)&&(c.stopPropagation(),v.setHoverNode(i.schema))}function z(c){c.stopPropagation(),v.setHoverNode(null)}return(c,d)=>{var u,T;const h=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(H._sfc_main),{ref_key:"nodeRef",ref:w,componentSchema:i.schema},e.createSlots({_:2},[(T=(u=e.unref(l.pluginManager).getComponentConfingByType(i.schema.type))==null?void 0:u.editConstraints)!=null&&T.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.schema.children,s=>(e.openBlock(),e.createBlock(h,{key:s.id,schema:s},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[i.schema.children?(e.openBlock(),e.createBlock(Be,{key:0,schemas:i.schema.children,"onUpdate:schemas":d[0]||(d[0]=s=>i.schema.children=s)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),Ie={class:"min-w-750px rounded h-full"},Te=e.defineComponent({__name:"previewJson",setup(Z,{expose:L}){const v=l.pluginManager.getComponent("modal"),o=l.pluginManager.getComponent("monacoEditor"),n={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},w=e.ref(null),i=e.ref(!1),g=e.inject("pageSchema");function R(){i.value=!1}function N(){i.value=!0,w.value?w.value.setValue(JSON.stringify(g,null,2)):setTimeout(()=>{N()},300)}function z(c="epic-data.json"){const d=JSON.stringify(g,null,2);var h=`data:text/json;charset=utf-8,${encodeURIComponent(d)}`,u=document.createElement("a");u.setAttribute("href",h),u.setAttribute("download",c),u.click()}return L({handleOpen:N}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(v),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),title:"查看数据",class:"w-900px",width:"900px",onClose:R,onOk:z,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(e.unref(o),{ref_key:"monacoEditorRef",ref:w,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:n,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),Ve={class:"epic-edit-toolbar flex items-center justify-between px-2"},Ee={class:"flex-1 h-full flex items-center"},De={key:0,class:"epic-divider"},Re=["title","onClick"],$e={class:"flex-1 h-full flex items-center justify-end"},Me={key:0,class:"flex items-center ml-12px"},Ue={class:"pr-8px w-82px cursor-pointer"},Le={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ze=["title","onClick"],Oe=e.defineComponent({__name:"toolbar",setup(Z){const L=l.pluginManager.getComponent("select"),{canvasScale:v,disabledZoom:o}=H.useStore(),n=e.ref("pc"),w=e.inject("pageSchema"),i=e.inject("designer"),g=e.inject("revoke"),R=e.ref(null),N=[{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"}],z=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:s},{icon:"icon--epic--undo",title:"撤销",on:u,disabled:!g.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:T,disabled:!g.undoList.value.length}]),c=e.ref(null),d=e.computed({get(){return`${(v.value*100).toFixed(0)}%`},set(x){const _=parseFloat(x);v.value=_/100}}),h=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function u(){const x=g.undo();x&&(l.deepCompareAndModify(w.schemas,x),i.setCheckedNode(w.schemas[0]))}function T(){const x=g.redo();x&&(l.deepCompareAndModify(w.schemas,x),i.setCheckedNode(w.schemas[0]))}function s(){i.reset()}function P(x){var q;const _=(q=x.target.files)==null?void 0:q[0];if(!_)return;x.target.value=null;const k=new FileReader;k.readAsText(_),k.onload=G=>{var M;j((M=G.target)==null?void 0:M.result)}}function j(x){try{let _=JSON.parse(x??"");_.schemas||(_=l.convertKFormData(_)),l.deepCompareAndModify(w,_)}catch(_){console.error(_)}}function $(x){i.handleToggleDeviceMode(x),n.value=x;const _={pc:{},pad:{width:"780px",mode:x},mobile:{width:"390px",height:"844px",mode:x}};w.canvas=_[x],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",w)}return(x,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ve,[e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(k,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:q},[k.divider?(e.openBlock(),e.createElementBlock("div",De)):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(ee._sfc_main),{name:k.icon},null,8,["name"])],10,Re)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:c,accept:".json,.txt",onChange:P},null,544),[[e.vShow,!1]]),e.createElementVNode("div",$e,[e.unref(o)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",Ue,[e.createVNode(e.unref(L),{value:d.value,"onUpdate:value":_[0]||(_[0]=k=>d.value=k),modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=k=>d.value=k),options:h,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",Le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(N,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===n.value}]),onClick:q=>$(k.key)},[e.createVNode(e.unref(ee._sfc_main),{name:k.icon},null,8,["name"])],10,ze)),64))])])]),e.createVNode(Te,{ref_key:"previewJson",ref:R},null,512)],64))}}),He={class:"h-full flex flex-col relative"},je=["draggable"],Fe=e.defineComponent({__name:"editScreenContainer",setup(Z){const L=e.inject("pageSchema"),v=e.ref(null),o=e.ref(null),n=e.ref(null),{pressSpace:w,disabledZoom:i}=H.useStore(),{handleElementDragStart:g,handleElementDrag:R,handleElementDragEnd:N}=H.useElementDrag(v),{width:z,height:c}=H.useElementSize(v),{canvasScale:d,handleZoom:h}=H.useElementZoom(o);let u=0,T=0;const s=e.ref({}),P=e.ref({}),j=e.ref({}),$=e.shallowRef({width:0,height:0});e.watchEffect(_),e.watch(j,()=>{e.nextTick(x)});function x(){n.value&&($.value={width:n.value.clientWidth,height:n.value.clientHeight})}function _(){var M,E;j.value={width:((M=L.canvas)==null?void 0:M.width)??"0",height:((E=L.canvas)==null?void 0:E.height)??"0"}}H.watchOnce(z,k),e.watch($,k);function k(){let M=$.value.width||u,E=$.value.height||T;s.value={width:z.value+M+"px",height:c.value+E+"px"},P.value={width:M+"px",height:E+"px"},q()}function q(){e.nextTick(()=>{var K;let M=$.value.width||u;const U=($.value.height||T)/2,J=M/2;(K=v.value)==null||K.scrollTo(J,U)})}H.useResizeObserver(v,G),H.useResizeObserver(o,G);function G(){var E;if(!v.value)return;const M=v.value.getBoundingClientRect();if(u=M.width-60,T=M.height-80,!i.value)if($.value.width===0)d.value=1;else{const U=(u-20)/$.value.width,J=T/($.value.height||((E=o.value)==null?void 0:E.clientHeight)||1),K=Math.abs(U-1)<Math.abs(J-1);let F=1;K?F=U:F=J,(U<1||J<1)&&(F=Math.min(U,J)),F<1.4&&F>.5&&(d.value=F)}H.debounce(k,50)()}return(M,E)=>(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(Oe),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:v,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(w)}]),draggable:e.unref(w),onWheel:E[0]||(E[0]=(...U)=>e.unref(h)&&e.unref(h)(...U)),onDragstart:E[1]||(E[1]=(...U)=>e.unref(g)&&e.unref(g)(...U)),onDragend:E[2]||(E[2]=(...U)=>e.unref(N)&&e.unref(N)(...U)),onDrag:E[3]||(E[3]=(...U)=>e.unref(R)&&e.unref(R)(...U))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(s.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:o,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(w)}),style:e.normalizeStyle(P.value)},[e.renderSlot(M.$slots,"default")],6)],512)],4)],42,je),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:n,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(j.value)},null,4)]))}}),Ae={class:"epic-edit-canvas"},Pe=e.defineComponent({__name:"index",setup(Z){const L=e.ref(null),v=e.ref(null),o=e.inject("pageSchema"),n=e.computed(()=>o.schemas[0]),w=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var i;(i=v.value)==null||i.handleInit(L.value)}),(i,g)=>(e.openBlock(),e.createElementBlock("section",Ae,[e.createVNode(Fe,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:L,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(w.value)},[e.createVNode(pe,{schema:n.value},null,8,["schema"]),e.createVNode(be,{ref_key:"ePreviewWidgetsRef",ref:v},null,512)],4)]),_:1})]))}});exports.default=Pe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./pluginManager-DWHAX8kP.cjs"),H=require("./index-Btz7ejRx.cjs"),Q=require("element-plus"),ee=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),we=require("./vuedraggable.umd-BqhSJIAi.cjs"),Ce={class:"epic-widget-action-item whitespace-nowrap"},Ne={key:0,class:"flex items-center"},_e={key:0,title:"单元格操作",class:"epic-widget-action-item pointer-events-auto"},be=e.defineComponent({__name:"previewWidgets",setup(Z,{expose:L}){const v=e.inject("pageManager",{}),o=e.inject("pageSchema"),n=e.inject("designer"),w=e.inject("designerProps"),i=e.inject("revoke"),g=e.ref(null),R=e.ref(null),N=e.ref(null),z=e.ref(!1),c=e.ref(!1),d=e.ref(!0),h=e.ref("top"),{canvasScale:u,disabledZoom:T}=H.useStore();let s=null;const P=e.computed(()=>{const t=n.state.checkedNode;return!(!(t!=null&&t.id)||w.value.lockDefaultSchemaEdit&&v.defaultComponentIds.value.includes(t==null?void 0:t.id)||t.type==="table-cell")}),j=e.computed(()=>{const t=n.state.checkedNode;return(t==null?void 0:t.type)==="eTd"});e.computed(()=>{const t=n.state.checkedNode;return(t==null?void 0:t.type)==="table"});const $=e.computed(()=>{var C,b,V,m,O,A;const t=v.componentInstances.value,r=(C=n.state.checkedNode)==null?void 0:C.id;if((V=(b=n.state.checkedNode)==null?void 0:b.componentProps)!=null&&V.hidden)return null;const y=l.pluginManager.getComponentConfingByType((m=n.state.checkedNode)==null?void 0:m.type)??null;if(!r||!(t!=null&&t[r]))return null;if(y!=null&&y.defaultSchema.input&&((O=n.state.checkedNode)==null?void 0:O.noFormItem)!==!0)return(A=t[r+"formItem"])==null?void 0:A.$el;const a=t[r];return!(a!=null&&a.$el)||(a==null?void 0:a.$el.nodeName)==="#text"||!(a!=null&&a.$el.getBoundingClientRect)?null:a==null?void 0:a.$el}),x=e.computed(()=>{var C,b,V,m;const t=v.componentInstances.value,r=(C=n.state.hoverNode)==null?void 0:C.id,y=l.pluginManager.getComponentConfingByType((b=n.state.hoverNode)==null?void 0:b.type)??null;if(!r||!(t!=null&&t[r]))return null;if(y!=null&&y.defaultSchema.input&&((V=n.state.hoverNode)==null?void 0:V.noFormItem)!==!0)return(m=t[r+"formItem"])==null?void 0:m.$el;const a=t[r];return(a==null?void 0:a.$el.nodeName)==="#text"?null:a==null?void 0:a.$el}),{mutationObserver:_,observerConfig:k}=ae(F),{startTimedQuery:q,stopTimedQuery:G}=H.useTimedQuery(F);e.watch(()=>$.value,t=>{if(t){z.value=!0,_.observe(t,k);const r=t.parentNode;r&&(r.ondragstart=()=>{d.value=!1,q()},r.ondragend=()=>{d.value=!0,G()}),F()}else z.value=!1});const{mutationObserver:M,observerConfig:E}=ae(oe);e.watch(()=>x.value,t=>{t&&(M.observe(t,E),oe())});let U=0;e.watch(()=>{var t;return(t=n.state.hoverNode)==null?void 0:t.id},t=>{if(t){c.value=!0,clearTimeout(U);return}U=setTimeout(()=>{c.value=!1},300)});let J=0,K=0;function F(){const t=$.value;if(!t||!s)return;const{top:r,left:y}=s==null?void 0:s.getBoundingClientRect(),{top:a,left:C,width:b,height:V}=t.getBoundingClientRect(),m=T.value?1:u.value,O=a-r+((s==null?void 0:s.scrollTop)??0)*m,A=C-y+((s==null?void 0:s.scrollLeft)??0)*m,W=V/m;g.value&&(g.value.style.width=`${b/m}px`,g.value.style.height=`${W}px`,g.value.style.top=`${O/m}px`,g.value.style.left=`${A/m}px`,ve(O,A)),N.value&&(O<45&&W<100?(N.value.style.top="",N.value.style.bottom="-30px",N.value.style["border-radius"]="0px 0px 4px 4px",h.value="bottom"):O<45?(N.value.style.top="0px",N.value.style["border-radius"]="0px 0px 4px 0",h.value="center"):(N.value.style.top="-30px",N.value.style["border-radius"]="4px 4px 0px 0px",h.value="top"))}function ve(t,r){const y=$.value;if(!s||!y)return;const a=s.getBoundingClientRect(),{width:C}=y.getBoundingClientRect(),b=T.value?1:u.value,V=t/b-a.top;let m=r/b-a.left+C/b;m<a.width&&(m=0);const O=s.scrollTop-a.height/3+60,A=s.scrollTop+a.height/3*2,W=s.scrollLeft-a.width+200,X=s.scrollLeft+a.width-200;Math.abs(V-J)<10&&Math.abs(m-K)<10||(J=V,K=m,!(V>O&&V<A&&m>W&&m<X)&&(s.scrollTop=V,s.scrollLeft=m))}function oe(){var W,X;const t=x.value;if(!t)return;const{top:r,left:y}=(s==null?void 0:s.getBoundingClientRect())??{top:0,left:0},{top:a,left:C,width:b,height:V}=((W=t.getBoundingClientRect)==null?void 0:W.call(t))??((X=t.nextElementSibling)==null?void 0:X.getBoundingClientRect()),m=T.value?1:u.value,O=a-r+((s==null?void 0:s.scrollTop)??0)*m,A=C-y+((s==null?void 0:s.scrollLeft)??0)*m;R.value&&(R.value.style.width=`${b/m}px`,R.value.style.height=`${V/m}px`,R.value.style.top=`${O/m}px`,R.value.style.left=`${A/m}px`)}function ae(t){const r=window.MutationObserver,y={childList:!0,attributes:!0,subtree:!0};return{mutationObserver:new r(t),observerConfig:y}}function ge(t){var r,y,a,C,b,V,m,O,A,W,X,se,re,ie,ce,de,ue,fe;if(t==="right"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(y=l.findSchemaInfoById(o.schemas,((r=n.state.checkedNode)==null?void 0:r.id)??"root"))==null?void 0:y.index;(a=S.list)==null||a[0].children.forEach(I=>{var D;(D=I.children)==null||D.splice(B+1,0,{type:"eTd",id:"eTd_"+l.getUUID(),children:[]})}),i.push(o.schemas,"添加右列")}else if(t==="left"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(b=l.findSchemaInfoById(o.schemas,((C=n.state.checkedNode)==null?void 0:C.id)??"root"))==null?void 0:b.index;(V=S.list)==null||V[0].children.forEach(I=>{var D;B===0?I.children.unshift({type:"eTd",id:"eTd_"+l.getUUID(),children:[]}):(D=I.children)==null||D.splice(B-1,0,{type:"eTd",id:"eTd_"+l.getUUID(),children:[]})}),i.push(o.schemas,"添加左列")}else if(t==="top"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((m=n.state.checkedNode)==null?void 0:m.id)??"root");I.index===0?(O=B.list)==null||O[0].children.unshift({type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}):(A=B.list)==null||A[0].children.splice(I.index-1,0,{type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}),i.push(o.schemas,"添加上列")}else if(t==="bottom"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((W=n.state.checkedNode)==null?void 0:W.id)??"root");(X=B.list)==null||X[0].children.splice(I.index+1,0,{type:"eTr",id:"eTr_"+l.getUUID(),children:l.deepClone(D.list).map(p=>(p.id="eTd_"+l.getUUID(),p.children=[],p))}),i.push(o.schemas,"添加下列")}else if(t==="merge-right"){n.state.matched.find(I=>I.type==="eTr");const f=l.findSchemaInfoById(o.schemas,((se=n.state.checkedNode)==null?void 0:se.id)??"root");if(f.index===f.list.length-1)return;const S=f.list[f.index],B=f.list[f.index+1];S.colspan=(S.colspan||1)+(B.colspan||1),f.list.splice(f.index+1,1),i.push(o.schemas,"向右合并")}else if(t==="merge-bottom"){const f=n.state.matched.find(p=>p.type==="eTable"),S=n.state.matched.find(p=>p.type==="eTr");l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root");const B=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root"),D=l.findSchemaInfoById(o.schemas,((re=n.state.checkedNode)==null?void 0:re.id)??"root").index;if(B.index!==B.list.length-1){const p=B.list[B.index];let te=0,ne=0;p.children.forEach((Y,le)=>{Y.colSpan||(Y.colSpan=1),ne=ne+Y.colSpan,ne===D+1&&(te=le)}),p.children[te].rowSpan=(p.children[te].rowSpan||1)+1;const Se=B.list[B.index+p.children[te].rowSpan-1];let he=0,me=0;p.children.forEach((Y,le)=>{Y.colSpan||(Y.colSpan=1),me=me+Y.colSpan,ne===D+1&&(he=le)}),Se.children.splice(he,1)}i.push(o.schemas,"向下合并")}else if(t==="delete-col"){const f=n.state.matched.find(I=>I.type==="eTable"),S=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),B=(ce=l.findSchemaInfoById(o.schemas,((ie=n.state.checkedNode)==null?void 0:ie.id)??"root"))==null?void 0:ce.index;(de=S.list)==null||de[0].children.forEach(I=>{var D;(D=I.children)==null||D.splice(B,1)}),i.push(o.schemas,"删除当前列")}else if(t==="delete-row"){const f=n.state.matched.find(D=>D.type==="eTable"),S=n.state.matched.find(D=>D.type==="eTr"),B=l.findSchemaInfoById(o.schemas,(f==null?void 0:f.id)??"root"),I=l.findSchemaInfoById(o.schemas,(S==null?void 0:S.id)??"root");l.findSchemaInfoById(o.schemas,((ue=n.state.checkedNode)==null?void 0:ue.id)??"root"),(fe=B.list)==null||fe[0].children.splice(I.index,1),i.push(o.schemas,"删除当前行")}}function xe(){var b;const t=l.findSchemaInfoById(o.schemas,((b=n.state.checkedNode)==null?void 0:b.id)??"root");if(!t)return!1;const{list:r,schema:y,index:a}=t,C=l.generateNewSchema(y);r.splice(a+1,0,C),n.setCheckedNode(C),i.push(o.schemas,"复制组件")}function ye(){var C;const t=l.findSchemaInfoById(o.schemas,((C=n.state.checkedNode)==null?void 0:C.id)??"root");if(!t)return!1;let{list:r,schema:y,index:a}=t;r.splice(a,1),a===r.length&&a--,n.setCheckedNode(r[a]),i.push(o.schemas,"删除组件")}function ke(t){s=t,s==null||s.addEventListener("scroll",()=>{F()}),H.useResizeObserver($,F),H.useResizeObserver(x,oe)}return L({handleInit:ke}),(t,r)=>{var y,a,C,b,V;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.withDirectives(e.createElementVNode("div",{ref_key:"selectorRef",ref:g,class:e.normalizeClass(["epic-checked-widget absolute pointer-events-none z-20",h.value+" "+(d.value?"transition-all":"")])},[e.createElementVNode("div",{class:"epic-widget-action-box",ref_key:"actionBoxRef",ref:N},[e.createElementVNode("div",Ce,e.toDisplayString((a=e.unref(l.pluginManager).getComponentConfingByType(((y=e.unref(n).state.checkedNode)==null?void 0:y.type)??""))==null?void 0:a.defaultSchema.label),1),P.value?(e.openBlock(),e.createElementBlock("div",Ne,[P.value&&!j.value?(e.openBlock(),e.createElementBlock("div",{key:0,title:"复制",class:"epic-widget-action-item pointer-events-auto",onClick:xe},[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--copy-all-outline-rounded"})])):e.createCommentVNode("",!0),e.createVNode(e.unref(Q.ElDropdown),{onCommand:ge,trigger:"click"},{dropdown:e.withCtx(()=>[e.createVNode(e.unref(Q.ElDropdownMenu),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Q.ElDropdownItem),{command:"left"},{default:e.withCtx(()=>r[0]||(r[0]=[e.createTextVNode("添加左列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"right"},{default:e.withCtx(()=>r[1]||(r[1]=[e.createTextVNode("添加右列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"top"},{default:e.withCtx(()=>r[2]||(r[2]=[e.createTextVNode("添加上列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"bottom"},{default:e.withCtx(()=>r[3]||(r[3]=[e.createTextVNode("添加下列")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"delete-row",divided:""},{default:e.withCtx(()=>r[4]||(r[4]=[e.createTextVNode("删除当前行")])),_:1}),e.createVNode(e.unref(Q.ElDropdownItem),{command:"delete-col"},{default:e.withCtx(()=>r[5]||(r[5]=[e.createTextVNode("删除当前列")])),_:1})]),_:1})]),default:e.withCtx(()=>[j.value?(e.openBlock(),e.createElementBlock("div",_e,[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--window-outline"})])):e.createCommentVNode("",!0)]),_:1}),P.value&&!j.value?(e.openBlock(),e.createElementBlock("div",{key:1,title:"删除",class:"epic-widget-action-item pointer-events-auto",onClick:ye},[e.createVNode(e.unref(ee._sfc_main),{name:"icon--epic--delete-outline-rounded"})])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],512)],2),[[e.vShow,z.value&&((C=e.unref(n).state.checkedNode)==null?void 0:C.id)!=="root"]]),e.withDirectives(e.createElementVNode("div",{ref_key:"hoverWidgetRef",ref:R,class:"epic-hover-widget absolute transition-all pointer-events-none z-998"},null,512),[[e.vShow,c.value&&((b=e.unref(n).state.checkedNode)==null?void 0:b.id)!==((V=e.unref(n).state.hoverNode)==null?void 0:V.id)]])],64)}}}),Be=e.defineComponent({name:"EditNodeItem",__name:"editNodeItem",props:{schemas:{}},emits:["update:schemas"],setup(Z,{emit:L}){const v=e.inject("designer"),o=e.inject("pageSchema"),n=e.inject("revoke"),w=Z,i=L,g=e.computed({get(){return w.schemas},set(d){i("update:schemas",d)}});function R(d){v.setCheckedNode(g.value[d]),v.setDisableHover(!0)}function N(){v.setDisableHover(),n.push(o.schemas,"拖拽组件")}function z(){n.push(o.schemas,"插入组件")}function c(d){var h,u,T;return d.id===((h=o.schemas[0])==null?void 0:h.id)||(T=(u=l.pluginManager.getComponentConfingByType(d.type))==null?void 0:u.editConstraints)!=null&&T.immovable?"unmover-item":"draggable-item"}return(d,h)=>(e.openBlock(),e.createBlock(e.unref(we.draggable),e.mergeProps({modelValue:g.value,"onUpdate:modelValue":h[0]||(h[0]=u=>g.value=u),"item-key":"id","component-data":{type:"transition-group"},class:"epic-draggable-range"},{animation:200,group:"edit-draggable",handle:".draggable-item",ghostClass:"moveing"},{onStart:h[1]||(h[1]=u=>R(u.oldIndex)),onEnd:h[2]||(h[2]=u=>N()),onAdd:h[3]||(h[3]=u=>{R(u.newIndex),z()})}),{item:e.withCtx(({element:u,index:T})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["widget-box",c(u)]),key:T},[e.createVNode(pe,{schema:u},null,8,["schema"])],2))]),_:1},16,["modelValue"]))}}),pe=e.defineComponent({name:"ENodeItem",__name:"nodeItem",props:{schema:{},name:{}},setup(Z){const L=e.useAttrs(),v=e.inject("designer"),o=e.inject("pageManager",{}),n=e.inject("pageSchema",{}),w=e.ref(null);e.provide("nodeAttrs",L);const i=Z,g=e.computed(()=>{var T,s,P,j,$;const c=o.componentInstances.value,d=(T=i.schema)==null?void 0:T.id,h=l.pluginManager.getComponentConfingByType((s=i.schema)==null?void 0:s.type)??null;if(!d||!(c!=null&&c[d]))return null;if(h!=null&&h.defaultSchema.input&&((P=i.schema)==null?void 0:P.noFormItem)!==!0)return(j=c[d+"formItem"])==null?void 0:j.$el;const u=c[d];return(($=u==null?void 0:u.$el)==null?void 0:$.nodeName)==="#text"?null:u==null?void 0:u.$el});e.watch(()=>g.value,c=>{c==null||c.addEventListener("click",R,!1),c==null||c.addEventListener("mouseover",N,!1),c==null||c.addEventListener("mouseout",z,!1)}),e.onUnmounted(()=>{var c,d,h;(c=g.value)==null||c.removeEventListener("click",R,!1),(d=g.value)==null||d.removeEventListener("mouseover",N,!1),(h=g.value)==null||h.removeEventListener("mouseout",z,!1)});function R(c){c.stopPropagation(),v.setCheckedNode(i.schema)}function N(c){var d;i.schema.id!==((d=n.schemas[0])==null?void 0:d.id)&&(c.stopPropagation(),v.setHoverNode(i.schema))}function z(c){c.stopPropagation(),v.setHoverNode(null)}return(c,d)=>{var u,T;const h=e.resolveComponent("ENodeItem");return e.openBlock(),e.createBlock(e.unref(H._sfc_main),{ref_key:"nodeRef",ref:w,componentSchema:i.schema},e.createSlots({_:2},[(T=(u=e.unref(l.pluginManager).getComponentConfingByType(i.schema.type))==null?void 0:u.editConstraints)!=null&&T.childImmovable?{name:"edit-node",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.schema.children,s=>(e.openBlock(),e.createBlock(h,{key:s.id,schema:s},null,8,["schema"]))),128))]),key:"0"}:{name:"edit-node",fn:e.withCtx(()=>[i.schema.children?(e.openBlock(),e.createBlock(Be,{key:0,schemas:i.schema.children,"onUpdate:schemas":d[0]||(d[0]=s=>i.schema.children=s)},null,8,["schemas"])):e.createCommentVNode("",!0)]),key:"1"}]),1032,["componentSchema"])}}}),Ie={class:"min-w-750px rounded h-full"},Te=e.defineComponent({__name:"previewJson",setup(Z,{expose:L}){const v=l.pluginManager.getComponent("modal"),o=l.pluginManager.getComponent("monacoEditor"),n={theme:"vs-light",selectOnLineNumbers:!0,minimap:{enabled:!1},readOnly:!0},w=e.ref(null),i=e.ref(!1),g=e.inject("pageSchema");function R(){i.value=!1}function N(){i.value=!0,w.value?w.value.setValue(JSON.stringify(g,null,2)):setTimeout(()=>{N()},300)}function z(c="epic-data.json"){const d=JSON.stringify(g,null,2);var h=`data:text/json;charset=utf-8,${encodeURIComponent(d)}`,u=document.createElement("a");u.setAttribute("href",h),u.setAttribute("download",c),u.click()}return L({handleOpen:N}),(c,d)=>(e.openBlock(),e.createBlock(e.unref(v),{modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=h=>i.value=h),title:"查看数据",class:"w-900px",width:"900px",onClose:R,onOk:z,okText:"导出数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(e.unref(o),{ref_key:"monacoEditorRef",ref:w,class:"editor h-full",autoToggleTheme:"",readOnly:"",config:n,language:"json"},null,512)])]),_:1},8,["modelValue"]))}}),Ve={class:"epic-edit-toolbar flex items-center justify-between px-2"},Ee={class:"flex-1 h-full flex items-center"},De={key:0,class:"epic-divider"},Re=["title","onClick"],$e={class:"flex-1 h-full flex items-center justify-end"},Me={key:0,class:"flex items-center ml-12px"},Ue={class:"pr-8px w-82px cursor-pointer"},Le={class:"epic-device h-28px items-center gap-1 rounded-md border p-2px flex"},ze=["title","onClick"],Oe=e.defineComponent({__name:"toolbar",setup(Z){const L=l.pluginManager.getComponent("select"),{canvasScale:v,disabledZoom:o}=H.useStore(),n=e.ref("pc"),w=e.inject("pageSchema"),i=e.inject("designer"),g=e.inject("revoke"),R=e.ref(null),N=[{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"}],z=e.computed(()=>[{icon:"icon--epic--trash",title:"清空",on:s},{icon:"icon--epic--undo",title:"撤销",on:u,disabled:!g.recordList.value.length,divider:!0},{icon:"icon--epic--redo",title:"重做",on:T,disabled:!g.undoList.value.length}]),c=e.ref(null),d=e.computed({get(){return`${(v.value*100).toFixed(0)}%`},set(x){const _=parseFloat(x);v.value=_/100}}),h=[{label:"60%",value:"60%"},{label:"80%",value:"80%"},{label:"100%",value:"100%"},{label:"120%",value:"120%"},{label:"140%",value:"140%"}];function u(){const x=g.undo();x&&(l.deepCompareAndModify(w.schemas,x),i.setCheckedNode(w.schemas[0]))}function T(){const x=g.redo();x&&(l.deepCompareAndModify(w.schemas,x),i.setCheckedNode(w.schemas[0]))}function s(){i.reset()}function P(x){var q;const _=(q=x.target.files)==null?void 0:q[0];if(!_)return;x.target.value=null;const k=new FileReader;k.readAsText(_),k.onload=G=>{var M;j((M=G.target)==null?void 0:M.result)}}function j(x){try{let _=JSON.parse(x??"");_.schemas||(_=l.convertKFormData(_)),l.deepCompareAndModify(w,_)}catch(_){console.error(_)}}function $(x){i.handleToggleDeviceMode(x),n.value=x;const _={pc:{},pad:{width:"780px",mode:x},mobile:{width:"390px",height:"844px",mode:x}};w.canvas=_[x],console.log("%c [ pageSchema ]-248","font-size:13px; background:pink; color:#bf2c9f;",w)}return(x,_)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ve,[e.createElementVNode("div",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,(k,q)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:q},[k.divider?(e.openBlock(),e.createElementBlock("div",De)):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(ee._sfc_main),{name:k.icon},null,8,["name"])],10,Re)],64))),128))]),e.withDirectives(e.createElementVNode("input",{type:"file",ref_key:"fileRef",ref:c,accept:".json,.txt",onChange:P},null,544),[[e.vShow,!1]]),e.createElementVNode("div",$e,[e.unref(o)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",Ue,[e.createVNode(e.unref(L),{value:d.value,"onUpdate:value":_[0]||(_[0]=k=>d.value=k),modelValue:d.value,"onUpdate:modelValue":_[1]||(_[1]=k=>d.value=k),options:h,size:"small"},null,8,["value","modelValue"])])])),e.createElementVNode("div",Le,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(N,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===n.value}]),onClick:q=>$(k.key)},[e.createVNode(e.unref(ee._sfc_main),{name:k.icon},null,8,["name"])],10,ze)),64))])])]),e.createVNode(Te,{ref_key:"previewJson",ref:R},null,512)],64))}}),He={class:"h-full flex flex-col relative"},je=["draggable"],Fe=e.defineComponent({__name:"editScreenContainer",setup(Z){const L=e.inject("pageSchema"),v=e.ref(null),o=e.ref(null),n=e.ref(null),{pressSpace:w,disabledZoom:i}=H.useStore(),{handleElementDragStart:g,handleElementDrag:R,handleElementDragEnd:N}=H.useElementDrag(v),{width:z,height:c}=H.useElementSize(v),{canvasScale:d,handleZoom:h}=H.useElementZoom(o);let u=0,T=0;const s=e.ref({}),P=e.ref({}),j=e.ref({}),$=e.shallowRef({width:0,height:0});e.watchEffect(_),e.watch(j,()=>{e.nextTick(x)});function x(){n.value&&($.value={width:n.value.clientWidth,height:n.value.clientHeight})}function _(){var M,E;j.value={width:((M=L.canvas)==null?void 0:M.width)??"0",height:((E=L.canvas)==null?void 0:E.height)??"0"}}H.watchOnce(z,k),e.watch($,k);function k(){let M=$.value.width||u,E=$.value.height||T;s.value={width:z.value+M+"px",height:c.value+E+"px"},P.value={width:M+"px",height:E+"px"},q()}function q(){e.nextTick(()=>{var K;let M=$.value.width||u;const U=($.value.height||T)/2,J=M/2;(K=v.value)==null||K.scrollTo(J,U)})}H.useResizeObserver(v,G),H.useResizeObserver(o,G);function G(){var E;if(!v.value)return;const M=v.value.getBoundingClientRect();if(u=M.width-60,T=M.height-80,!i.value)if($.value.width===0)d.value=1;else{const U=(u-20)/$.value.width,J=T/($.value.height||((E=o.value)==null?void 0:E.clientHeight)||1),K=Math.abs(U-1)<Math.abs(J-1);let F=1;K?F=U:F=J,(U<1||J<1)&&(F=Math.min(U,J)),F<1.4&&F>.5&&(d.value=F)}H.debounce(k,50)()}return(M,E)=>(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(Oe),e.createElementVNode("div",{ref_key:"editScreenContainerRef",ref:v,class:e.normalizeClass(["flex-1 overflow-auto overflow-y-hidden epic-edit-screen-container",{"cursor-grab":e.unref(w)}]),draggable:e.unref(w),onWheel:E[0]||(E[0]=(...U)=>e.unref(h)&&e.unref(h)(...U)),onDragstart:E[1]||(E[1]=(...U)=>e.unref(g)&&e.unref(g)(...U)),onDragend:E[2]||(E[2]=(...U)=>e.unref(N)&&e.unref(N)(...U)),onDrag:E[3]||(E[3]=(...U)=>e.unref(R)&&e.unref(R)(...U))},[e.createElementVNode("div",{id:"canvasContainer",class:"flex items-center justify-center",style:e.normalizeStyle(s.value)},[e.createElementVNode("div",{ref_key:"draggableElRef",ref:o,class:"transition-all"},[e.createElementVNode("div",{class:e.normalizeClass({"pointer-events-none":e.unref(w)}),style:e.normalizeStyle(P.value)},[e.renderSlot(M.$slots,"default")],6)],512)],4)],42,je),e.createElementVNode("div",{ref_key:"sizeBoxRef",ref:n,class:"absolute top-0 pointer-events-none",style:e.normalizeStyle(j.value)},null,4)]))}}),Ae={class:"epic-edit-canvas"},Pe=e.defineComponent({__name:"index",setup(Z){const L=e.ref(null),v=e.ref(null),o=e.inject("pageSchema"),n=e.computed(()=>o.schemas[0]),w=e.computed(()=>({width:"100%",height:"100%"}));return e.onMounted(()=>{var i;(i=v.value)==null||i.handleInit(L.value)}),(i,g)=>(e.openBlock(),e.createElementBlock("section",Ae,[e.createVNode(Fe,null,{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"epicEditRangeRef",ref:L,class:"epic-edit-range rounded-md overflow-auto relative",style:e.normalizeStyle(w.value)},[e.createVNode(pe,{schema:n.value},null,8,["schema"]),e.createVNode(be,{ref_key:"ePreviewWidgetsRef",ref:v},null,512)],4)]),_:1})]))}});exports.default=Pe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./pluginManager-DWHAX8kP.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("./vuedraggable.umd-BqhSJIAi.cjs"),c=require("./pluginManager-DWHAX8kP.cjs"),h=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./index-Btz7ejRx.cjs");require("element-plus");const C=require("./index-BoL2PSBk.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={key:0,class:"pl-4"},B=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(_,{emit:f}){const o=_,m=c.pluginManager.getComponent("input"),v=e.inject("tree",!1),d=f,r=k.useVModel(o,"modelValue",d);function s(l){const n={label:"",value:""};l.children?l.children.push(n):l.children=[n]}function V(l){r.value=r.value.filter((n,p)=>p!==l)}return(l,n)=>{const p=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(b.draggable),{modelValue:e.unref(r),"onUpdate:modelValue":n[0]||(n[0]=a=>e.isRef(r)?r.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:g})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(v)?"grid-cols-[16px_auto_auto_16px_16px]":"grid-cols-[16px_auto_auto_16px]","option-item text-16px grid text-$epic-text-secondary gap-2 items-center mb-2"])},[e.createVNode(e.unref(h._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(m),{modelValue:a.label,"onUpdate:modelValue":t=>a.label=t,value:a.label,"onUpdate:value":t=>a.label=t,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(m),{modelValue:a.value,"onUpdate:modelValue":t=>a.value=t,value:a.value,"onUpdate:value":t=>a.value=t,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(v)?(e.openBlock(),e.createBlock(e.unref(h._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:t=>s(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(h._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:t=>V(g)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(p,{modelValue:a.children,"onUpdate:modelValue":t=>a.children=t},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),S={class:""},U={class:"epic-tabs-box"},M=["title","onClick"],D={key:0},I={key:1},O={style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},q=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(_,{emit:f}){const{t:o}=C.useLocale(),m=c.pluginManager.getComponent("button"),v=c.pluginManager.getComponent("select"),d=e.ref([]),r=e.reactive({title:o("static")}),s=_,V=f;c.EventBus.on("deleteSourceData",t=>{n.value===t&&(n.value="",l.value=[])}),c.EventBus.on("updateSource",t=>{d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id}))}),e.onMounted(()=>{d.value=c.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id}))});const l=k.useVModel(s,"modelValue",V),n=k.useVModel(s,"dynamicId",V);e.watch(()=>n.value,async()=>{n.value?r.title=o("dynamic"):r.title=o("static")},{immediate:!0});const p=[{title:o("static")},{title:o("dynamic")}];async function a(t){r.title=t.title,t.title===o("static")?(l.value=[],n.value=""):(l.value=[],d.value=c.pluginManager.sourceData.map(u=>({...u,label:u.apiName,value:u.id})))}s.modelValue,e.provide("tree",s.tree);function g(){const t=e.reactive({label:"",value:""});l.value.length?l.value=[...l.value,t]:l.value=[t]}return(t,u)=>{var y;return e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",null,[e.createElementVNode("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(p,(i,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:r.title===i.title}]),key:x,title:i.title,onClick:w=>a(i)},e.toDisplayString(i.title),11,M)),64))]),r.title===e.unref(o)("static")?(e.openBlock(),e.createElementBlock("div",D,[e.withDirectives(e.createElementVNode("div",{class:"py-4 my-2 text-center text-gray-400 bg-white"},e.toDisplayString(e.unref(o)("noOptions")),513),[[e.vShow,!((y=e.unref(l))!=null&&y.length)]]),e.createVNode(B,{modelValue:e.unref(l),"onUpdate:modelValue":u[0]||(u[0]=i=>e.isRef(l)?l.value=i:null)},null,8,["modelValue"]),e.createVNode(e.unref(m),{onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("addOption")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("span",O,e.toDisplayString(e.unref(o)("dataSources")),1),e.createVNode(e.unref(v),{modelValue:e.unref(n),"onUpdate:modelValue":u[1]||(u[1]=i=>e.isRef(n)?n.value=i:null),placeholder:e.unref(o)("pleaseSelectDataSource"),clearable:"",options:d.value},null,8,["modelValue","placeholder","options"])]))])])}}}),$=N._export_sfc(q,[["__scopeId","data-v-0d8ca874"]]);exports.default=$;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, ref as f, onMounted as v, openBlock as g, createElementBlock as V, createVNode as b, unref as n, isRef as k } from "vue";
|
|
2
2
|
import { p as t, E as c } from "./pluginManager-BCnrHPYv.js";
|
|
3
|
-
import { g as D } from "./index-
|
|
3
|
+
import { g as D } from "./index-D83uXkXA.js";
|
|
4
4
|
import { u as S } from "./index-B1s67XDZ.js";
|
|
5
5
|
const _ = { class: "" }, N = /* @__PURE__ */ m({
|
|
6
6
|
__name: "index",
|
|
@@ -3,7 +3,7 @@ import { n as q, p as w, g as X, a as Y } from "./pluginManager-BCnrHPYv.js";
|
|
|
3
3
|
import { _ as D } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
4
4
|
import { d as Z } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
5
5
|
import { _ as ee } from "./tree.vue_vue_type_script_setup_true_lang-BsVyMb-n.js";
|
|
6
|
-
import { _ as te } from "./index-
|
|
6
|
+
import { _ as te } from "./index-D83uXkXA.js";
|
|
7
7
|
const ne = { class: "epic-event-info" }, oe = ["title"], le = { class: "epic-event-btn text-lg flex items-center text-$epic-text-secondary" }, ae = { class: "epic-action-editor-main" }, se = { class: "epic-editor-item rounded" }, ie = { class: "w-36px flex items-center text-lg" }, ce = { class: "flex-1" }, de = { key: 0 }, ue = { key: 1 }, re = { key: 2 }, pe = { class: "epic-action-box text-lg text-$epic-text-medium" }, me = ["onClick"], ve = ["onClick"], fe = /* @__PURE__ */ U({
|
|
8
8
|
__name: "EActionEditorItem",
|
|
9
9
|
props: {
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-Btz7ejRx.cjs"),e=require("./pluginManager-DWHAX8kP.cjs");exports.EBuilder=a._sfc_main$1;exports.EDesigner=a._sfc_main$2;exports.ENode=a._sfc_main;exports.debounce=a.debounce;exports.getDarkState=a.getDarkState;exports.initStore=a.initStore;exports.useDark=a.useDark;exports.useElementDrag=a.useElementDrag;exports.useElementZoom=a.useElementZoom;exports.useKeyPress=a.useKeyPress;exports.usePageManager=a.usePageManager;exports.useRevoke=a.useRevoke;exports.useStore=a.useStore;exports.useTheme=a.useTheme;exports.useTimedQuery=a.useTimedQuery;exports.EventBus=e.EventBus;exports.PluginManager=e.PluginManager;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.loadAsyncComponent=e.loadAsyncComponent;exports.mapSchemas=e.mapSchemas;exports.pluginManager=e.pluginManager;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-
|
|
1
|
+
import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-D83uXkXA.js";
|
|
2
2
|
import { E as S, P as E, c as B, q as D, a as P, d as k, b as F, n as I, o as M, f as v, h as C, j as N, k as b, e as j, g as q, i as x, l as A, m as K, p as T, r as U, s as V } from "./pluginManager-BCnrHPYv.js";
|
|
3
3
|
export {
|
|
4
4
|
s as EBuilder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),U=require("./axios-tuVKNgv9.cjs"),h=require("./index-BoL2PSBk.cjs"),j=require("element-plus"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=l.defineComponent({__name:"selectPage",props:{modelValue:[String,Number],placeholder:String,requestFn:{type:Function,default:()=>{}},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},pageSize:{type:Number,default:20},defaultData:{type:Object,default:()=>{}},componentSchema:{type:Object,default:()=>{}},sourceDateUrl:{type:String,default:""}},emits:["update:modelValue","update:modelValueLabel"],setup(k,{emit:C}){const D=`paginated-select-dropdown-${Math.random().toString(36).slice(2,8)}`,a=k;console.log("%c [ ]-37","font-size:13px; background:pink; color:#bf2c9f;",a),console.log("%c [ ]-37","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);const _=C,v=l.ref(a.modelValue);l.watch(()=>a.modelValue,e=>{v.value=e}),l.watch(v,e=>{_("update:modelValue",e);let t=r.value.find(o=>o.value===e);_("update:modelValueLabel",{label:t.label||a.defaultData.label,value:t.value||a.defaultData.value})});const r=l.ref(a.defaultData&&Object.keys(a.defaultData).length?[a.defaultData]:[]),d=l.ref(!1),p=l.ref(0),c=l.ref(1),x=l.ref(""),f=l.ref(!1),i=l.ref(null),m=l.ref(null);function O(){r.value=[],p.value=0,c.value=1,f.value=!1}async function g(){var e,t,o,u,P,B,T,z,q,E;if(!(d.value||f.value)){d.value=!0;try{const s=await U.axios({url:n.value.url,method:n.value.method,data:n.value.body?JSON.parse(n.value.body):{},params:n.value.params?{...JSON.parse(n.value.params),[`${(t=(e=a==null?void 0:a.componentSchema)==null?void 0:e.componentProps)==null?void 0:t.pageKey}`]:c.value,[`${(u=(o=a==null?void 0:a.componentSchema)==null?void 0:o.componentProps)==null?void 0:u.searchKey}`]:x.value}:{},headers:{...JSON.parse(n.value.headers),Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(n.value&&n.value.dataPath){const $=((P=n.value)==null?void 0:P.dataPath.split(".")).reduce((w,V)=>w[V],s.data),K=(B=n.value)==null?void 0:B.dataPath.split(".");K.pop();const H=K.reduce((w,V)=>w[V],s.data);let L=b($,n.value.dataKey,n.value.dataValue);c.value===1?r.value=L:r.value=r.value.concat(L),p.value=H[(z=(T=a==null?void 0:a.componentSchema)==null?void 0:T.componentProps)==null?void 0:z.pageTotalKey]}else{let S=b(s.data,n.value.dataKey,n.value.dataValue);c.value===1?r.value=S:r.value=r.value.concat(S),p.value=s.data[(E=(q=a==null?void 0:a.componentSchema)==null?void 0:q.componentProps)==null?void 0:E.pageTotalKey]}r.value.length>=p.value&&(f.value=!0)}catch(s){console.error("fetch error:",s)}finally{d.value=!1}}}const n=l.ref();function b(e,t,o){return e&&Object.prototype.toString.call(e)==="[object Array]"?e.map(u=>u.children&&u.children.length?{label:u[t],value:u[o]+"",children:b(u.children,t,o)}:{label:u[t],value:u[o]+""}):[]}async function N(){var t,o;console.log("%c [ ]-171","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);let e=await U.axios({url:a.sourceDateUrl,method:"get",params:{id:(o=(t=a==null?void 0:a.componentSchema)==null?void 0:t.componentProps)==null?void 0:o.dynamicId},headers:{Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.data.code===200&&(n.value=e.data.data)}l.watch(()=>a.sourceDateUrl,()=>{a.sourceDateUrl&&N()},{immediate:!0});function A(e){x.value=e,c.value=1,O(),g()}function F(e){e?(O(),g(),l.nextTick(()=>setTimeout(I,0))):M()}function I(){const e=document.querySelector(`.${D} .el-select-dropdown__wrap`);e?(i.value=e,e.addEventListener("scroll",y)):(m.value=new MutationObserver(()=>{const t=document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");t&&(i.value=t,t.addEventListener("scroll",y),m.value.disconnect())}),m.value.observe(document.body,{childList:!0,subtree:!0}))}function M(){var e;i.value&&i.value.removeEventListener("scroll",y),(e=m.value)==null||e.disconnect()}function y(){const e=i.value;if(!e||d.value||f.value)return;e.scrollTop+e.clientHeight>=e.scrollHeight-10&&(c.value++,g())}return(e,t)=>(l.openBlock(),l.createBlock(l.unref(j.ElSelect),{modelValue:v.value,"onUpdate:modelValue":t[0]||(t[0]=o=>v.value=o),filterable:"",remote:"",clearable:"",placeholder:k.placeholder,"remote-method":A,loading:d.value,teleported:!0,onVisibleChange:F,"popper-class":D,style:{width:"100%"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,o=>(l.openBlock(),l.createBlock(l.unref(j.ElOption),{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"]))}}),R=J._export_sfc(Z,[["__scopeId","data-v-5070834f"]]);exports.default=R;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as W, ref as u, watch as
|
|
2
|
-
import { a as
|
|
1
|
+
import { defineComponent as W, ref as u, watch as V, openBlock as k, createBlock as j, unref as A, withCtx as G, createElementBlock as Q, Fragment as X, renderList as Y, nextTick as ee } from "vue";
|
|
2
|
+
import { a as F } from "./axios-CXDYiOMX.js";
|
|
3
3
|
import { a as h } from "./index-B1s67XDZ.js";
|
|
4
4
|
import { ElSelect as ae, ElOption as le } from "element-plus";
|
|
5
5
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -21,40 +21,40 @@ const oe = /* @__PURE__ */ W({
|
|
|
21
21
|
sourceDateUrl: { type: String, default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue", "update:modelValueLabel"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
24
|
+
setup(_, { emit: q }) {
|
|
25
|
+
const O = `paginated-select-dropdown-${Math.random().toString(36).slice(2, 8)}`, a = _;
|
|
26
26
|
console.log("%c [ ]-37", "font-size:13px; background:pink; color:#bf2c9f;", a), console.log("%c [ ]-37", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const z = q, v = u(a.modelValue);
|
|
28
|
+
V(
|
|
29
29
|
() => a.modelValue,
|
|
30
30
|
(e) => {
|
|
31
31
|
v.value = e;
|
|
32
32
|
}
|
|
33
|
-
),
|
|
34
|
-
|
|
33
|
+
), V(v, (e) => {
|
|
34
|
+
z("update:modelValue", e);
|
|
35
35
|
let l = n.value.find((t) => t.value === e);
|
|
36
|
-
|
|
36
|
+
z("update:modelValueLabel", {
|
|
37
37
|
label: l.label || a.defaultData.label,
|
|
38
38
|
value: l.value || a.defaultData.value
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1), p = u(0), c = u(1),
|
|
42
|
-
function
|
|
41
|
+
const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1), p = u(0), c = u(1), P = u(""), m = u(!1), i = u(null), f = u(null);
|
|
42
|
+
function T() {
|
|
43
43
|
n.value = [], p.value = 0, c.value = 1, m.value = !1;
|
|
44
44
|
}
|
|
45
45
|
async function g() {
|
|
46
|
-
var e, l, t, r,
|
|
46
|
+
var e, l, t, r, x, B, E, K, L, U;
|
|
47
47
|
if (!(s.value || m.value)) {
|
|
48
48
|
s.value = !0;
|
|
49
49
|
try {
|
|
50
|
-
const d = await
|
|
50
|
+
const d = await F({
|
|
51
51
|
url: o.value.url,
|
|
52
52
|
method: o.value.method,
|
|
53
53
|
data: o.value.body ? JSON.parse(o.value.body) : {},
|
|
54
54
|
params: o.value.params ? {
|
|
55
55
|
...JSON.parse(o.value.params),
|
|
56
56
|
[`${(l = (e = a == null ? void 0 : a.componentSchema) == null ? void 0 : e.componentProps) == null ? void 0 : l.pageKey}`]: c.value,
|
|
57
|
-
[`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]:
|
|
57
|
+
[`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]: P.value
|
|
58
58
|
} : {},
|
|
59
59
|
headers: {
|
|
60
60
|
...JSON.parse(o.value.headers),
|
|
@@ -66,14 +66,14 @@ const oe = /* @__PURE__ */ W({
|
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
if (o.value && o.value.dataPath) {
|
|
69
|
-
const Z = ((
|
|
69
|
+
const Z = ((x = o.value) == null ? void 0 : x.dataPath.split(".")).reduce((w, D) => w[D], d.data), C = (B = o.value) == null ? void 0 : B.dataPath.split(".");
|
|
70
70
|
C.pop();
|
|
71
|
-
const R = C.reduce((w,
|
|
71
|
+
const R = C.reduce((w, D) => w[D], d.data);
|
|
72
72
|
let N = b(Z, o.value.dataKey, o.value.dataValue);
|
|
73
|
-
c.value === 1 ? n.value = N : n.value = n.value.concat(N), p.value = R[(
|
|
73
|
+
c.value === 1 ? n.value = N : n.value = n.value.concat(N), p.value = R[(K = (E = a == null ? void 0 : a.componentSchema) == null ? void 0 : E.componentProps) == null ? void 0 : K.pageTotalKey];
|
|
74
74
|
} else {
|
|
75
75
|
let S = b(d.data, o.value.dataKey, o.value.dataValue);
|
|
76
|
-
c.value === 1 ? n.value = S : n.value = n.value.concat(S), p.value = d.data[(
|
|
76
|
+
c.value === 1 ? n.value = S : n.value = n.value.concat(S), p.value = d.data[(U = (L = a == null ? void 0 : a.componentSchema) == null ? void 0 : L.componentProps) == null ? void 0 : U.pageTotalKey];
|
|
77
77
|
}
|
|
78
78
|
n.value.length >= p.value && (m.value = !0);
|
|
79
79
|
} catch (d) {
|
|
@@ -97,7 +97,7 @@ const oe = /* @__PURE__ */ W({
|
|
|
97
97
|
async function I() {
|
|
98
98
|
var l, t;
|
|
99
99
|
console.log("%c [ ]-171", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
|
|
100
|
-
let e = await
|
|
100
|
+
let e = await F({
|
|
101
101
|
url: a.sourceDateUrl,
|
|
102
102
|
method: "get",
|
|
103
103
|
params: {
|
|
@@ -113,15 +113,21 @@ const oe = /* @__PURE__ */ W({
|
|
|
113
113
|
});
|
|
114
114
|
e.data.code === 200 && (o.value = e.data.data);
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
V(
|
|
117
|
+
() => a.sourceDateUrl,
|
|
118
|
+
() => {
|
|
119
|
+
a.sourceDateUrl && I();
|
|
120
|
+
},
|
|
121
|
+
{ immediate: !0 }
|
|
122
|
+
);
|
|
117
123
|
function $(e) {
|
|
118
|
-
|
|
124
|
+
P.value = e, c.value = 1, T(), g();
|
|
119
125
|
}
|
|
120
126
|
function J(e) {
|
|
121
|
-
e ? (
|
|
127
|
+
e ? (T(), g(), ee(() => setTimeout(M, 0))) : H();
|
|
122
128
|
}
|
|
123
129
|
function M() {
|
|
124
|
-
const e = document.querySelector(`.${
|
|
130
|
+
const e = document.querySelector(`.${O} .el-select-dropdown__wrap`);
|
|
125
131
|
e ? (i.value = e, e.addEventListener("scroll", y)) : (f.value = new MutationObserver(() => {
|
|
126
132
|
const l = document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");
|
|
127
133
|
l && (i.value = l, l.addEventListener("scroll", y), f.value.disconnect());
|
|
@@ -136,22 +142,22 @@ const oe = /* @__PURE__ */ W({
|
|
|
136
142
|
if (!e || s.value || m.value) return;
|
|
137
143
|
e.scrollTop + e.clientHeight >= e.scrollHeight - 10 && (c.value++, g());
|
|
138
144
|
}
|
|
139
|
-
return (e, l) => (
|
|
145
|
+
return (e, l) => (k(), j(A(ae), {
|
|
140
146
|
modelValue: v.value,
|
|
141
147
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => v.value = t),
|
|
142
148
|
filterable: "",
|
|
143
149
|
remote: "",
|
|
144
150
|
clearable: "",
|
|
145
|
-
placeholder:
|
|
151
|
+
placeholder: _.placeholder,
|
|
146
152
|
"remote-method": $,
|
|
147
153
|
loading: s.value,
|
|
148
154
|
teleported: !0,
|
|
149
155
|
onVisibleChange: J,
|
|
150
|
-
"popper-class":
|
|
156
|
+
"popper-class": O,
|
|
151
157
|
style: { width: "100%" }
|
|
152
158
|
}, {
|
|
153
159
|
default: G(() => [
|
|
154
|
-
(
|
|
160
|
+
(k(!0), Q(X, null, Y(n.value, (t) => (k(), j(A(le), {
|
|
155
161
|
key: t.value,
|
|
156
162
|
label: t.label,
|
|
157
163
|
value: t.value
|
|
@@ -160,7 +166,7 @@ const oe = /* @__PURE__ */ W({
|
|
|
160
166
|
_: 1
|
|
161
167
|
}, 8, ["modelValue", "placeholder", "loading"]));
|
|
162
168
|
}
|
|
163
|
-
}), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-
|
|
169
|
+
}), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-5070834f"]]);
|
|
164
170
|
export {
|
|
165
171
|
ie as default
|
|
166
172
|
};
|