epic-designer-gold 0.0.13 → 0.0.14
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-CqQCeL9p.js → attributeView-BN2nA4jI.js} +2 -2
- package/dist/attributeView-lpFl3t4a.cjs +1 -0
- package/dist/axios-CYGTE3lR.cjs +6 -0
- package/dist/axios-ITY6Uw7A.js +2085 -0
- package/dist/core/components/builder/src/builder.vue.d.ts +2 -0
- package/dist/core/components/node/src/node.vue.d.ts +2 -0
- package/dist/core/components/tree/src/tree.vue.d.ts +1 -1
- package/dist/{eventView-C_THyz3W.js → eventView-BKpQ9YIh.js} +2 -2
- package/dist/eventView-DgqXxWY1.cjs +1 -0
- package/dist/index-1afOcXnV.cjs +1 -0
- package/dist/{index-M-hTLR0c.js → index-ASoFJnMl.js} +1 -1
- package/dist/index-B03W7FZR.cjs +1 -0
- package/dist/index-BHmIF8aI.cjs +10 -0
- package/dist/index-BJlPL6eL.cjs +1 -0
- package/dist/index-BXNPTGKl.cjs +1 -0
- package/dist/{index-BC_6e5pJ.js → index-BlJ0TQyn.js} +1 -1
- package/dist/index-By5rfqCj.cjs +1 -0
- package/dist/{index-DtXxkuvD.js → index-BzsFImwK.js} +2 -2
- package/dist/{index-Ba0ZjQgI.js → index-C-XUgjda.js} +1 -1
- package/dist/{index-HM72iSCq.js → index-C4sdhgF2.js} +1 -1
- package/dist/index-C6ceZM1C.cjs +1 -0
- package/dist/{index-Dm_60RQ9.js → index-CCTMCqiz.js} +3 -4
- package/dist/index-CGHtM1lr.cjs +1 -0
- package/dist/{index-S4XwR1vD.js → index-CL_7RzF7.js} +39 -40
- package/dist/index-CNzcV-bQ.cjs +1 -0
- package/dist/{index-sZ9OfgE1.cjs → index-CdgT4gQu.cjs} +1 -1
- package/dist/index-CkRhCvJK.cjs +1 -0
- package/dist/index-D8YBJFH6.cjs +1 -0
- package/dist/{index-DBj3eppg.js → index-DPfAejnH.js} +2 -2
- package/dist/{index-GtUWspi3.js → index-DZYSBPVO.js} +2 -2
- package/dist/index-DpzLP1Zp.cjs +1 -0
- package/dist/{index-BqPDmqv7.js → index-Mf82MCCF.js} +2 -2
- package/dist/index-Ol-YPkY9.js +1550 -0
- package/dist/index-YHlIFgpT.cjs +1 -0
- package/dist/{index-DAWH9Tr_.js → index-Yx99TN9O.js} +2 -2
- package/dist/{index-BMnsWYrT.js → index-kWCcT4er.js} +3 -3
- package/dist/{index-BnRo1212.cjs → index-lH0_mCG-.cjs} +1 -1
- package/dist/{index-uaq_HmHi.js → index-ooVzYa5L.js} +1 -1
- package/dist/index-qJNRPNIj.js +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/outline-CJSEUbgc.cjs +1 -0
- package/dist/{outline-utbOTCBV.js → outline-yy4pIEi3.js} +2 -2
- package/dist/select-B479QwwL.cjs +1 -0
- package/dist/select-CtUVWh2M.js +29 -0
- package/dist/{sign-CdhDIjlg.js → sign-BDZCr3wJ.js} +11 -12
- package/dist/sign-Gwu2PIRy.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-DX_XKKmF.js → styleView-CXp05_Ar.js} +2 -2
- package/dist/styleView-auUK19Dr.cjs +1 -0
- package/dist/tree.vue_vue_type_script_setup_true_lang-RWTXU6lO.cjs +1 -0
- package/dist/{tree.vue_vue_type_script_setup_true_lang-Bnl1CGxG.js → tree.vue_vue_type_script_setup_true_lang-uR4G8wa_.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +2 -2
- package/package.json +1 -1
- package/dist/attributeView-CfMG9ANQ.cjs +0 -1
- package/dist/axios-CXDYiOMX.js +0 -1704
- package/dist/axios-tuVKNgv9.cjs +0 -6
- package/dist/eventView-CSJb3Zam.cjs +0 -1
- package/dist/index-B3dTIoEC.cjs +0 -1
- package/dist/index-Bd5nBb_T.cjs +0 -1
- package/dist/index-Bs6GdgDl.cjs +0 -1
- package/dist/index-CaIsXqm5.cjs +0 -1
- package/dist/index-Ctr7oJRf.cjs +0 -1
- package/dist/index-CuxnFxdY.cjs +0 -1
- package/dist/index-Cz47jN8A.cjs +0 -1
- package/dist/index-DAk3CFkW.cjs +0 -1
- package/dist/index-DBQ-tc2k.cjs +0 -1
- package/dist/index-DWjMyXtP.cjs +0 -1
- package/dist/index-DZ5RBl4U.cjs +0 -1
- package/dist/index-MwVOPR2b.js +0 -1509
- package/dist/index-jsf_Tgj1.js +0 -4
- package/dist/index-mxP1Ba2T.cjs +0 -1
- package/dist/index-p6doDa9j.cjs +0 -10
- package/dist/outline-UAdT8ap6.cjs +0 -1
- package/dist/pluginManager-D8PM7ICc.js +0 -383
- package/dist/pluginManager-itCTrGag.cjs +0 -1
- package/dist/select-B8HCbraJ.js +0 -29
- package/dist/select-D6bRz5G2.cjs +0 -1
- package/dist/sign-Dx0d5kWo.cjs +0 -1
- package/dist/styleView-0rthSdVL.cjs +0 -1
- package/dist/tree.vue_vue_type_script_setup_true_lang-BVopU0uv.cjs +0 -1
package/dist/index-jsf_Tgj1.js
DELETED
package/dist/index-mxP1Ba2T.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),E=require("./vuedraggable.umd-BqhSJIAi.cjs"),p=require("./pluginManager-itCTrGag.cjs"),y=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),C=require("./index-p6doDa9j.cjs"),B=require("element-plus"),S=require("./axios-tuVKNgv9.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"pl-4"},O=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(k,{emit:b}){const x=k,g=p.pluginManager.getComponent("input"),d=e.inject("tree",!1),s=b,c=C.useVModel(x,"modelValue",s);function _(t){const i={label:"",value:""};t.children?t.children.push(i):t.children=[i]}function u(t){c.value=c.value.filter((i,m)=>m!==t)}return(t,i)=>{const m=e.resolveComponent("EOptionItem");return e.openBlock(),e.createBlock(e.unref(E.draggable),{modelValue:e.unref(c),"onUpdate:modelValue":i[0]||(i[0]=a=>e.isRef(c)?c.value=a:null),"item-key":"id","component-data":{type:"transition-group"},group:"option-list",handle:".handle",animation:200},{item:e.withCtx(({element:a,index:v})=>[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(d)?"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(y._sfc_main),{class:"mr-2 cursor-move handle",name:"icon--epic--drag"}),e.createVNode(e.unref(g),{modelValue:a.label,"onUpdate:modelValue":r=>a.label=r,value:a.label,"onUpdate:value":r=>a.label=r,placeholder:"label"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.createVNode(e.unref(g),{modelValue:a.value,"onUpdate:modelValue":r=>a.value=r,value:a.value,"onUpdate:value":r=>a.value=r,placeholder:"value"},null,8,["modelValue","onUpdate:modelValue","value","onUpdate:value"]),e.unref(d)?(e.openBlock(),e.createBlock(e.unref(y._sfc_main),{key:0,class:"cursor-pointer text-lg!",name:"icon--epic--add-rounded",onClick:r=>_(a)},null,8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(e.unref(y._sfc_main),{class:"hover:text-red cursor-pointer",name:"icon--epic--delete-outline-rounded",onClick:r=>u(v)},null,8,["onClick"])],2),a.children?(e.openBlock(),e.createElementBlock("div",M,[e.createVNode(m,{modelValue:a.children,"onUpdate:modelValue":r=>a.children=r},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),I={class:""},q={class:"epic-tabs-box"},w=["title","onClick"],$={key:0},z={class:"py-4 my-2 text-center text-gray-400 bg-white"},j={key:1},A=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(k,{emit:b}){const x=p.pluginManager.getComponent("button"),g=p.pluginManager.getComponent("select"),d=e.ref([]),s=e.reactive({title:"静态"}),c=k,_=b;p.EventBus.on("updateSource",n=>{d.value=p.pluginManager.sourceData.map(l=>({...l,label:l.apiName,value:l.id})),console.log("%c [ ]-79","font-size:13px; background:pink; color:#bf2c9f;",t.value),v(t.value)}),e.onMounted(()=>{d.value=p.pluginManager.sourceData.map(n=>({...n,label:n.apiName,value:n.id})),console.log("%c [ ]-89","font-size:13px; background:pink; color:#bf2c9f;",t.value),v(t.value)});const u=C.useVModel(c,"modelValue",_),t=C.useVModel(c,"dynamicId",_);function i(n){return n&&Object.prototype.toString.call(n)==="[object Array]"?n:(B.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>t.value,async()=>{t.value?s.title="动态":s.title="静态"},{immediate:!0});const m=[{title:"静态"},{title:"动态"}];async function a(n){s.title=n.title,n.title==="静态"&&(t.value="")}async function v(n){const l=d.value.find(o=>o.id===n);let f=await S.axios({method:(l==null?void 0:l.method)||"get",url:l.url,params:l!=null&&l.params?JSON.parse(l==null?void 0:l.params):{},data:l!=null&&l.data?JSON.parse(l==null?void 0:l.data):{},headers:l!=null&&l.header?JSON.parse(l==null?void 0:l.header):{}});if(l&&(l!=null&&l.dataPath)){const h=l.dataPath.split(".").reduce((V,N)=>V[N],f.data);console.log("%c [ ]-148","font-size:13px; background:pink; color:#bf2c9f;",h),u.value=i(h).map(V=>({label:V[l.dataKey],value:V[l.dataValue]}))}else u.value=i(f.data).map(o=>({label:o[l.dataKey],value:o[l.dataValue]}))}c.modelValue,e.provide("tree",c.tree);function r(){const n=e.reactive({label:"",value:""});u.value.length?u.value=[...u.value,n]:u.value=[n]}return(n,l)=>{var f;return e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("div",null,[e.createElementVNode("div",q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,(o,h)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:s.title===o.title}]),key:h,title:o.title,onClick:V=>a(o)},e.toDisplayString(o.title),11,w)),64))]),s.title==="静态"?(e.openBlock(),e.createElementBlock("div",$,[e.withDirectives(e.createElementVNode("div",z,"暂无选项",512),[[e.vShow,!((f=e.unref(u))!=null&&f.length)]]),e.createVNode(O,{modelValue:e.unref(u),"onUpdate:modelValue":l[0]||(l[0]=o=>e.isRef(u)?u.value=o:null)},null,8,["modelValue"]),e.createVNode(e.unref(x),{onClick:r},{default:e.withCtx(()=>l[2]||(l[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",j,[l[3]||(l[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(g),{modelValue:e.unref(t),"onUpdate:modelValue":l[1]||(l[1]=o=>e.isRef(t)?t.value=o:null),placeholder:"请选择数据源",clearable:"",options:d.value,onChange:v},null,8,["modelValue","options"])]))])])}}}),D=U._export_sfc(A,[["__scopeId","data-v-a883f089"]]);exports.default=D;
|
package/dist/index-p6doDa9j.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),E=require("./pluginManager-itCTrGag.cjs");function T(t=10){const a="abcdefghijklmnopqrstuvwxyz0123456789";let o="";for(let r=0;r<t;r++){const n=Math.floor(Math.random()*a.length);o+=a[n]}return o}function G(t){return t.charAt(0).toUpperCase()+t.slice(1)}function V(t,a=new WeakMap){if(typeof t!="object"||t===null)return t;if(a.has(t))return a.get(t);if(Array.isArray(t)){const r=t.map(n=>V(n,a));return a.set(t,r),r}const o={};return a.set(t,o),Object.keys(t).forEach(r=>{o[r]=V(t[r],a)}),o}function ue(t){const[a]=j([V(t)],o=>{var n,s;const r={...o,id:`${o.type}_${T(8)}`};return(r.field||r.input)&&!((s=(n=E.pluginManager.getComponentConfingByType(r.type))==null?void 0:n.editConstraints)!=null&&s.fixedField)&&(r.field=r.id),r});return a}function M(t,a,o=!0){for(const[r,n]of Object.entries(a)){let s=t==null?void 0:t[r];s&&n&&typeof s=="object"&&typeof n=="object"?(Array.isArray(s)&&!Array.isArray(n)?s=t[r]={}:!Array.isArray(s)&&Array.isArray(n)&&(s=t[r]=[]),M(s,n,o)):t[r]=n}o&&Object.keys(t).reverse().forEach(r=>{a.hasOwnProperty(r)||(Array.isArray(t)?t.splice(Number(r),1):delete t[r])})}function K(t,a,o=[],r=new WeakMap){const n=s=>{if(Array.isArray(s))return s.map(n);if(typeof s=="object"&&s!==null){if(r.has(s))return"[Circular]";r.set(s,!0);const l=Object.keys(s).sort(),c={};return l.forEach(u=>{o.includes(u)||(c[u]=n(s[u]))}),r.delete(s),c}else return s};return JSON.stringify(n(t))===JSON.stringify(n(a))}function Y(t,a){const o=[];let r=!1;function n(s){if(o.push(s),s.id===a&&(r=!0),!r&&s.children!=null&&s.children.length>0)for(let l=0;l<s.children.length&&(n(s.children[l]),!r);l++);if(!r&&s.slots)for(let l in s.slots)for(let c=0;c<s.slots[l].length&&(n(s.slots[l][c]),!r);c++);r||o.pop()}return t.forEach(n),r||console.error(`没有查询到id为${a}的节点`),o}function de(t,a,o){const r=a.split(".");let n=t;for(let s=0;s<r.length;s++){if(n==null)return o;n=n[r[s]]}return n===void 0?o:n}function fe(t,a,o){const r=a.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let n=t;for(let s=0;s<r.length-1;s++){const l=r[s];n[l]==null&&(n[l]=isNaN(Number(r[s+1]))?{}:[]),n=n[l]}return n[r[r.length-1]]=o,t}function pe(t,a="default"){return X(t,a).map(r=>r.field)}function X(t,a="default"){const o=O(t,n=>{var s;return n.type==="form"&&(((s=n.componentProps)==null?void 0:s.name)??n.name===a)},!0);return O((o==null?void 0:o.children)??[],n=>!!n.input,!1,n=>n.type!=="subform")}function O(t,a,o=!1,r){const n=[],s=[...t];for(;s.length;){const l=s.pop();if(l!=null&&l.children&&(!r||r(l))&&s.push(...l.children),l!=null&&l.slots&&(!r||r(l)))for(let c in l.slots)s.push(...l.slots[c]);if(a(l)&&(n.push(l),o))return l}return o?!1:n}function j(t,a,o){const r=[...t];for(;r.length;){const n=r.pop();if(n!=null&&n.children&&(!o||o(n))&&r.push(...n.children),n!=null&&n.slots&&(!o||o(n)))for(let s in n.slots)r.push(...n.slots[s]);M(n,a(n))}return t}function me(t,a){const o=O(t,r=>r.id===a,!0);if(!o)throw new Error(`没有查询到id为${a}的节点`);return o}function he(t,a){const o=[{type:"",children:t}];let r=0,n=null;if(O(o,s=>{if(n=s.children??null,!n){if(s!=null&&s.slots)for(let l in s.slots){n=s.slots[l];for(let c=0;c<n.length;c++)if(n[c].id===a)return r=c,!0}return!1}for(let l=0;l<n.length;l++)if(n[l].id===a)return r=l,!0;return!1},!0),!n)throw new Error(`没有查询到id为${a}的节点`);return{list:n,schema:n[r],index:r}}function ve(t){const a={schemas:[{type:"page",id:"root",label:"页面",children:[{label:"表单",type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+T()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return a.schemas[0].children[0].children=R(t.list),a}function R(t,a){return t.map(o=>{var u,S,h;let r=o.type??"";const n=o.options??{},s=(i,v)=>{r===i&&(r=v,n.defaultValue&&(n.defaultValue=JSON.parse(n.defaultValue)))};if(s("uploadImg","upload-image"),s("uploadFile","upload-file"),r==="date"&&n.range&&(n.type="daterange",delete n.range),(r==="date"||r==="time")&&(n.valueFormat=n.format),r==="textarea"){const{minRows:i,maxRows:v}=n;n.autoSize={minRows:i,maxRows:v},delete n.minRows,delete n.maxRows}r==="number"&&!n.precision&&delete n.precision,n.width&&(n.style={width:n.width},delete n.width),r==="grid"&&(r="row"),a&&a.type==="grid"&&(r="col",n.span=o.span,o.key=T());const l={label:o.label,type:r,icon:o.icon||"",field:o.model,componentProps:n,id:o.key};return(n.noFormItem||!n.showLabel)&&(l.noFormItem=!0,delete n.noFormItem,delete n.showLabel),n.clearable&&(n.allowClear=!0,delete n.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(r)&&(l.input=!0,((S=(u=o.rules)==null?void 0:u[0])==null?void 0:S.required)===!1&&o.rules.shift(),((h=o.rules)==null?void 0:h.length)>0&&(l.rules=o.rules)),o.list&&(l.children=R(o.list,o)),o.columns&&(l.children=R(o.columns,o)),o.trs&&(l.children=R(o.trs,o)),o.tds&&(l.children=R(o.tds,o)),l})}function ge(t,a){let o=null;return(...r)=>{o&&clearTimeout(o),o=setTimeout(()=>{t(...r)},a)}}function Z(){const t=e.ref({}),a=e.ref({}),o=e.ref(!1),r=e.ref([]),n=e.reactive({});function s(p){return t.value[p]}function l(p,y){t.value[p]=y}function c(p){delete t.value[p]}function u(p,y=!1){const w=Object.entries(E.pluginManager.publicMethods).reduce((C,[I,B])=>(C[I]=B.handler,C),{});try{new Function(`const epic = this;${p}`).bind({...w,getComponent:s,find:s,defineExpose:S,publicMethods:w,pluginManager:E.pluginManager})()}catch(C){y&&console.error("[epic:自定义函数]异常:",C)}}function S(p){p!=null&&(a.value=p)}function h(p,...y){if(!p||p.length===0){console.warn("未提供任何动作");return}p.forEach(w=>{const C=w.args?JSON.parse(w.args):y;switch(w.type){case"public":i(w,C);break;case"custom":v(w,C);break;case"component":d(w,C);break;default:console.warn(`未知的动作类型: ${w.type}`);break}})}function i(p,y){var w;try{(w=E.pluginManager.publicMethods[p.methodName])==null||w.handler(...y)}catch(C){console.error(`[Epic:公共函数(${p.methodName})]执行异常:`,C)}}function v(p,y){var w,C;try{(C=(w=a.value)[p.methodName])==null||C.call(w,...y)}catch(I){console.error(`[Epic:自定义函数(${p.methodName})]执行异常:`,I)}}function d(p,y){const w=p.componentId!=null&&s(p.componentId);if(!w){console.warn(`[Epic:组件${p.componentId}]未找到`);return}try{w[p.methodName](...y)}catch(C){console.error(`[Epic:组件${p.componentId}函数(${p.methodName})]执行异常:`,C)}}function m(p=!0){o.value=p}function f(p){const y=O(p,()=>!0);r.value=y.map(w=>w.id)}function k(p,y="default"){if(n[y]){const w=n[y];M(p,w)}n[y]=p}function D(p,y="default"){if(n[y]){M(n[y],p,!1);return}n[y]=p}return{componentInstances:t,funcs:a,isDesignMode:o,defaultComponentIds:r,forms:n,addFormData:k,setFormData:D,getComponentInstance:s,find:s,addComponentInstance:l,removeComponentInstance:c,setMethods:u,doActions:h,setDesignMode:m,setDefaultComponentIds:f}}function ee(){const t=e.ref([]),a=e.ref([]),o=e.ref(null);let r=0;function n(u,S="插入组件"){const h=Date.now();r+150>h||(r=h,o.value!=null&&(t.value.push(o.value),a.value.splice(0,a.value.length)),o.value={type:S,componentSchema:JSON.stringify(u)},t.value.length>60&&t.value.unshift())}function s(){if(t.value.length===0)return!1;const u=t.value.pop();return o.value!=null&&a.value.push(o.value),o.value=u,JSON.parse(u.componentSchema)}function l(){if(a.value.length===0)return!1;const u=a.value.pop();return o.value!=null&&t.value.push(o.value),o.value=u,JSON.parse(u.componentSchema)}function c(){t.value=[],a.value=[],o.value=null}return{recordList:t,undoList:a,currentRecord:o,push:n,undo:s,redo:l,reset:c}}const ye=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:a}){const o=E.pluginManager.getComponent("form-item"),r=t,n=a,s=e.ref(),l=()=>{n("updateFormItemRef",s.value)};return(c,u)=>r.hasFormItem?(e.openBlock(),e.createBlock(e.unref(o),e.mergeProps({key:0,ref_key:"formItemRef",ref:s,onVnodeMounted:l},r.formItemProps),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(c.$slots,"default",{key:1})}}),te=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{}},emits:["update:modelValue","change","update:dynamicId"],setup(t,{emit:a}){const{proxy:o}=e.getCurrentInstance(),r=t,n=e.ref(null);let s=e.inject("formData",e.reactive({}));const l=e.inject("slots",{}),c=e.inject("pageManager",{}),u=e.inject("disabled",{value:!1}),S=e.inject("ruleFieldPrefix",null),h=e.inject("resetFormData",!1);let i=e.reactive(V(r.componentSchema));v(),e.watch(()=>r.componentSchema,g=>{K(i,g,["children"])||(M(i,V(g)),v())},{deep:!0});function v(){c.isDesignMode.value&&typeof i.field=="string"&&(i.field+="-design-mode")}(r.resetFormData||h)&&(s={});const d=a,m=e.ref(),f=e.ref(),k=g=>{f.value=g},D=e.useAttrs();Object.keys(D).length&&e.provide("nodeAttrs",D);const p=e.shallowRef(null),y=e.computed(()=>{var g,A;return(g=i.componentProps)!=null&&g.hidden?!1:typeof i.show=="boolean"?i.show:((A=i.show)==null?void 0:A.call(i,{values:s}))??!0}),w=e.computed(()=>{var P;const g=y.value&&((P=i.rules)==null?void 0:P.map(x=>({...x,validator:x.validator&&c.funcs.value[x.validator]})));let A=i.field;r.ruleField?A=r.ruleField:S&&i.field&&(A=V(S),A.push(i.field));const _={...i,rules:g,rule:g,field:A};return _.children&&delete _.children,_}),C=e.computed(()=>{var _,P;const g=((_=I.value)==null?void 0:_.bindModel)??"modelValue",A={};return i.on&&Object.keys(i.on).forEach(x=>{A[`on${G(x)}`]=(...ce)=>c.doActions(i.on[x],...ce)}),{...r,...i.componentProps,disabled:(u==null?void 0:u.value)||((P=i.componentProps)==null?void 0:P.disabled),bindModel:g,...A}}),I=e.computed(()=>E.pluginManager.getComponentConfingByType(i.type)??null);e.watchEffect(()=>{n.value=r.modelValue??s[i.field??""]}),e.watch(()=>n.value,()=>{n.value!==(r.modelValue??s[i.field??""])&&N(n.value)}),e.watch(()=>m.value,()=>{B()},{immediate:!0});function B(){var A;const g=m.value||o;i.id&&g&&(i.input&&(g.setValue=N,g.getValue=()=>s[i.field]||r.modelValue),g.setAttr=(_,P)=>(i.componentProps||(i.componentProps={}),i.componentProps[_]=P),g.getAttr=_=>i.componentProps[_],c.addComponentInstance(i.id,g),(A=I.value)!=null&&A.defaultSchema.input&&i.noFormItem!==!0&&f.value&&c.addComponentInstance(i.id+"formItem",f.value))}function L(){var g;i.id&&(c.removeComponentInstance(i.id),(g=I.value)!=null&&g.defaultSchema.input&&i.noFormItem!==!0&&c.removeComponentInstance(i.id+"formItem"))}async function J(){var A,_,P;if(typeof((A=i.componentProps)==null?void 0:A.defaultValue)<"u"){const x=c.isDesignMode.value?(_=i.componentProps)==null?void 0:_.defaultValue:s[i.field]??((P=i.componentProps)==null?void 0:P.defaultValue);N(V(x))}if(i.type==="slot"){const x=i.slotName;if(!x)return;p.value=e.defineComponent({setup(){return()=>e.renderSlot(l,x,{componentSchema:i,model:s})}});return}const g=E.pluginManager.getComponent(i.type);if(!g){console.error(`组件${i.type}未注册`);return}if(typeof g=="function"){const x=await g();p.value=x.default??x}else p.value=g}function N(g){d("update:modelValue",g),d("change",g),i.field&&(s[i.field]=g)}function U(g){d("update:dynamicId",g)}let b=null;return e.watch(()=>i,g=>{const A=JSON.stringify({...g,children:void 0});if(A===b)return!1;b=A,J()},{immediate:!0,deep:!0}),e.onUnmounted(L),(g,A)=>{var P;const _=e.resolveComponent("ENode");return p.value&&y.value?(e.openBlock(),e.createBlock(ye,{key:0,hasFormItem:e.unref(i).noFormItem!==!0&&((P=I.value)==null?void 0:P.defaultSchema.input),formItemProps:w.value,onUpdateFormItemRef:k},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.value),e.mergeProps({ref_key:"componentInstance",ref:m,onVnodeMounted:B,model:e.unref(s)},{...C.value},{[C.value.bindModel]:n.value,["onUpdate:"+C.value.bindModel]:A[0]||(A[0]=x=>n.value=x),[`onUpdate:${C.value.bindModel}`||""]:N,"onUpdate:dynamicId":U}),{node:e.withCtx(x=>[e.createVNode(_,e.normalizeProps(e.guardReactiveProps(x)),null,16)]),"edit-node":e.withCtx(()=>[e.renderSlot(g.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function we(){const t=e.ref(!1),a=Z(),o=e.ref({});function r(){return new Promise(d=>{if(t.value)d();else{const m=e.watch(t,()=>{m(),d()})}})}async function n(d="default"){var f;await r();const m=(f=o.value)==null?void 0:f[d];if(!m)throw new Error(`表单 [name=${d}] 不存在`);return m}async function s(d,m){const f=await n(d);return V(await m(f))}async function l(d="default"){return await s(d,m=>m.getData())}function c(d,m="default"){var k;a.setFormData(d,m);const f=(k=o.value)==null?void 0:k[m];f==null||f.clearValidate()}async function u(d="default"){return await s(d,async m=>(await m.validate(),await m.getData()))}async function S(d){await r();const m={};for(const f in o.value){const k=o.value[f];k&&(m[f]=V(await d(k)))}return m}async function h(){return await S(d=>d.getData())}function i(d){for(const m in d)c(d[m],m)}async function v(){return await S(async d=>(await d.validate(),await d.getData()))}return{ready:t,pageManager:a,forms:o,getData:l,setData:c,validate:u,getForms:h,setForms:i,validateAll:v,getFormInstance:n}}const Se={key:0,class:"epic-loading-box"},be={class:"epic-builder-main"},Ce={class:"epic-loading-box"},ne=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean}},emits:["ready"],setup(t,{expose:a,emit:o}){const r=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),n=o,{ready:s,pageManager:l,forms:c,getData:u,setData:S,validate:h,getForms:i,setForms:v,validateAll:d,getFormInstance:m}=we(),f=t,k=e.reactive({schemas:[]});e.watch(()=>f.pageSchema,w=>{M(k,w)},{immediate:!0,deep:!0}),e.watch(()=>f.formData,w=>{w&&S(w)},{immediate:!0,deep:!0}),e.watch(()=>k.script,w=>{w&&l.setMethods(w,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",l),e.provide("forms",c),e.provide("pageSchema",k),e.provide("disabled",e.computed(()=>f.disabled));const D=e.getCurrentInstance(),p=D==null?void 0:D.proxy;function y(){e.nextTick(()=>{s.value=!0,n("ready",l),p&&l.addComponentInstance("builder",p)})}return a({ready:s,pageManager:l,getData:u,setData:S,validate:h,getForms:i,setForms:v,validateAll:d,getFormInstance:m}),(w,C)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:y},{default:e.withCtx(()=>[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.schemas,(I,B)=>(e.openBlock(),e.createBlock(e.unref(te),{key:B,componentSchema:I},null,8,["componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createVNode(e.unref(r))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Se))}});function Q(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function ke(t){let a=0,o,r;const n=()=>{a-=1,r&&a<=0&&(r.stop(),o=void 0,r=void 0)};return(...s)=>(a+=1,r||(r=e.effectScope(!0),o=r.run(()=>t(...s))),Q(n),o)}function $(t){return typeof t=="function"?t():e.unref(t)}const Ee=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ae=t=>typeof t<"u",xe=Object.prototype.toString,De=t=>xe.call(t)==="[object Object]",Ie=()=>{};function _e(t){return e.getCurrentInstance()}function Pe(t,a=!0,o){_e()?e.onMounted(t,o):a?t():e.nextTick(t)}function Ve(t=!1,a={}){const{truthyValue:o=!0,falsyValue:r=!1}=a,n=e.isRef(t),s=e.ref(t);function l(c){if(arguments.length)return s.value=c,s.value;{const u=$(o);return s.value=s.value===u?$(r):u,s.value}}return n?l:[s,l]}function Me(t,a,o){const r=e.watch(t,(...n)=>(e.nextTick(()=>r()),a(...n)),o);return r}const z=Ee?window:void 0;function F(t){var a;const o=$(t);return(a=o==null?void 0:o.$el)!=null?a:o}function Be(...t){let a,o,r,n;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,r,n]=t,a=z):[a,o,r,n]=t,!a)return Ie;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const s=[],l=()=>{s.forEach(h=>h()),s.length=0},c=(h,i,v,d)=>(h.addEventListener(i,v,d),()=>h.removeEventListener(i,v,d)),u=e.watch(()=>[F(a),$(n)],([h,i])=>{if(l(),!h)return;const v=De(i)?{...i}:i;s.push(...o.flatMap(d=>r.map(m=>c(h,d,m,v))))},{immediate:!0,flush:"post"}),S=()=>{u(),l()};return Q(S),S}function Fe(t){return typeof t=="function"?t:typeof t=="string"?a=>a.key===t:Array.isArray(t)?a=>t.includes(a.key):()=>!0}function oe(...t){let a,o,r={};t.length===3?(a=t[0],o=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(a=!0,o=t[0],r=t[1]):(a=t[0],o=t[1]):(a=!0,o=t[0]);const{target:n=z,eventName:s="keydown",passive:l=!1,dedupe:c=!1}=r,u=Fe(a);return Be(n,s,h=>{h.repeat&&$(c)||u(h)&&o(h)},l)}function W(t,a,o={}){return oe(t,a,{...o,eventName:"keydown"})}function H(t,a,o={}){return oe(t,a,{...o,eventName:"keyup"})}function Ne(){const t=e.ref(!1),a=e.getCurrentInstance();return a&&e.onMounted(()=>{t.value=!0},a),t}function Re(t){const a=Ne();return e.computed(()=>(a.value,!!t()))}function Oe(t){return JSON.parse(JSON.stringify(t))}function re(t,a,o={}){const{window:r=z,...n}=o;let s;const l=Re(()=>r&&"ResizeObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},u=e.computed(()=>{const i=$(t);return Array.isArray(i)?i.map(v=>F(v)):[F(i)]}),S=e.watch(u,i=>{if(c(),l.value&&r){s=new ResizeObserver(a);for(const v of i)v&&s.observe(v,n)}},{immediate:!0,flush:"post"}),h=()=>{c(),S()};return Q(h),{isSupported:l,stop:h}}function $e(t,a={width:0,height:0},o={}){const{window:r=z,box:n="content-box"}=o,s=e.computed(()=>{var i,v;return(v=(i=F(t))==null?void 0:i.namespaceURI)==null?void 0:v.includes("svg")}),l=e.ref(a.width),c=e.ref(a.height),{stop:u}=re(t,([i])=>{const v=n==="border-box"?i.borderBoxSize:n==="content-box"?i.contentBoxSize:i.devicePixelContentBoxSize;if(r&&s.value){const d=F(t);if(d){const m=d.getBoundingClientRect();l.value=m.width,c.value=m.height}}else if(v){const d=Array.isArray(v)?v:[v];l.value=d.reduce((m,{inlineSize:f})=>m+f,0),c.value=d.reduce((m,{blockSize:f})=>m+f,0)}else l.value=i.contentRect.width,c.value=i.contentRect.height},o);Pe(()=>{const i=F(t);i&&(l.value="offsetWidth"in i?i.offsetWidth:a.width,c.value="offsetHeight"in i?i.offsetHeight:a.height)});const S=e.watch(()=>F(t),i=>{l.value=i?a.width:0,c.value=i?a.height:0});function h(){u(),S()}return{width:l,height:c,stop:h}}function Te(t,a,o,r={}){var n,s,l;const{clone:c=!1,passive:u=!1,eventName:S,deep:h=!1,defaultValue:i,shouldEmit:v}=r,d=e.getCurrentInstance(),m=o||(d==null?void 0:d.emit)||((n=d==null?void 0:d.$emit)==null?void 0:n.bind(d))||((l=(s=d==null?void 0:d.proxy)==null?void 0:s.$emit)==null?void 0:l.bind(d==null?void 0:d.proxy));let f=S;a||(a="modelValue"),f=f||`update:${a.toString()}`;const k=y=>c?typeof c=="function"?c(y):Oe(y):y,D=()=>Ae(t[a])?k(t[a]):i,p=y=>{v?v(y)&&m(f,y):m(f,y)};if(u){const y=D(),w=e.ref(y);let C=!1;return e.watch(()=>t[a],I=>{C||(C=!0,w.value=k(I),e.nextTick(()=>C=!1))}),e.watch(w,I=>{!C&&(I!==t[a]||h)&&p(I)},{deep:h}),w}else return e.computed({get(){return D()},set(y){p(y)}})}function qe(){const{isDark:t}=q(),a=Ve(t);return{isDark:t,toggleDark:a}}function ae(){const t=e.ref(!1);return e.onMounted(()=>{se(t),Le(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function se(t){var a=document.documentElement;a&&(a.classList.contains("dark")?t.value=!0:t.value=!1)}function Le(t){var a=document.querySelector("html"),o=new MutationObserver(function(r){for(var n of r)if(n.type==="attributes"&&n.attributeName==="class"){const s=n.target;new Array(...s.classList).includes("dark")?t.value=!0:t.value=!1}});o.observe(a,{attributes:!0,attributeFilter:["class"]}),e.onUnmounted(()=>{o.disconnect()})}function ie(){const t=e.ref(1),a=e.ref(!1),{isDark:o}=ae(),{pressSpace:r,pressShift:n,pressCtrl:s}=le();return{canvasScale:t,pressSpace:r,pressShift:n,pressCtrl:s,disabledZoom:a,isDark:o}}const q=ke(ie);function le(){const t=e.ref(!1),a=e.ref(!1),o=e.ref(!1);return W(" ",()=>{t.value=!0}),H(" ",()=>{t.value=!1}),W("Shift",r=>{r.preventDefault(),a.value=!0}),H("Shift",()=>{a.value=!1}),W("Control",r=>{r.preventDefault(),o.value=!0}),H("Control",()=>{o.value=!1}),{pressSpace:t,pressShift:a,pressCtrl:o}}function Ue(t){const{pressSpace:a}=q(),o=new Image(1,1);o.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let r=0,n=0;function s(u){var S;a.value&&(r=u.x,n=u.y,(S=u.dataTransfer)==null||S.setDragImage(document.createElement("div"),0,0))}function l(u){if(u.preventDefault(),!u.x||!u.y||!a.value)return;const S=u.x-r,h=u.y-n;r=u.x,n=u.y,t.value&&(t.value.scrollTop-=h,t.value.scrollLeft-=S)}function c(){a.value=!1}return{handleElementDragStart:s,handleElementDrag:l,handleElementDragEnd:c}}function ze(t){const{pressCtrl:a,canvasScale:o,disabledZoom:r}=q();function n(s){if(!a.value||r.value)return;s.preventDefault();let l=0;s.deltaY<0?l=o.value+.05:l=o.value-.05,!(l>150||l<.5)&&(o.value=l)}return e.watch(()=>o.value,s=>{t.value&&!r.value&&(t.value.style.transform=`scale(${s})`)}),{handleZoom:n,canvasScale:o}}function Je(t,a=16.66){let o;function r(){n(),o=window.setInterval(t,a)}function n(){window.clearInterval(o)}return{startTimedQuery:r,stopTimedQuery:n}}const We={class:"min-w-750px rounded"},He={class:"h-full rounded"},Ke=e.defineComponent({__name:"index",setup(t,{expose:a}){const o=E.pluginManager.getComponent("monacoEditor"),r=E.pluginManager.getComponent("modal"),n=e.ref(null),s=e.ref(!1),l=e.ref(!1),c=e.ref({}),u=e.inject("pageSchema"),S=e.ref(null),h=e.ref("");function i(){l.value=!1}function v(){s.value=!1}function d(){s.value=!0,h.value=T()}async function m(){try{let f=await S.value.validateAll();if(!Object.keys(f).length){alert("请添加表单组件后再尝试!");return}Object.keys(f).length===1&&(f=f.default),c.value=JSON.stringify(f,null,2),e.nextTick(()=>{var k;(k=n.value)==null||k.setValue(c.value)}),l.value=!0}catch(f){console.error(f)}}return a({handleOpen:d}),(f,k)=>(e.openBlock(),e.createBlock(e.unref(r),{modelValue:s.value,"onUpdate:modelValue":k[1]||(k[1]=D=>s.value=D),title:"预览",class:"w-900px",width:"900px",onClose:v,onOk:m,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",We,[(e.openBlock(),e.createBlock(e.unref(ne),{key:h.value,ref_key:"kb",ref:S,"page-schema":e.unref(u)},null,8,["page-schema"])),e.createVNode(e.unref(r),{modelValue:l.value,"onUpdate:modelValue":k[0]||(k[0]=D=>l.value=D),title:"表单数据",class:"w-860px",width:"860px",onClose:i,onOk:i},{default:e.withCtx(()=>[e.createElementVNode("div",He,[e.createVNode(e.unref(o),{ref_key:"monacoEditorRef",ref:n,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":c.value},null,8,["model-value"])])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]))}}),Ze={key:0,class:"epic-loading-box"},Qe={class:"epic-designer-main"},Ge={class:"epic-header-container"},Ye={class:"epic-loading-box"},Xe=e.defineComponent({__name:"designer",props:{disabledZoom:{type:Boolean,default:!1},hiddenHeader:{type:Boolean,default:!1},lockDefaultSchemaEdit:{type:Boolean,default:!1},formMode:{type:Boolean,default:!1},title:{default:"EpicDesigner默认项目"},defaultSchema:{},sourceCodeReadOnly:{type:Boolean},source:{default:[]}},emits:["ready","save","reset","toggleDeviceMode","saveSourceData","deleteSourceData","updateSourceData"],setup(t,{expose:a,emit:o}){const r=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Bs6GdgDl.cjs"))),n=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CuxnFxdY.cjs"))),s=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CaIsXqm5.cjs"))),l=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DBQ-tc2k.cjs"))),c=E.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),u=Z(),S=ee(),h=t;let i={schemas:[{type:"form",id:"root",label:"页面",children:[],componentProps:{name:"表单",style:{padding:"16px"}}}],script:`const { defineExpose, find } = epic;
|
|
2
|
-
|
|
3
|
-
function test (){
|
|
4
|
-
console.log('test')
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// 通过defineExpose暴露的函数或者属性
|
|
8
|
-
defineExpose({
|
|
9
|
-
test
|
|
10
|
-
})`};e.watchEffect(()=>{if(h.defaultSchema){i=h.defaultSchema;return}h.source&&E.pluginManager.setSourceData(h.source),h.formMode&&(i.schemas=E.pluginManager.formSchemas)}),u.setDesignMode(),u.setDefaultComponentIds(i.schemas);const v=o,d=e.ref(null),m=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),f=e.reactive({schemas:[],script:i.script}),{disabledZoom:k}=q();e.watchEffect(()=>{k.value=h.disabledZoom}),e.watchEffect(()=>{const b=f.script;b&&b!==""&&u.setMethods(b)}),e.provide("pageSchema",f),e.provide("revoke",S),e.provide("pageManager",u),e.provide("designerProps",e.computed(()=>h)),e.provide("designer",{setCheckedNode:p,setHoverNode:y,setDisableHover:C,handleToggleDeviceMode:N,reset:L,state:m}),E.EventBus.on("saveSourceData",b=>{v("saveSourceData",b)}),E.EventBus.on("deleteSourceData",b=>{v("deleteSourceData",b)}),E.EventBus.on("updateSourceData",b=>{v("updateSourceData",b)});function D(){f.schemas=V(i.schemas),p(f.schemas[0]),S.push(f.schemas,"初始化撤销功能")}async function p(b=f.schemas[0]){m.checkedNode=b,m.matched=Y(f.schemas,b.id)}async function y(b=null){var g;if(!b||m.disableHover)return m.hoverNode=null,!1;if((b==null?void 0:b.id)===((g=m.hoverNode)==null?void 0:g.id))return!1;m.hoverNode=b}function w(){e.nextTick(()=>{v("ready",{pageManager:u})})}async function C(b=!1){m.disableHover=b}function I(b){M(f,V(b))}function B(){return e.toRaw(f)}function L(){K(f.schemas,i.schemas)&&f.script===i.script||(M(f.schemas,i.schemas),f.script=i.script,p(f.schemas[0]),S.push(f.schemas,"重置操作"),v("reset",f))}function J(){v("save",e.toRaw(f))}function N(b){v("toggleDeviceMode",b)}function U(){d.value.handleOpen()}return D(),a({revoke:S,setData:I,getData:B,reset:L,preview:U}),(b,g)=>e.unref(E.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:w},{default:e.withCtx(()=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ge,[e.renderSlot(b.$slots,"header",{},()=>[h.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r),{key:0,onPreview:U,onSave:J},{header:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(b.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":b.hiddenHeader}])},[e.createVNode(e.unref(n)),e.createVNode(e.unref(s)),e.createVNode(e.unref(l))],2),e.createVNode(Ke,{ref_key:"previewRef",ref:d},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(e.unref(c))])]),_:3})):(e.openBlock(),e.createElementBlock("div",Ze))}}),je={component:async()=>await Promise.resolve().then(()=>require("./index-sZ9OfgE1.cjs")),defaultSchema:{label:"代码编辑器",type:"monacoEditor",field:"monacoEditor",icon:"epic-icon-write",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"monacoEditor",field:"componentProps.defaultValue"}]},bindModel:"model-value"},et={component:async()=>await Promise.resolve().then(()=>require("./index-Ch9jeYmj.cjs")),defaultSchema:{label:"页面",type:"page",componentProps:{},children:[]},config:{attribute:[{label:"页面名称",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.name"}]}};function tt(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-DWjMyXtP.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-DZ5RBl4U.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-Cz47jN8A.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-Ctr7oJRf.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-mxP1Ba2T.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-BnRo1212.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-B3dTIoEC.cjs"))),t.registerActivitybar({id:"component_view",title:"组件",icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-DAk3CFkW.cjs"))}),t.registerActivitybar({id:"sound_code_view",title:"源码",icon:"icon--epic--sdk-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./index-Bd5nBb_T.cjs"))}),t.registerActivitybar({id:"outline_view",title:"大纲",icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-UAdT8ap6.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:"属性",component:async()=>await Promise.resolve().then(()=>require("./attributeView-CfMG9ANQ.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-0rthSdVL.cjs"))}),t.registerRightSidebar({id:"event_view",title:"事件",component:async()=>await Promise.resolve().then(()=>require("./eventView-CSJb3Zam.cjs"))}),[je,et].forEach(o=>{t.registerComponent(o)})}tt(E.pluginManager);exports._sfc_main=te;exports._sfc_main$1=ne;exports._sfc_main$2=Xe;exports.capitalizeFirstLetter=G;exports.convertKFormData=ve;exports.debounce=ge;exports.deepClone=V;exports.deepCompareAndModify=M;exports.deepEqual=K;exports.findSchemaById=me;exports.findSchemaInfoById=he;exports.findSchemas=O;exports.generateNewSchema=ue;exports.getDarkState=se;exports.getFormFields=pe;exports.getFormSchemas=X;exports.getMatchedById=Y;exports.getUUID=T;exports.getValueByPath=de;exports.initStore=ie;exports.mapSchemas=j;exports.recursionConvertedNode=R;exports.setValueByPath=fe;exports.useDark=ae;exports.useElementDrag=Ue;exports.useElementSize=$e;exports.useElementZoom=ze;exports.useKeyPress=le;exports.usePageManager=Z;exports.useResizeObserver=re;exports.useRevoke=ee;exports.useStore=q;exports.useTheme=qe;exports.useTimedQuery=Je;exports.useVModel=Te;exports.watchOnce=Me;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),_=require("./tree.vue_vue_type_script_setup_true_lang-BVopU0uv.cjs"),f=require("./pluginManager-itCTrGag.cjs"),m=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),g={class:"epic-outline"},v=["onMouseenter"],y={class:"max-w-full truncate"},h={class:"epic-node-type-text flex-1 w-0 truncate"},k=e.defineComponent({__name:"outline",setup(N){const n=e.inject("designer"),a=e.inject("pageSchema"),l=e.computed(()=>{var s;const o=(s=n.state.checkedNode)==null?void 0:s.id;return o?[o]:[]});function u(o){n.setCheckedNode(o.componentSchema)}return(o,s)=>{var i;return e.openBlock(),e.createElementBlock("div",g,[e.createVNode(e.unref(_._sfc_main),{options:e.unref(a).schemas,draggable:"","selected-keys":l.value,"hover-key":(i=e.unref(n).state.hoverNode)==null?void 0:i.id,onNodeClick:u},{"tree-node":e.withCtx(({schema:t})=>{var r,c,d;return[e.createElementVNode("div",{class:e.normalizeClass(["epic-text-padding flex",{hidden:(r=t.componentProps)==null?void 0:r.hidden}]),onMouseenter:e.withModifiers(p=>e.unref(n).setHoverNode(t),["stop"]),onMouseleave:s[0]||(s[0]=e.withModifiers(p=>e.unref(n).setHoverNode(null),["stop"]))},[e.createElementVNode("span",y,[(c=t.componentProps)!=null&&c.hidden?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,name:"icon--epic--visibility-off-outline-rounded",class:"translate-y-2px"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label??((d=e.unref(f.pluginManager).getComponentConfingByType(t.type))==null?void 0:d.defaultSchema.label)),1)]),e.createElementVNode("span",h,e.toDisplayString(t.id),1)],42,v)]}),_:1},8,["options","selected-keys","hover-key"])])}}});exports.default=k;
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var d = (i, e, t) => e in i ? l(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
-
var o = (i, e, t) => d(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineAsyncComponent as f, ref as c, shallowRef as m } from "vue";
|
|
5
|
-
const p = (i, e) => f({
|
|
6
|
-
loader: i,
|
|
7
|
-
loadingComponent: e,
|
|
8
|
-
delay: 80
|
|
9
|
-
});
|
|
10
|
-
function v(i) {
|
|
11
|
-
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
12
|
-
var s = i.get(e);
|
|
13
|
-
s ? s.push(t) : i.set(e, [t]);
|
|
14
|
-
}, off: function(e, t) {
|
|
15
|
-
var s = i.get(e);
|
|
16
|
-
s && (t ? s.splice(s.indexOf(t) >>> 0, 1) : i.set(e, []));
|
|
17
|
-
}, emit: function(e, t) {
|
|
18
|
-
var s = i.get(e);
|
|
19
|
-
s && s.slice().map(function(n) {
|
|
20
|
-
n(t);
|
|
21
|
-
}), (s = i.get("*")) && s.slice().map(function(n) {
|
|
22
|
-
n(e, t);
|
|
23
|
-
});
|
|
24
|
-
} };
|
|
25
|
-
}
|
|
26
|
-
const C = v();
|
|
27
|
-
class g {
|
|
28
|
-
constructor() {
|
|
29
|
-
// 已初始化基础UI
|
|
30
|
-
o(this, "initialized", c(!1));
|
|
31
|
-
// 数据源存储
|
|
32
|
-
o(this, "sourceData", []);
|
|
33
|
-
// 组件对象字典,key 为组件type,value 为组件
|
|
34
|
-
o(this, "components", {});
|
|
35
|
-
// 组件配置记录字典,key 为组件type,value 为组件配置
|
|
36
|
-
o(this, "componentConfigs", {});
|
|
37
|
-
// 基础组件type,切换ui时,可先移除该数组记录的type
|
|
38
|
-
o(this, "baseComponentTypes", []);
|
|
39
|
-
// 组件模式分组,使用 Vue Composition API 的 ref 进行响应式处理
|
|
40
|
-
o(this, "componentSchemaGroups", c([]));
|
|
41
|
-
// 隐藏的组件列表,存储需要隐藏的组件名称
|
|
42
|
-
o(this, "hiddenComponents", []);
|
|
43
|
-
// 表单模式默认schema数据
|
|
44
|
-
o(this, "formSchemas", [
|
|
45
|
-
{
|
|
46
|
-
label: "表单",
|
|
47
|
-
type: "form",
|
|
48
|
-
componentProps: {
|
|
49
|
-
layout: "horizontal",
|
|
50
|
-
name: "default",
|
|
51
|
-
labelWidth: 100,
|
|
52
|
-
labelLayout: "fixed",
|
|
53
|
-
labelCol: {
|
|
54
|
-
span: 5
|
|
55
|
-
},
|
|
56
|
-
wrapperCol: {
|
|
57
|
-
span: 19
|
|
58
|
-
},
|
|
59
|
-
colon: !0,
|
|
60
|
-
labelAlign: "right",
|
|
61
|
-
labelPlacement: "left"
|
|
62
|
-
},
|
|
63
|
-
children: [],
|
|
64
|
-
id: "root"
|
|
65
|
-
}
|
|
66
|
-
]);
|
|
67
|
-
// 组件分组名称映射,key 为组件原名称,value 为组件分组映射名称
|
|
68
|
-
o(this, "componentGroupNameMap", {});
|
|
69
|
-
// 组件分组排序列表(设置之后,按该数组下标排序)
|
|
70
|
-
o(this, "sortedGroups", ["表单", "布局"]);
|
|
71
|
-
// 视图容器模型,包含活动栏和右侧边栏的配置
|
|
72
|
-
o(this, "viewsContainers", {
|
|
73
|
-
activitybars: m([]),
|
|
74
|
-
// 活动栏配置列表
|
|
75
|
-
rightSidebars: m([])
|
|
76
|
-
// 右侧边栏配置列表
|
|
77
|
-
});
|
|
78
|
-
// 公共方法模型,存储插件的公共方法
|
|
79
|
-
o(this, "publicMethods", {
|
|
80
|
-
// 示例数据
|
|
81
|
-
// publicTest: {
|
|
82
|
-
// describe: "测试函数",
|
|
83
|
-
// name: "test",
|
|
84
|
-
// handler: (e) => {
|
|
85
|
-
// console.log(e)
|
|
86
|
-
// // alert("测试函数弹出");
|
|
87
|
-
// },
|
|
88
|
-
// },
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* 添加组件到插件管理器中
|
|
93
|
-
* @param componentType 组件类型
|
|
94
|
-
* @param component 组件
|
|
95
|
-
*/
|
|
96
|
-
component(e, t) {
|
|
97
|
-
typeof t == "function" && (t = p(t)), this.components[e] = t;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* 注册组件到插件管理器中
|
|
101
|
-
* @param componentConfig 组件配置
|
|
102
|
-
*/
|
|
103
|
-
registerComponent(e) {
|
|
104
|
-
this.component(e.defaultSchema.type, e.component), e.defaultSchema.input && (e.config.action || (e.config.action = []), e.config.action.unshift(
|
|
105
|
-
{
|
|
106
|
-
type: "setValue",
|
|
107
|
-
describe: "设置值",
|
|
108
|
-
// 参数配置
|
|
109
|
-
argsConfigs: [
|
|
110
|
-
{
|
|
111
|
-
...e.defaultSchema,
|
|
112
|
-
label: "设置数据",
|
|
113
|
-
field: "0"
|
|
114
|
-
}
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: "getValue",
|
|
119
|
-
describe: "获取值"
|
|
120
|
-
}
|
|
121
|
-
)), this.componentConfigs[e.defaultSchema.type] = e, this.computedComponentSchemaGroups();
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* 从已记录的基础组件类型中移除特定类型的组件
|
|
125
|
-
* @param componentType 要移除的组件类型
|
|
126
|
-
*/
|
|
127
|
-
removeComponent(e) {
|
|
128
|
-
delete this.componentConfigs[e], delete this.components[e];
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* 设置数据源
|
|
132
|
-
* @param
|
|
133
|
-
*/
|
|
134
|
-
setSourceData(e) {
|
|
135
|
-
this.sourceData = e, C.emit("updateSource", /* @__PURE__ */ new Date());
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* 获取数据源
|
|
139
|
-
* @returns
|
|
140
|
-
*/
|
|
141
|
-
getSourceData() {
|
|
142
|
-
return Object.prototype.toString.call(this.sourceData) === "[object Array]" ? this.sourceData : [];
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* 记录基础组件类型
|
|
146
|
-
* @returns baseComponentTypes string[]
|
|
147
|
-
*/
|
|
148
|
-
setBaseComponentTypes(e) {
|
|
149
|
-
this.baseComponentTypes = e;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* 添加基础组件类型
|
|
153
|
-
* @returns baseComponentType string
|
|
154
|
-
*/
|
|
155
|
-
addBaseComponentTypes(e) {
|
|
156
|
-
this.baseComponentTypes.push(e);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* 移除已记录的基础组件类型
|
|
160
|
-
*/
|
|
161
|
-
removeBaseComponents() {
|
|
162
|
-
this.baseComponentTypes.forEach((e) => {
|
|
163
|
-
this.removeComponent(e);
|
|
164
|
-
}), this.setBaseComponentTypes([]), this.computedComponentSchemaGroups();
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* 获取所有插件管理中的所有组件
|
|
168
|
-
* @returns components
|
|
169
|
-
*/
|
|
170
|
-
getComponents() {
|
|
171
|
-
return this.components;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 通过type 查询相应的组件
|
|
175
|
-
* @returns components
|
|
176
|
-
*/
|
|
177
|
-
getComponent(e) {
|
|
178
|
-
return this.components[e];
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* 注册或更新活动栏(Activitybar)模型。
|
|
182
|
-
* 如果模型中的组件是一个函数,则异步加载该组件。
|
|
183
|
-
* @param activitybar 要注册或更新的活动栏模型
|
|
184
|
-
*/
|
|
185
|
-
registerActivitybar(e) {
|
|
186
|
-
typeof e.component == "function" && (e.component = p(e.component)), typeof e.visible > "u" && (e.visible = !0);
|
|
187
|
-
const t = this.viewsContainers.activitybars.value.findIndex((s) => s.id === e.id);
|
|
188
|
-
t !== -1 ? this.viewsContainers.activitybars.value[t] = e : this.viewsContainers.activitybars.value.push(e);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* 获取所有activitybars
|
|
192
|
-
* @returns activitybars
|
|
193
|
-
*/
|
|
194
|
-
getActivitybars() {
|
|
195
|
-
return this.viewsContainers.activitybars.value;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* 隐藏活动栏
|
|
199
|
-
* @param value 属性
|
|
200
|
-
* @param attr 查询字段 默认值 title
|
|
201
|
-
*/
|
|
202
|
-
hideActivitybar(e, t = "title") {
|
|
203
|
-
const s = this.viewsContainers.activitybars.value.findIndex((n) => n[t] === e);
|
|
204
|
-
s !== -1 && (this.viewsContainers.activitybars.value[s].visible = !1);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* 显示活动栏
|
|
208
|
-
* @param value 属性
|
|
209
|
-
* @param attr 查询字段 默认值 title
|
|
210
|
-
*/
|
|
211
|
-
showActivitybar(e, t = "title") {
|
|
212
|
-
const s = this.viewsContainers.activitybars.value.findIndex((n) => n[t] === e);
|
|
213
|
-
s !== -1 && (this.viewsContainers.activitybars.value[s].visible = !0);
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* 注册右侧栏
|
|
217
|
-
*/
|
|
218
|
-
registerRightSidebar(e) {
|
|
219
|
-
typeof e.component == "function" && (e.component = p(e.component)), typeof e.visible > "u" && (e.visible = !0);
|
|
220
|
-
const t = this.viewsContainers.rightSidebars.value.findIndex((s) => s.id === e.id);
|
|
221
|
-
t !== -1 ? this.viewsContainers.rightSidebars.value[t] = e : this.viewsContainers.rightSidebars.value.push(e);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* 获取所有rightSidebars
|
|
225
|
-
* @returns rightSidebars
|
|
226
|
-
*/
|
|
227
|
-
getRightSidebars() {
|
|
228
|
-
return this.viewsContainers.rightSidebars.value;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* 隐藏右侧边栏
|
|
232
|
-
* @param value 属性
|
|
233
|
-
* @param attr 查询字段 默认值 title
|
|
234
|
-
*/
|
|
235
|
-
hideRightSidebar(e, t = "title") {
|
|
236
|
-
const s = this.viewsContainers.rightSidebars.value.findIndex((n) => n[t] === e);
|
|
237
|
-
s !== -1 && (this.viewsContainers.rightSidebars.value[s].visible = !1);
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* 显示右侧边栏
|
|
241
|
-
* @param value 属性
|
|
242
|
-
* @param attr 查询字段 默认值 title
|
|
243
|
-
*/
|
|
244
|
-
showRightSidebar(e, t = "title") {
|
|
245
|
-
const s = this.viewsContainers.rightSidebars.value.findIndex((n) => n[t] === e);
|
|
246
|
-
s !== -1 && (this.viewsContainers.rightSidebars.value[s].visible = !0);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* 获取所有插件管理中的所有组件配置
|
|
250
|
-
* @returns componentAttrs
|
|
251
|
-
*/
|
|
252
|
-
getComponentConfings() {
|
|
253
|
-
return this.componentConfigs;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* 通过type获取ComponentConfing
|
|
257
|
-
* @returns
|
|
258
|
-
*/
|
|
259
|
-
getComponentConfingByType(e) {
|
|
260
|
-
return this.componentConfigs[e];
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* 计算componentSchemaGroups
|
|
264
|
-
*/
|
|
265
|
-
computedComponentSchemaGroups() {
|
|
266
|
-
const e = [];
|
|
267
|
-
Object.values(this.componentConfigs).forEach((t) => {
|
|
268
|
-
if (!this.hiddenComponents.includes(t.defaultSchema.type) && t.groupName) {
|
|
269
|
-
const s = this.componentGroupNameMap[t.groupName] ?? t.groupName;
|
|
270
|
-
let n = e.findIndex((r) => r.title === s);
|
|
271
|
-
n === -1 && (e.push({
|
|
272
|
-
title: s,
|
|
273
|
-
list: []
|
|
274
|
-
}), n = e.length - 1);
|
|
275
|
-
let a = e[n].list.findIndex(
|
|
276
|
-
(r) => r.type === t.defaultSchema.type
|
|
277
|
-
);
|
|
278
|
-
a !== -1 ? e[n].list[a] = t.defaultSchema : e[n].list.push(t.defaultSchema);
|
|
279
|
-
}
|
|
280
|
-
}), e.sort((t, s) => {
|
|
281
|
-
const n = this.sortedGroups.indexOf(t.title), a = this.sortedGroups.indexOf(s.title);
|
|
282
|
-
return n === -1 ? 1 : a === -1 ? -1 : n - a;
|
|
283
|
-
}), e.forEach((t) => {
|
|
284
|
-
t.list.sort((s, n) => {
|
|
285
|
-
var u, h;
|
|
286
|
-
const a = ((u = this.componentConfigs[s.type]) == null ? void 0 : u.sort) ?? 1e3, r = ((h = this.componentConfigs[n.type]) == null ? void 0 : h.sort) ?? 1e3;
|
|
287
|
-
return a - r;
|
|
288
|
-
});
|
|
289
|
-
}), this.componentSchemaGroups.value = e;
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* 按照分组获取componentSchemaGroups 暂时没啥用
|
|
293
|
-
* @returns componentSchemaGroups
|
|
294
|
-
*/
|
|
295
|
-
getComponentSchemaGroups() {
|
|
296
|
-
return this.componentSchemaGroups;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* 设置组件分组名称到映射名称的关系
|
|
300
|
-
* @param groupName 组件分组名称
|
|
301
|
-
* @param mapName 映射的名称
|
|
302
|
-
*/
|
|
303
|
-
setComponentGroupNameMap(e, t) {
|
|
304
|
-
this.componentGroupNameMap[e] = t;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* 清空组件分组名称到映射名称的关系
|
|
308
|
-
*/
|
|
309
|
-
clearComponentGroupNameMap() {
|
|
310
|
-
this.componentGroupNameMap = {};
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* 设置组件分组的排序
|
|
314
|
-
* @param sortedGroups 包含组名和排序字段的对象数组
|
|
315
|
-
*/
|
|
316
|
-
setSortedGroups(e) {
|
|
317
|
-
this.sortedGroups = e, this.computedComponentSchemaGroups();
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* 清空组件分组的排序
|
|
321
|
-
*/
|
|
322
|
-
clearSortedGroups() {
|
|
323
|
-
this.sortedGroups = [], this.computedComponentSchemaGroups();
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* 添加需要隐藏的组件类型
|
|
327
|
-
* @param {*} type
|
|
328
|
-
* @returns
|
|
329
|
-
*/
|
|
330
|
-
hideComponent(e) {
|
|
331
|
-
this.hiddenComponents.push(e), this.computedComponentSchemaGroups();
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* 移除需要隐藏的组件类型
|
|
335
|
-
* @param {*} type
|
|
336
|
-
* @returns
|
|
337
|
-
*/
|
|
338
|
-
showComponent(e) {
|
|
339
|
-
this.hiddenComponents = this.hiddenComponents.filter((t) => t !== e), this.computedComponentSchemaGroups();
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* 设置需要隐藏的组件类型数组
|
|
343
|
-
* @param {*} type[]
|
|
344
|
-
* @returns
|
|
345
|
-
*/
|
|
346
|
-
setHideComponents(e) {
|
|
347
|
-
this.hiddenComponents = e, this.computedComponentSchemaGroups();
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* 设置initialized的状态。
|
|
351
|
-
*
|
|
352
|
-
* @param value 要设置的布尔值。
|
|
353
|
-
*/
|
|
354
|
-
setInitialized(e) {
|
|
355
|
-
this.initialized.value = e;
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* 添加公共方法
|
|
359
|
-
* @param publicMethod
|
|
360
|
-
*/
|
|
361
|
-
addPublicMethod(e) {
|
|
362
|
-
const t = e.methodName ?? e.name, s = e.method ?? e.handler;
|
|
363
|
-
this.publicMethods[t] = {
|
|
364
|
-
...e,
|
|
365
|
-
name: t,
|
|
366
|
-
handler: s
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
/**
|
|
370
|
-
* 移除公共方法
|
|
371
|
-
* @param methodName
|
|
372
|
-
*/
|
|
373
|
-
removePublicMethod(e) {
|
|
374
|
-
delete this.publicMethods[e];
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
const S = new g();
|
|
378
|
-
export {
|
|
379
|
-
C as E,
|
|
380
|
-
g as P,
|
|
381
|
-
p as l,
|
|
382
|
-
S as p
|
|
383
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var f=(i,e,t)=>e in i?d(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var o=(i,e,t)=>f(i,typeof e!="symbol"?e+"":e,t);const p=require("vue"),u=(i,e)=>p.defineAsyncComponent({loader:i,loadingComponent:e,delay:80});function v(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(n){n(t)}),(s=i.get("*"))&&s.slice().map(function(n){n(e,t)})}}}const l=v();class m{constructor(){o(this,"initialized",p.ref(!1));o(this,"sourceData",[]);o(this,"components",{});o(this,"componentConfigs",{});o(this,"baseComponentTypes",[]);o(this,"componentSchemaGroups",p.ref([]));o(this,"hiddenComponents",[]);o(this,"formSchemas",[{label:"表单",type:"form",componentProps:{layout:"horizontal",name:"default",labelWidth:100,labelLayout:"fixed",labelCol:{span:5},wrapperCol:{span:19},colon:!0,labelAlign:"right",labelPlacement:"left"},children:[],id:"root"}]);o(this,"componentGroupNameMap",{});o(this,"sortedGroups",["表单","布局"]);o(this,"viewsContainers",{activitybars:p.shallowRef([]),rightSidebars:p.shallowRef([])});o(this,"publicMethods",{})}component(e,t){typeof t=="function"&&(t=u(t)),this.components[e]=t}registerComponent(e){this.component(e.defaultSchema.type,e.component),e.defaultSchema.input&&(e.config.action||(e.config.action=[]),e.config.action.unshift({type:"setValue",describe:"设置值",argsConfigs:[{...e.defaultSchema,label:"设置数据",field:"0"}]},{type:"getValue",describe:"获取值"})),this.componentConfigs[e.defaultSchema.type]=e,this.computedComponentSchemaGroups()}removeComponent(e){delete this.componentConfigs[e],delete this.components[e]}setSourceData(e){this.sourceData=e,l.emit("updateSource",new Date)}getSourceData(){return Object.prototype.toString.call(this.sourceData)==="[object Array]"?this.sourceData:[]}setBaseComponentTypes(e){this.baseComponentTypes=e}addBaseComponentTypes(e){this.baseComponentTypes.push(e)}removeBaseComponents(){this.baseComponentTypes.forEach(e=>{this.removeComponent(e)}),this.setBaseComponentTypes([]),this.computedComponentSchemaGroups()}getComponents(){return this.components}getComponent(e){return this.components[e]}registerActivitybar(e){typeof e.component=="function"&&(e.component=u(e.component)),typeof e.visible>"u"&&(e.visible=!0);const t=this.viewsContainers.activitybars.value.findIndex(s=>s.id===e.id);t!==-1?this.viewsContainers.activitybars.value[t]=e:this.viewsContainers.activitybars.value.push(e)}getActivitybars(){return this.viewsContainers.activitybars.value}hideActivitybar(e,t="title"){const s=this.viewsContainers.activitybars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.activitybars.value[s].visible=!1)}showActivitybar(e,t="title"){const s=this.viewsContainers.activitybars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.activitybars.value[s].visible=!0)}registerRightSidebar(e){typeof e.component=="function"&&(e.component=u(e.component)),typeof e.visible>"u"&&(e.visible=!0);const t=this.viewsContainers.rightSidebars.value.findIndex(s=>s.id===e.id);t!==-1?this.viewsContainers.rightSidebars.value[t]=e:this.viewsContainers.rightSidebars.value.push(e)}getRightSidebars(){return this.viewsContainers.rightSidebars.value}hideRightSidebar(e,t="title"){const s=this.viewsContainers.rightSidebars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.rightSidebars.value[s].visible=!1)}showRightSidebar(e,t="title"){const s=this.viewsContainers.rightSidebars.value.findIndex(n=>n[t]===e);s!==-1&&(this.viewsContainers.rightSidebars.value[s].visible=!0)}getComponentConfings(){return this.componentConfigs}getComponentConfingByType(e){return this.componentConfigs[e]}computedComponentSchemaGroups(){const e=[];Object.values(this.componentConfigs).forEach(t=>{if(!this.hiddenComponents.includes(t.defaultSchema.type)&&t.groupName){const s=this.componentGroupNameMap[t.groupName]??t.groupName;let n=e.findIndex(r=>r.title===s);n===-1&&(e.push({title:s,list:[]}),n=e.length-1);let a=e[n].list.findIndex(r=>r.type===t.defaultSchema.type);a!==-1?e[n].list[a]=t.defaultSchema:e[n].list.push(t.defaultSchema)}}),e.sort((t,s)=>{const n=this.sortedGroups.indexOf(t.title),a=this.sortedGroups.indexOf(s.title);return n===-1?1:a===-1?-1:n-a}),e.forEach(t=>{t.list.sort((s,n)=>{var h,c;const a=((h=this.componentConfigs[s.type])==null?void 0:h.sort)??1e3,r=((c=this.componentConfigs[n.type])==null?void 0:c.sort)??1e3;return a-r})}),this.componentSchemaGroups.value=e}getComponentSchemaGroups(){return this.componentSchemaGroups}setComponentGroupNameMap(e,t){this.componentGroupNameMap[e]=t}clearComponentGroupNameMap(){this.componentGroupNameMap={}}setSortedGroups(e){this.sortedGroups=e,this.computedComponentSchemaGroups()}clearSortedGroups(){this.sortedGroups=[],this.computedComponentSchemaGroups()}hideComponent(e){this.hiddenComponents.push(e),this.computedComponentSchemaGroups()}showComponent(e){this.hiddenComponents=this.hiddenComponents.filter(t=>t!==e),this.computedComponentSchemaGroups()}setHideComponents(e){this.hiddenComponents=e,this.computedComponentSchemaGroups()}setInitialized(e){this.initialized.value=e}addPublicMethod(e){const t=e.methodName??e.name,s=e.method??e.handler;this.publicMethods[t]={...e,name:t,handler:s}}removePublicMethod(e){delete this.publicMethods[e]}}const C=new m;exports.EventBus=l;exports.PluginManager=m;exports.loadAsyncComponent=u;exports.pluginManager=C;
|
package/dist/select-B8HCbraJ.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, h as o } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { ElSelect as d, ElOption as p } from "element-plus";
|
|
4
|
-
const s = m({
|
|
5
|
-
emits: ["update:modelValue"],
|
|
6
|
-
setup(i, { emit: u, attrs: l }) {
|
|
7
|
-
function n(e = null) {
|
|
8
|
-
u("update:modelValue", e);
|
|
9
|
-
}
|
|
10
|
-
return () => {
|
|
11
|
-
const e = {
|
|
12
|
-
...l,
|
|
13
|
-
key: String(l.multiple),
|
|
14
|
-
"onUpdate:modelValue": n
|
|
15
|
-
};
|
|
16
|
-
return o(d, e, {
|
|
17
|
-
default: () => {
|
|
18
|
-
var t;
|
|
19
|
-
return [
|
|
20
|
-
(t = e == null ? void 0 : e.options) == null ? void 0 : t.map((a) => o(p, { label: a.label, value: a.value }))
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
s as default
|
|
29
|
-
};
|
package/dist/select-D6bRz5G2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");;/* empty css */const a=require("element-plus"),r=l.defineComponent({emits:["update:modelValue"],setup(i,{emit:o,attrs:t}){function d(e=null){o("update:modelValue",e)}return()=>{const e={...t,key:String(t.multiple),"onUpdate:modelValue":d};return l.h(a.ElSelect,e,{default:()=>{var u;return[(u=e==null?void 0:e.options)==null?void 0:u.map(n=>l.h(a.ElOption,{label:n.label,value:n.value}))]}})}}});exports.default=r;
|
package/dist/sign-Dx0d5kWo.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),W=require("./pluginManager-itCTrGag.cjs"),B=require("./axios-tuVKNgv9.cjs"),E=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j={class:"btn"},q={class:"btns"},z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})}},emits:["update:modelValue"],setup(y,{expose:x,emit:b}){const f=W.pluginManager.getComponent("button"),w=b,a=y;t.watch(()=>a.componentSchema,()=>{t.nextTick(()=>{p()})},{deep:!0,immediate:!0});const P=new ResizeObserver(o=>{for(const e of o)e.target&&e.target.clientWidth&&e.target.clientHeight&&p()}),l=t.ref(null),u=t.ref(null),n=t.ref(),S=t.ref("");function p(){var o,e;u.value&&((o=u.value)!=null&&o.clientHeight)&&((e=u.value)!=null&&e.clientWidth)&&(l.value.height=u.value.clientHeight,l.value.width=u.value.clientWidth,n.value=l.value.getContext("2d"),n.value.lineWidth=a.componentSchema.componentProps.lineWidth||4,a.componentSchema&&a.componentSchema.componentProps&&a.componentSchema.componentProps.style&&a.componentSchema.componentProps.style.color&&(n.value.strokeStyle=a.componentSchema.componentProps.style.color),S.value=l.value.getBoundingClientRect())}const r=t.ref(""),i=t.ref(""),_=t.ref(""),T=t.ref(""),s=t.ref([]),v=t.ref(!1);function k(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};r.value=e.x,i.value=e.y,n.value.beginPath(),n.value.moveTo(e.x,e.y),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),s.value.push(e),v.value=!0}function V(o){if(o=o||event,o.preventDefault(),v.value){let e={x:o.offsetX,y:o.offsetY};_.value=e.x,T.value=e.y,n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),r.value=e.x,i.value=e.y,s.value.push(e)}}function C(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),s.value.push(e),s.value.push({x:-1,y:-1}),v.value=!1}function d(){n.value.clearRect(0,0,l.value.width,l.value.height),s.value=[]}async function m(){let o=await N(l.value.toDataURL("image/png"));w("update:modelValue",o)}async function N(o){let e=atob(o.split(",")[1]),h=new ArrayBuffer(e.length),D=new Uint8Array(h);for(let c=0;c<e.length;c++)D[c]=e.charCodeAt(c);let M=new Blob([h],{type:"image/png"}),g=new FormData;return g.append("file",M,Date.now()+"png"),(await B.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:g,headers:{"Content-Type":"multipart/form-data"}})).data.data.url}return t.onMounted(()=>{p(),P.observe(u.value)}),t.onUnmounted(()=>{}),x({surewrite:m}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:a.componentSchema.componentProps.style.height,width:a.componentSchema.componentProps.style.width||"100%"})},[t.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:u},[t.createElementVNode("canvas",{ref_key:"canvas",ref:l,onMousedown:k,onMousemove:V,onMouseup:C},null,544)],512),t.createElementVNode("div",j,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",q,[t.createVNode(t.unref(f),{type:"info",size:"mini",onClick:d,onTouch:d},{default:t.withCtx(()=>e[0]||(e[0]=[t.createTextVNode("重写")])),_:1}),t.createVNode(t.unref(f),{type:"primary",size:"mini",onClick:m,onTouch:m},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1})])])],4))}},X=E._export_sfc(z,[["__scopeId","data-v-e972b6e0"]]);exports.default=X;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-p6doDa9j.cjs");require("./pluginManager-itCTrGag.cjs");const h=["title"],m={class:"epic-attr-input"},k=e.defineComponent({__name:"styleView",setup(v){const p=e.inject("designer"),u=e.inject("pageSchema"),d=e.inject("revoke"),r=[{label:"宽度",type:"EInputSize",field:"componentProps.style.width"},{label:"高度",type:"EInputSize",field:"componentProps.style.height"},{label:"内边距",type:"EInputSize",field:"componentProps.style.padding"},{label:"外边距",type:"EInputSize",field:"componentProps.style.margin"},{label:"背景色",type:"color-picker",field:"componentProps.style.backgroundColor",componentProps:{type:"color",style:{}}},{label:"字体颜色",type:"color-picker",field:"componentProps.style.color",componentProps:{type:"color",style:{}}}],c=e.computed(()=>p.state.checkedNode);function i(t){var n;return typeof t.show=="boolean"?t.show:((n=t.show)==null?void 0:n.call(t,{values:c.value}))??!0}function y(t,n,l,o=c.value){typeof l.onChange=="function"&&l.onChange({value:t,values:o,componentStyles:r}),l.changeSync?a.setValueByPath(o,n,t):e.nextTick(()=>{a.setValueByPath(o,n,t)}),d.push(u.schemas,"编辑组件属性")}return(t,n)=>{var l;return e.openBlock(),e.createElementBlock("div",{class:"epic-style-view",key:(l=c.value)==null?void 0:l.id},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(r,o=>{var s;return e.createElementVNode("div",{key:o.field},[i(o)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["epic-attr-item",o.layout])},[o.label?(e.openBlock(),e.createElementBlock("div",{key:0,class:"epic-attr-label",title:o.label},e.toDisplayString(o.label),9,h)):e.createCommentVNode("",!0),e.createElementVNode("div",m,[e.createVNode(e.unref(a._sfc_main),{componentSchema:{...o,componentProps:{...o.componentProps,...o.field==="componentProps.defaultValue"?(s=c.value)==null?void 0:s.componentProps:{},input:!1,field:void 0,hidden:!1},show:!0,noFormItem:!0},"model-value":e.unref(a.getValueByPath)(o.editData??c.value,o.field),"onUpdate:modelValue":f=>y(f,o.field,o,o.editData)},null,8,["componentSchema","model-value","onUpdate:modelValue"])])],2)):e.createCommentVNode("",!0)])}),64))])}}});exports.default=k;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),C=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),k=require("./pluginManager-itCTrGag.cjs"),S=require("./vuedraggable.umd-BqhSJIAi.cjs"),_=e.defineComponent({name:"ETreeNodeItem",__name:"treeNodeItem",props:{schema:{}},setup(x){const a=x,u=e.inject("slots",{}),m=e.inject("pageSchema",{}),c=e.inject("expandedKeys"),v=e.inject("treeProps"),h=e.inject("selectedKeys"),i=e.inject("handleSelect"),g=e.computed(()=>c.value.includes(a.schema.id??"")),f=e.defineComponent({setup(){return()=>{var n;return e.h("span",{class:{text:!0,hover:v.hoverKey===a.schema.id,checked:h.value.includes(a.schema.id)},onClick:()=>i(a.schema.id,a.schema)},((n=u["tree-node"])==null?void 0:n.call(u,a))??e.h("span",{class:"epic-text-padding flex"},{default:()=>{var t;return[e.h("span",{class:"max-w-full truncate"},a.schema.label??((t=k.pluginManager.getComponentConfingByType(a.schema.type))==null?void 0:t.defaultSchema.label)),e.h("span",{class:"epic-node-type-text flex-1 w-0 truncate"},a.schema.id)]}}))}}});function o(){const n=a.schema.id;if(!n)return!1;c.value.includes(n)?c.value=c.value.filter(t=>t!==n):c.value.push(n)}function r(){var t;const n=a.schema.id;if(!n||!((t=a.schema.children)!=null&&t.length))return!1;c.value.push(n)}return r(),(n,t)=>{var l,d,p,s,y;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["epic-tree-node",{expanded:(l=a.schema.children)==null?void 0:l.length,"level-1":a.schema.id===((d=e.unref(m).schemas[0])==null?void 0:d.id)}])},[e.createElementVNode("a",null,[(p=a.schema.children)!=null&&p.length&&a.schema.id!==((s=e.unref(m).schemas[0])==null?void 0:s.id)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["icon-expanded",{expanded:g.value}]),onClick:o},[e.createVNode(e.unref(C._sfc_main),{name:"icon--epic--caret-right-outlined"})],2)):e.createCommentVNode("",!0),e.createVNode(e.unref(f))]),(y=a.schema.children)!=null&&y.length?(e.openBlock(),e.createBlock(B,{key:0,class:e.normalizeClass(["epic-tree-sublist",{expanded:g.value}]),schemas:a.schema.children,"onUpdate:schemas":t[0]||(t[0]=b=>a.schema.children=b),parentSchema:a.schema},null,8,["class","schemas","parentSchema"])):e.createCommentVNode("",!0)],2)}}}),N={key:1},B=e.defineComponent({name:"ETreeNodes",__name:"treeNodes",props:{schemas:{},parentSchema:{}},emits:["update:schemas"],setup(x,{emit:a}){const u=e.inject("designer"),m=e.inject("pageSchema"),c=e.inject("treeProps"),v=x,h=a,i=e.computed({get(){return v.schemas},set(o){h("update:schemas",o)}});function g(o){u.setDisableHover(!0),u.setCheckedNode(i.value[o])}function f(o){var r,n,t;return o.id===((r=m.schemas[0])==null?void 0:r.id)||(t=(n=k.pluginManager.getComponentConfingByType(o.type))==null?void 0:n.editConstraints)!=null&&t.immovable?"unmover-item":"draggable-item"}return(o,r)=>{var n,t,l,d,p;return(l=(t=e.unref(k.pluginManager).getComponentConfingByType(((n=v.parentSchema)==null?void 0:n.type)||""))==null?void 0:t.editConstraints)!=null&&l.childImmovable?(e.openBlock(),e.createElementBlock("ul",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(_,{key:s.id,schema:s},null,8,["schema"]))),128))])):(e.openBlock(),e.createBlock(e.unref(S.draggable),e.mergeProps({key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=s=>i.value=s),"item-key":"id","component-data":{},class:"epic-draggable-range"},{animation:200,tag:"ul",group:"tree-draggable",ghostClass:"moveing",draggable:".draggable-item",disabled:!e.unref(c).draggable||((d=i.value[0])==null?void 0:d.id)===((p=e.unref(m).schemas[0])==null?void 0:p.id)},{onStart:r[1]||(r[1]=s=>g(s.oldIndex))}),{item:e.withCtx(({element:s,index:y})=>[(e.openBlock(),e.createBlock(_,{class:e.normalizeClass(f(s)),key:s.id,schema:s},null,8,["class","schema"]))]),_:1},16,["modelValue"]))}}}),V={class:"epic-tree h-full flex flex-col"},E={class:"epic-search-box px-10px py-6px"},K={class:"epic-tree-main flex-1 overflow-auto h-0"},T={class:"text-center pt-42px text-gray-400"},j=e.defineComponent({name:"ETree",__name:"tree",props:{options:{type:Array,default:()=>[]},hoverKey:{type:String,default:""},selectedKeys:{type:Array,default:()=>[]},draggable:{type:Boolean,default:!1}},emits:["update:selectedKeys","nodeClick"],setup(x,{emit:a}){const u=e.useSlots();e.provide("slots",u);const m=k.pluginManager.getComponent("input"),c=e.ref(""),v=e.ref([]),h=x,i=a,g=e.computed({get(){return h.selectedKeys},set(n){i("update:selectedKeys",n)}}),f=e.computed({get(){return o(h.options,c.value)},set(n){console.log(n)}});function o(n,t){const l=[];return n.forEach(d=>{var p;if((p=d.label)!=null&&p.includes(t))l.push(d);else if(d.children){const s=o(d.children,t);if(s.length>0){const y={...d};y.children=s,l.push(y)}}}),l}function r(n,t){g.value=[n],i("nodeClick",{id:n,componentSchema:t})}return e.provide("expandedKeys",v),e.provide("selectedKeys",g),e.provide("treeProps",h),e.provide("handleSelect",r),(n,t)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",E,[e.createVNode(e.unref(m),{placeholder:"搜索节点",clearable:"",allowClear:"",modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=l=>c.value=l),value:c.value,"onUpdate:value":t[1]||(t[1]=l=>c.value=l)},{prefix:e.withCtx(()=>[e.createVNode(e.unref(C._sfc_main),{name:"icon--epic--search-rounded"})]),_:1},8,["modelValue","value"])]),e.createElementVNode("div",K,[e.createElementVNode("ul",null,[e.createVNode(B,{schemas:f.value,"onUpdate:schemas":t[2]||(t[2]=l=>f.value=l)},null,8,["schemas"])]),e.withDirectives(e.createElementVNode("div",T,"没有查询到的数据",512),[[e.vShow,!f.value.length]])])]))}});exports._sfc_main=j;
|