epic-designer-gold 0.0.14 → 0.0.15
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-lpFl3t4a.cjs → attributeView-BoLhVQzb.cjs} +1 -1
- package/dist/{attributeView-BN2nA4jI.js → attributeView-CsETdPfQ.js} +1 -1
- package/dist/core/components/node/src/node.vue.d.ts +2 -2
- package/dist/core/extensions/EOptionsEditor/index.vue.d.ts +2 -2
- package/dist/{eventView-DgqXxWY1.cjs → eventView-CeoqK6Se.cjs} +1 -1
- package/dist/{eventView-BKpQ9YIh.js → eventView-y92-iX1R.js} +1 -1
- package/dist/{index-BXNPTGKl.cjs → index-9NfXcZ4Y.cjs} +1 -1
- package/dist/{index-YHlIFgpT.cjs → index-BUw5OdPn.cjs} +1 -1
- package/dist/index-BXqSZLpt.js +4 -0
- package/dist/{index-Mf82MCCF.js → index-BimQe5uF.js} +1 -1
- package/dist/{index-D8YBJFH6.cjs → index-BuNxO1Pv.cjs} +1 -1
- package/dist/{index-CdgT4gQu.cjs → index-BwZBxXdy.cjs} +1 -1
- package/dist/index-C3ug5HS-.cjs +10 -0
- package/dist/index-CM2yS7Lz.js +216 -0
- package/dist/{index-DPfAejnH.js → index-CgW7uOAC.js} +1 -1
- package/dist/{index-Ol-YPkY9.js → index-CzIPdR2H.js} +256 -256
- package/dist/{index-kWCcT4er.js → index-D4hsNiQf.js} +1 -1
- package/dist/{index-BzsFImwK.js → index-DLeXF615.js} +1 -1
- package/dist/{index-DZYSBPVO.js → index-DqoXRcy4.js} +1 -1
- package/dist/{index-Yx99TN9O.js → index-Dzatsws1.js} +1 -1
- package/dist/{index-CNzcV-bQ.cjs → index-FRRNZqrr.cjs} +1 -1
- package/dist/{index-CGHtM1lr.cjs → index-FW4I6HiK.cjs} +1 -1
- package/dist/index-PwPgOIVo.cjs +1 -0
- package/dist/{index-BlJ0TQyn.js → index-QVJsPbkw.js} +1 -1
- package/dist/{index-By5rfqCj.cjs → index-Uwfc3-yh.cjs} +1 -1
- package/dist/{index-lH0_mCG-.cjs → index-uPLxG_y4.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/select-B8HCbraJ.js +29 -0
- package/dist/select-D6bRz5G2.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-auUK19Dr.cjs → styleView-BfH5Ujdi.cjs} +1 -1
- package/dist/{styleView-CXp05_Ar.js → styleView-kap7mePV.js} +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-BHmIF8aI.cjs +0 -10
- package/dist/index-CL_7RzF7.js +0 -214
- package/dist/index-CkRhCvJK.cjs +0 -1
- package/dist/index-qJNRPNIj.js +0 -4
- package/dist/select-B479QwwL.cjs +0 -1
- package/dist/select-CtUVWh2M.js +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var f=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of u(l))!b.call(e,t)&&t!==o&&r(e,t,{get:()=>l[t],enumerable:!(a=d(l,t))||a.enumerable});return e};var p=(e,l,o)=>(o=e!=null?s(m(e)):{},f(l||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("epic-designer-gold"),n=require("element-plus"),h={component:async()=>(await import("element-plus")).ElInput,groupName:"表单",icon:"icon--epic--border-color-outline-rounded",sort:700,defaultSchema:{label:"输入框",type:"input",field:"input",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"input",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"输入类型",type:"select",defaultValue:"text",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"text",value:"text"},{label:"number",value:"number"},{label:"password",value:"password"}]},field:"componentProps.type"},{label:"显示切换图标",type:"switch",field:"componentProps.showPassword",show:({values:e})=>e.componentProps.type==="password"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值时"},{type:"change",describe:"值修改时"},{type:"focus",describe:"获取焦点时"},{type:"blur",describe:"失去焦点时"},{type:"clear",describe:"点击清空按钮时"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},P={component:async()=>(await import("element-plus")).ElInput,icon:"icon--epic--edit-square-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"文本域",type:"textarea",field:"textarea",input:!0,componentProps:{placeholder:"请输入",type:"textarea"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"textarea",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"最小行数",type:"number",field:"componentProps.autosize.minRows",componentProps:{placeholder:"请输入"}},{label:"最大行数",type:"number",field:"componentProps.autosize.maxRows",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值"},{type:"change",describe:"值修改"},{type:"focus",describe:"获取焦点"},{type:"blur",describe:"失去焦点"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},v={component:async()=>(await import("element-plus")).ElInputNumber,groupName:"表单",icon:"icon--epic--123-rounded",sort:710,defaultSchema:{label:"数字输入框",type:"number",field:"number",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"number",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"控制按钮位置",type:"select",defaultValue:"",componentProps:{options:[{label:"default",value:""},{label:"right",value:"right"}],placeholder:"请选择",clearable:!0},field:"componentProps.controlsPosition"},{label:"精度",type:"number",field:"componentProps.precision",componentProps:{placeholder:"请输入"}},{label:"输入控制为步长的倍数",type:"switch",field:"componentProps.stepStrictly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},w={component:()=>Promise.resolve().then(()=>require("../../form-CthzLIgs.cjs")),groupName:"表单",icon:"icon--epic--list-alt-outline-rounded",sort:600,defaultSchema:{label:"表单",type:"form",componentProps:{name:"default",labelWidth:"100px","label-position":"left"},children:[]},config:{attribute:[{label:"Name",type:"input",field:"componentProps.name"},{label:"标签位置",type:"radio",field:"componentProps.label-position",componentProps:{clearable:!0,radioButton:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"},{label:"顶部",value:"top"}]}},{label:"标签宽度",type:"EInputSize",field:"componentProps.labelWidth"},{label:"标签后缀",type:"input",field:"componentProps.labelSuffix",componentProps:{placeholder:"请输入"}},{label:"表单尺寸",type:"select",field:"componentProps.size",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]}},{label:"星号位置",type:"select",field:"componentProps.require-asterisk-position",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"}]}},{label:"行内展示校验信息",type:"switch",field:"componentProps.inline-message"},{label:"校验反馈图标",type:"switch",field:"componentProps.status-icon"},{label:"滚动校验错误处",type:"switch",field:"componentProps.scroll-to-error"},{label:"行内模式",type:"switch",field:"componentProps.inline"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},g={component:()=>Promise.resolve().then(()=>require("../../formItem-BVnNs1Q9.cjs")),defaultSchema:{label:"表单项",type:"form-item"},config:{}},E={component:()=>Promise.resolve().then(()=>require("../../button-Cc4KYk3v.cjs")),groupName:"表单",icon:"icon--epic--fit-screen-rounded",sort:1200,defaultSchema:{label:"按钮",type:"button",field:"input",input:!1},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},field:"componentProps.type"},{label:"操作类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"button",value:"button"},{label:"submit",value:"submit"},{label:"reset",value:"reset"}]},field:"componentProps.native-type"},{label:"自定义颜色",type:"color-picker",field:"componentProps.color",componentProps:{type:"color"}},{label:"朴素按钮",type:"switch",field:"componentProps.plain"},{label:"圆角按钮",type:"switch",field:"componentProps.round"},{label:"圆形按钮",type:"switch",field:"componentProps.circle"},{label:"文字按钮",type:"switch",field:"componentProps.text"},{label:"加载状态",type:"switch",field:"componentProps.loading"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],event:[{type:"click",describe:"点击按钮时"},{type:"dblclick",describe:"双击按钮时"}]}},S={component:()=>Promise.resolve().then(()=>require("../../card-BowzD9vN.cjs")),groupName:"布局",icon:"icon--epic--wysiwyg-rounded",sort:700,defaultSchema:{label:"卡片布局",type:"card",children:[],componentProps:{}},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"阴影时机",type:"select",componentProps:{options:[{label:"always",value:"always"},{label:"hover",value:"hover"},{label:"never",value:"never"}],placeholder:"请选择",clearable:!0},field:"componentProps.shadow"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},x={component:()=>Promise.resolve().then(()=>require("../../row-NNlPGZRG.cjs")),groupName:"布局",icon:"icon--epic--width-normal-outline",sort:800,defaultSchema:{label:"栅格布局",type:"row",children:[{type:"col",children:[],componentProps:{span:12}},{type:"col",children:[],componentProps:{span:12}}]},editConstraints:{childImmovable:!0},config:{attribute:[{label:"垂直对齐方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}],placeholder:"请选择"},field:"componentProps.align"},{label:"水平排列方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}],placeholder:"请选择"},field:"componentProps.justify"},{label:"栅格间距",type:"number",field:"componentProps.gutter",componentProps:{placeholder:"请输入"}},{label:"列编辑",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},Y={component:()=>Promise.resolve().then(()=>require("../../col-B1GUMkMK.cjs")),defaultSchema:{label:"栅格布局-列",type:"col",children:[],componentProps:{span:6}},config:{attribute:[{label:"占位格数",type:"number",field:"componentProps.span"}]}},V={component:()=>Promise.resolve().then(()=>require("../../select-B479QwwL.cjs")),groupName:"表单",icon:"icon--epic--select",sort:900,defaultSchema:{label:"选择框",type:"select",field:"select",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],dynamicId:"",placeholder:"请选择",size:"default",effect:"light",placement:"bottom-start"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"select",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可多选",type:"switch",field:"componentProps.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"多选隐藏",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.multiple},{label:"隐藏提示",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.multiple&&e.componentProps.collapseTags},{label:"保留搜索关键字",type:"switch",field:"componentProps.reserveKeyword",show:({values:e})=>e.componentProps.multiple},{label:"标签类型",type:"select",defaultValue:"info",componentProps:{options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},show:({values:e})=>e.componentProps.multiple,field:"componentProps.tagType"},{label:"多选限制",type:"number",field:"componentProps.multipleLimit",show:({values:e})=>e.componentProps.multiple},{label:"提示主题",type:"select",componentProps:{options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]},field:"componentProps.effect"},{label:"可筛选",type:"switch",field:"componentProps.filterable"},{label:"允许创建条目",type:"switch",field:"componentProps.allowCreate"},{label:"下拉框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"下拉框宽度与输入框相同",type:"switch",field:"componentProps.fitInputWidth"},{label:"无数据时文本",type:"input",field:"componentProps.noDataText",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},C={component:()=>Promise.resolve().then(()=>require("../../radio-D3AHEMXb.cjs")),groupName:"表单",icon:"icon--epic--radio-button-checked-outline",sort:850,defaultSchema:{label:"单选框",type:"radio",field:"radio",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],size:"default"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"radio",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},k={component:()=>Promise.resolve().then(()=>require("../../checkbox-CMr5pERY.cjs")),groupName:"表单",icon:"icon--epic--dialogs-outline-rounded",sort:860,defaultSchema:{label:"复选框",type:"checkbox",field:"checkbox",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}]}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"checkbox",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大选中数",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小选中数",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},T={component:async()=>(await import("element-plus")).ElSlider,groupName:"表单",icon:"icon--epic--switches",sort:930,defaultSchema:{label:"滑块",type:"slider",field:"slider",input:!0,componentProps:{placement:"top-start",showTooltip:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"slider",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.max"),t=o.value[a];t.componentProps={min:e},(l.componentProps.max??0)<e&&(l.componentProps.max=e)}},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.min"),t=o.value[a];t.componentProps={max:e},(l.componentProps.min??0)>e&&(l.componentProps.min=e)}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"显示间断点",type:"switch",field:"componentProps.showStops"},{label:"提示信息",type:"switch",field:"componentProps.showTooltip"},{label:"开启选择范围",type:"switch",field:"componentProps.range"},{label:"垂直模式",type:"switch",field:"componentProps.vertical"},{label:"高度",type:"EInputSize",field:"componentProps.height",show:({values:e})=>e.componentProps.vertical},{label:"显示数字框",type:"switch",field:"componentProps.showInput",onChange:({value:e,values:l})=>{e&&(l.componentProps.showInputControls=!0)}},{label:"控制按钮",type:"switch",field:"componentProps.showInputControls",show:({values:e})=>e.componentProps.showInput},{label:"提示框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"input",describe:"拖拽实时触发"},{type:"change",describe:"拖拽结束改变值时"}]}},D={component:async()=>(await import("element-plus")).ElColorPicker,groupName:"表单",icon:"icon--epic--palette-outline",sort:950,defaultSchema:{label:"颜色选择器",type:"color-picker",field:"color-picker",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"color-picker",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"格式",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},field:"componentProps.colorFormat"},{label:"透明度选择",type:"switch",field:"componentProps.showAlpha"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}],action:[]}},I={component:async()=>(await import("element-plus")).ElSwitch,groupName:"表单",icon:"icon--epic--toggle-off-outline",sort:930,defaultSchema:{label:"开关",type:"switch",field:"switch",input:!0,componentProps:{defaultValue:!1}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"switch",field:"componentProps.defaultValue"},{label:"ON状态值",type:"input",field:"componentProps.activeValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"OFF状态值",type:"input",field:"componentProps.inactiveValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"ON状态描述",type:"input",field:"componentProps.activeText",componentProps:{placeholder:"请输入"}},{label:"OFF状态描述",type:"input",field:"componentProps.inactiveText",componentProps:{placeholder:"请输入"}},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"宽度",type:"number",field:"componentProps.width",componentProps:{min:50,placeholder:"请输入"}},{label:"文本点内显示",type:"switch",field:"componentProps.inlinePrompt"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"boolean"}}],event:[{type:"change",describe:"状态发生变化时"}]}};function c(e){var o;let l=((o=e.values.componentProps)==null?void 0:o.inactiveValue)||!1;e.values.componentProps.unCheckedValue===""&&delete e.values.componentProps.unCheckedValue,e.values.componentProps.activeValue===""&&delete e.values.componentProps.activeValue,e.values.componentProps?e.values.componentProps.defaultValue=l:e.values.componentProps={defaultValue:l}}const z={component:async()=>(await import("element-plus")).ElCascader,groupName:"表单",icon:"icon--epic--full-coverage-outline",sort:900,defaultSchema:{label:"级联选择器",type:"cascader",field:"cascader",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],placeholder:"请选择",props:{expandTrigger:"click"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"cascader",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"分割符",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.separator"},{label:"次级菜单展开方式",type:"select",field:"componentProps.props.expandTrigger",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"click",value:"click"},{label:"hover",value:"hover"}]}},{label:"可搜索",type:"switch",field:"componentProps.filterable"},{label:"可多选",type:"switch",field:"componentProps.props.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"折叠Tag",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.props.multiple},{label:"显示被折叠标签",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.props.multiple&&e.componentProps.collapseTags},{label:"不显示路径",type:"switch",componentProps:{activeValue:!1,inactiveValue:!0},field:"componentProps.showAllLevels"},{label:"父级可选",type:"switch",field:"componentProps.props.checkStrictly",describe:"父子节点不互相关联"},{label:"只获取选中节点",type:"switch",field:"componentProps.props.emitPath",componentProps:{activeValue:!1,inactiveValue:!0}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",componentProps:{tree:!0},describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"选中节点变化时"},{type:"blur",describe:" 当失去焦点时触发"},{type:"focus",describe:"当获得焦点时触发"}],action:[{type:"getCheckedNodes",describe:"获取当前选中节点"},{type:"togglePopperVisible",describe:"切换 popper 可见状态"}]}},F={component:()=>Promise.resolve().then(()=>require("../../collapse-B2AXU6Jz.cjs")),icon:"epic-icon-xiala",defaultSchema:{label:"折叠面板",type:"collapse",children:[{type:"collapse-item",children:[],componentProps:{span:12},id:"g062zikd2jk001"},{type:"collapse-item",children:[],componentProps:{span:12},id:"gy5z9jtfb3s001"}]},config:{attribute:[{label:"折叠项管理",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},N={component:()=>Promise.resolve().then(()=>require("../../collapseItem-CAGqWjGg.cjs")),defaultSchema:{label:"折叠项",type:"collapse-item",children:[]},config:{attribute:[]}},R={component:async()=>(await import("element-plus")).ElDatePicker,groupName:"表单",icon:"icon--epic--calendar-month-outline-rounded",sort:910,defaultSchema:{label:"日期选择器",type:"date",field:"date",input:!0,componentProps:{type:"date",valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:"请选择",startPlaceholder:"请选择",endPlaceholder:"请选择"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"date",field:"componentProps.defaultValue"},{label:"日期类型",type:"select",field:"componentProps.type",componentProps:{options:[{label:"日期",value:"date"},{label:"周",value:"week"},{label:"月份",value:"month"},{label:"年份",value:"year"},{label:"时间",value:"datetime"},{label:"时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"多个日期",value:"dates"}]},onChange({values:e,value:l}){e.componentProps.defaultValue=null,["date","daterange","dates"].includes(l)?(e.componentProps.format="YYYY-MM-DD",e.componentProps.valueFormat="YYYY-MM-DD"):["week"].includes(l)?(e.componentProps.format="ww [周]",e.componentProps.valueFormat="YYYY-MM-DD"):["month","monthrange"].includes(l)?(e.componentProps.format="YYYY-MM",e.componentProps.valueFormat="YYYY-MM"):["datetime","datetimerange"].includes(l)?(e.componentProps.format="YYYY-MM-DD HH:mm:ss",e.componentProps.valueFormat="YYYY-MM-DD HH:mm:ss"):["year"].includes(l)&&(e.componentProps.format="YYYY",e.componentProps.valueFormat="YYYY")}},{label:"开始占位符",type:"input",field:"componentProps.startPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"结束占位符",type:"input",field:"componentProps.endPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"占位内容",type:"input",field:"componentProps.placeholder",show({values:e}){return!["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可输入",type:"switch",field:"componentProps.editable"},{label:"显示格式",type:"input",field:"componentProps.format"},{label:"数据格式",type:"input",field:"componentProps.valueFormat"},{label:"分割符",type:"input",field:"componentProps.rangeSeparator",componentProps:{placeholder:"请输入"},show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-z7Ko58XG.cjs")),groupName:"表单",icon:"icon--epic--upload-rounded",sort:920,defaultSchema:{label:"上传文件",type:"upload-file",field:"uploadFile",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={component:()=>Promise.resolve().then(()=>require("../../uploadImage-xU0He_aO.cjs")),groupName:"表单",icon:"icon--epic--imagesmode-outline-rounded",sort:920,defaultSchema:{label:"上传图片",type:"upload-image",field:"uploadImage",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},B={component:()=>Promise.resolve().then(()=>require("../../modal-_fid8E1T.cjs")),defaultSchema:{label:"模态框",type:"modal",children:[]},config:{attribute:[{label:"标题",type:"input",field:"title"}]}},O={component:async()=>await Promise.resolve().then(()=>require("../../sign-Gwu2PIRy.cjs")),icon:"icon--epic--insert-text-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"签名板",type:"sign",field:"sign",input:!0,componentProps:{placeholder:"请输入",lineWidth:4,type:"sign",style:{height:"300px"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"线条宽度(px)",type:"input",componentProps:{placeholder:"请选择",clearable:!0},field:"componentProps.lineWidth"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}};function j(e=y.pluginManager){e.component("FormItem",n.ElFormItem),e.component("Form",n.ElForm),e.component("RadioGroup",n.ElRadioGroup),e.component("RadioButton",n.ElRadioButton),e.component("Tabs",n.ElTabs),e.component("TabPane",n.ElTabPane),e.component("Collapse",n.ElCollapse),e.component("CollapseItem",n.ElCollapseItem),e.component("Drawer",n.ElDrawer),[w,g,h,P,v,C,k,R,V,I,D,z,T,q,M,E,S,x,Y,F,N,B,O].forEach(o=>{e.registerComponent(o),e.addBaseComponentTypes(o.defaultSchema.type)}),e.setInitialized(!0)}function L(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=L;exports.setupElementPlus=j;
|
|
1
|
+
"use strict";var s=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var f=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of u(l))!b.call(e,t)&&t!==o&&r(e,t,{get:()=>l[t],enumerable:!(a=d(l,t))||a.enumerable});return e};var p=(e,l,o)=>(o=e!=null?s(m(e)):{},f(l||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("epic-designer-gold"),n=require("element-plus"),h={component:async()=>(await import("element-plus")).ElInput,groupName:"表单",icon:"icon--epic--border-color-outline-rounded",sort:700,defaultSchema:{label:"输入框",type:"input",field:"input",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"input",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"输入类型",type:"select",defaultValue:"text",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"text",value:"text"},{label:"number",value:"number"},{label:"password",value:"password"}]},field:"componentProps.type"},{label:"显示切换图标",type:"switch",field:"componentProps.showPassword",show:({values:e})=>e.componentProps.type==="password"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值时"},{type:"change",describe:"值修改时"},{type:"focus",describe:"获取焦点时"},{type:"blur",describe:"失去焦点时"},{type:"clear",describe:"点击清空按钮时"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},P={component:async()=>(await import("element-plus")).ElInput,icon:"icon--epic--edit-square-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"文本域",type:"textarea",field:"textarea",input:!0,componentProps:{placeholder:"请输入",type:"textarea"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"textarea",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"最小行数",type:"number",field:"componentProps.autosize.minRows",componentProps:{placeholder:"请输入"}},{label:"最大行数",type:"number",field:"componentProps.autosize.maxRows",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值"},{type:"change",describe:"值修改"},{type:"focus",describe:"获取焦点"},{type:"blur",describe:"失去焦点"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},v={component:async()=>(await import("element-plus")).ElInputNumber,groupName:"表单",icon:"icon--epic--123-rounded",sort:710,defaultSchema:{label:"数字输入框",type:"number",field:"number",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"number",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"控制按钮位置",type:"select",defaultValue:"",componentProps:{options:[{label:"default",value:""},{label:"right",value:"right"}],placeholder:"请选择",clearable:!0},field:"componentProps.controlsPosition"},{label:"精度",type:"number",field:"componentProps.precision",componentProps:{placeholder:"请输入"}},{label:"输入控制为步长的倍数",type:"switch",field:"componentProps.stepStrictly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},w={component:()=>Promise.resolve().then(()=>require("../../form-CthzLIgs.cjs")),groupName:"表单",icon:"icon--epic--list-alt-outline-rounded",sort:600,defaultSchema:{label:"表单",type:"form",componentProps:{name:"default",labelWidth:"100px","label-position":"left"},children:[]},config:{attribute:[{label:"Name",type:"input",field:"componentProps.name"},{label:"标签位置",type:"radio",field:"componentProps.label-position",componentProps:{clearable:!0,radioButton:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"},{label:"顶部",value:"top"}]}},{label:"标签宽度",type:"EInputSize",field:"componentProps.labelWidth"},{label:"标签后缀",type:"input",field:"componentProps.labelSuffix",componentProps:{placeholder:"请输入"}},{label:"表单尺寸",type:"select",field:"componentProps.size",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]}},{label:"星号位置",type:"select",field:"componentProps.require-asterisk-position",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"}]}},{label:"行内展示校验信息",type:"switch",field:"componentProps.inline-message"},{label:"校验反馈图标",type:"switch",field:"componentProps.status-icon"},{label:"滚动校验错误处",type:"switch",field:"componentProps.scroll-to-error"},{label:"行内模式",type:"switch",field:"componentProps.inline"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},g={component:()=>Promise.resolve().then(()=>require("../../formItem-BVnNs1Q9.cjs")),defaultSchema:{label:"表单项",type:"form-item"},config:{}},E={component:()=>Promise.resolve().then(()=>require("../../button-Cc4KYk3v.cjs")),groupName:"表单",icon:"icon--epic--fit-screen-rounded",sort:1200,defaultSchema:{label:"按钮",type:"button",field:"input",input:!1},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},field:"componentProps.type"},{label:"操作类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"button",value:"button"},{label:"submit",value:"submit"},{label:"reset",value:"reset"}]},field:"componentProps.native-type"},{label:"自定义颜色",type:"color-picker",field:"componentProps.color",componentProps:{type:"color"}},{label:"朴素按钮",type:"switch",field:"componentProps.plain"},{label:"圆角按钮",type:"switch",field:"componentProps.round"},{label:"圆形按钮",type:"switch",field:"componentProps.circle"},{label:"文字按钮",type:"switch",field:"componentProps.text"},{label:"加载状态",type:"switch",field:"componentProps.loading"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],event:[{type:"click",describe:"点击按钮时"},{type:"dblclick",describe:"双击按钮时"}]}},S={component:()=>Promise.resolve().then(()=>require("../../card-BowzD9vN.cjs")),groupName:"布局",icon:"icon--epic--wysiwyg-rounded",sort:700,defaultSchema:{label:"卡片布局",type:"card",children:[],componentProps:{}},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"阴影时机",type:"select",componentProps:{options:[{label:"always",value:"always"},{label:"hover",value:"hover"},{label:"never",value:"never"}],placeholder:"请选择",clearable:!0},field:"componentProps.shadow"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},x={component:()=>Promise.resolve().then(()=>require("../../row-NNlPGZRG.cjs")),groupName:"布局",icon:"icon--epic--width-normal-outline",sort:800,defaultSchema:{label:"栅格布局",type:"row",children:[{type:"col",children:[],componentProps:{span:12}},{type:"col",children:[],componentProps:{span:12}}]},editConstraints:{childImmovable:!0},config:{attribute:[{label:"垂直对齐方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}],placeholder:"请选择"},field:"componentProps.align"},{label:"水平排列方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}],placeholder:"请选择"},field:"componentProps.justify"},{label:"栅格间距",type:"number",field:"componentProps.gutter",componentProps:{placeholder:"请输入"}},{label:"列编辑",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},Y={component:()=>Promise.resolve().then(()=>require("../../col-B1GUMkMK.cjs")),defaultSchema:{label:"栅格布局-列",type:"col",children:[],componentProps:{span:6}},config:{attribute:[{label:"占位格数",type:"number",field:"componentProps.span"}]}},V={component:()=>Promise.resolve().then(()=>require("../../select-D6bRz5G2.cjs")),groupName:"表单",icon:"icon--epic--select",sort:900,defaultSchema:{label:"选择框",type:"select",field:"select",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],dynamicId:"",placeholder:"请选择",size:"default",effect:"light",placement:"bottom-start"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"select",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可多选",type:"switch",field:"componentProps.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"多选隐藏",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.multiple},{label:"隐藏提示",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.multiple&&e.componentProps.collapseTags},{label:"保留搜索关键字",type:"switch",field:"componentProps.reserveKeyword",show:({values:e})=>e.componentProps.multiple},{label:"标签类型",type:"select",defaultValue:"info",componentProps:{options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},show:({values:e})=>e.componentProps.multiple,field:"componentProps.tagType"},{label:"多选限制",type:"number",field:"componentProps.multipleLimit",show:({values:e})=>e.componentProps.multiple},{label:"提示主题",type:"select",componentProps:{options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]},field:"componentProps.effect"},{label:"可筛选",type:"switch",field:"componentProps.filterable"},{label:"允许创建条目",type:"switch",field:"componentProps.allowCreate"},{label:"下拉框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"下拉框宽度与输入框相同",type:"switch",field:"componentProps.fitInputWidth"},{label:"无数据时文本",type:"input",field:"componentProps.noDataText",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},C={component:()=>Promise.resolve().then(()=>require("../../radio-D3AHEMXb.cjs")),groupName:"表单",icon:"icon--epic--radio-button-checked-outline",sort:850,defaultSchema:{label:"单选框",type:"radio",field:"radio",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],size:"default"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"radio",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},k={component:()=>Promise.resolve().then(()=>require("../../checkbox-CMr5pERY.cjs")),groupName:"表单",icon:"icon--epic--dialogs-outline-rounded",sort:860,defaultSchema:{label:"复选框",type:"checkbox",field:"checkbox",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}]}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"checkbox",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大选中数",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小选中数",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},T={component:async()=>(await import("element-plus")).ElSlider,groupName:"表单",icon:"icon--epic--switches",sort:930,defaultSchema:{label:"滑块",type:"slider",field:"slider",input:!0,componentProps:{placement:"top-start",showTooltip:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"slider",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.max"),t=o.value[a];t.componentProps={min:e},(l.componentProps.max??0)<e&&(l.componentProps.max=e)}},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.min"),t=o.value[a];t.componentProps={max:e},(l.componentProps.min??0)>e&&(l.componentProps.min=e)}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"显示间断点",type:"switch",field:"componentProps.showStops"},{label:"提示信息",type:"switch",field:"componentProps.showTooltip"},{label:"开启选择范围",type:"switch",field:"componentProps.range"},{label:"垂直模式",type:"switch",field:"componentProps.vertical"},{label:"高度",type:"EInputSize",field:"componentProps.height",show:({values:e})=>e.componentProps.vertical},{label:"显示数字框",type:"switch",field:"componentProps.showInput",onChange:({value:e,values:l})=>{e&&(l.componentProps.showInputControls=!0)}},{label:"控制按钮",type:"switch",field:"componentProps.showInputControls",show:({values:e})=>e.componentProps.showInput},{label:"提示框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"input",describe:"拖拽实时触发"},{type:"change",describe:"拖拽结束改变值时"}]}},D={component:async()=>(await import("element-plus")).ElColorPicker,groupName:"表单",icon:"icon--epic--palette-outline",sort:950,defaultSchema:{label:"颜色选择器",type:"color-picker",field:"color-picker",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"color-picker",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"格式",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},field:"componentProps.colorFormat"},{label:"透明度选择",type:"switch",field:"componentProps.showAlpha"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}],action:[]}},I={component:async()=>(await import("element-plus")).ElSwitch,groupName:"表单",icon:"icon--epic--toggle-off-outline",sort:930,defaultSchema:{label:"开关",type:"switch",field:"switch",input:!0,componentProps:{defaultValue:!1}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"switch",field:"componentProps.defaultValue"},{label:"ON状态值",type:"input",field:"componentProps.activeValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"OFF状态值",type:"input",field:"componentProps.inactiveValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"ON状态描述",type:"input",field:"componentProps.activeText",componentProps:{placeholder:"请输入"}},{label:"OFF状态描述",type:"input",field:"componentProps.inactiveText",componentProps:{placeholder:"请输入"}},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"宽度",type:"number",field:"componentProps.width",componentProps:{min:50,placeholder:"请输入"}},{label:"文本点内显示",type:"switch",field:"componentProps.inlinePrompt"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"boolean"}}],event:[{type:"change",describe:"状态发生变化时"}]}};function c(e){var o;let l=((o=e.values.componentProps)==null?void 0:o.inactiveValue)||!1;e.values.componentProps.unCheckedValue===""&&delete e.values.componentProps.unCheckedValue,e.values.componentProps.activeValue===""&&delete e.values.componentProps.activeValue,e.values.componentProps?e.values.componentProps.defaultValue=l:e.values.componentProps={defaultValue:l}}const z={component:async()=>(await import("element-plus")).ElCascader,groupName:"表单",icon:"icon--epic--full-coverage-outline",sort:900,defaultSchema:{label:"级联选择器",type:"cascader",field:"cascader",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],placeholder:"请选择",props:{expandTrigger:"click"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"cascader",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"分割符",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.separator"},{label:"次级菜单展开方式",type:"select",field:"componentProps.props.expandTrigger",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"click",value:"click"},{label:"hover",value:"hover"}]}},{label:"可搜索",type:"switch",field:"componentProps.filterable"},{label:"可多选",type:"switch",field:"componentProps.props.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"折叠Tag",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.props.multiple},{label:"显示被折叠标签",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.props.multiple&&e.componentProps.collapseTags},{label:"不显示路径",type:"switch",componentProps:{activeValue:!1,inactiveValue:!0},field:"componentProps.showAllLevels"},{label:"父级可选",type:"switch",field:"componentProps.props.checkStrictly",describe:"父子节点不互相关联"},{label:"只获取选中节点",type:"switch",field:"componentProps.props.emitPath",componentProps:{activeValue:!1,inactiveValue:!0}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",componentProps:{tree:!0},describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"选中节点变化时"},{type:"blur",describe:" 当失去焦点时触发"},{type:"focus",describe:"当获得焦点时触发"}],action:[{type:"getCheckedNodes",describe:"获取当前选中节点"},{type:"togglePopperVisible",describe:"切换 popper 可见状态"}]}},F={component:()=>Promise.resolve().then(()=>require("../../collapse-B2AXU6Jz.cjs")),icon:"epic-icon-xiala",defaultSchema:{label:"折叠面板",type:"collapse",children:[{type:"collapse-item",children:[],componentProps:{span:12},id:"g062zikd2jk001"},{type:"collapse-item",children:[],componentProps:{span:12},id:"gy5z9jtfb3s001"}]},config:{attribute:[{label:"折叠项管理",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},N={component:()=>Promise.resolve().then(()=>require("../../collapseItem-CAGqWjGg.cjs")),defaultSchema:{label:"折叠项",type:"collapse-item",children:[]},config:{attribute:[]}},R={component:async()=>(await import("element-plus")).ElDatePicker,groupName:"表单",icon:"icon--epic--calendar-month-outline-rounded",sort:910,defaultSchema:{label:"日期选择器",type:"date",field:"date",input:!0,componentProps:{type:"date",valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:"请选择",startPlaceholder:"请选择",endPlaceholder:"请选择"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"date",field:"componentProps.defaultValue"},{label:"日期类型",type:"select",field:"componentProps.type",componentProps:{options:[{label:"日期",value:"date"},{label:"周",value:"week"},{label:"月份",value:"month"},{label:"年份",value:"year"},{label:"时间",value:"datetime"},{label:"时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"多个日期",value:"dates"}]},onChange({values:e,value:l}){e.componentProps.defaultValue=null,["date","daterange","dates"].includes(l)?(e.componentProps.format="YYYY-MM-DD",e.componentProps.valueFormat="YYYY-MM-DD"):["week"].includes(l)?(e.componentProps.format="ww [周]",e.componentProps.valueFormat="YYYY-MM-DD"):["month","monthrange"].includes(l)?(e.componentProps.format="YYYY-MM",e.componentProps.valueFormat="YYYY-MM"):["datetime","datetimerange"].includes(l)?(e.componentProps.format="YYYY-MM-DD HH:mm:ss",e.componentProps.valueFormat="YYYY-MM-DD HH:mm:ss"):["year"].includes(l)&&(e.componentProps.format="YYYY",e.componentProps.valueFormat="YYYY")}},{label:"开始占位符",type:"input",field:"componentProps.startPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"结束占位符",type:"input",field:"componentProps.endPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"占位内容",type:"input",field:"componentProps.placeholder",show({values:e}){return!["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可输入",type:"switch",field:"componentProps.editable"},{label:"显示格式",type:"input",field:"componentProps.format"},{label:"数据格式",type:"input",field:"componentProps.valueFormat"},{label:"分割符",type:"input",field:"componentProps.rangeSeparator",componentProps:{placeholder:"请输入"},show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-z7Ko58XG.cjs")),groupName:"表单",icon:"icon--epic--upload-rounded",sort:920,defaultSchema:{label:"上传文件",type:"upload-file",field:"uploadFile",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={component:()=>Promise.resolve().then(()=>require("../../uploadImage-xU0He_aO.cjs")),groupName:"表单",icon:"icon--epic--imagesmode-outline-rounded",sort:920,defaultSchema:{label:"上传图片",type:"upload-image",field:"uploadImage",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},B={component:()=>Promise.resolve().then(()=>require("../../modal-_fid8E1T.cjs")),defaultSchema:{label:"模态框",type:"modal",children:[]},config:{attribute:[{label:"标题",type:"input",field:"title"}]}},O={component:async()=>await Promise.resolve().then(()=>require("../../sign-Gwu2PIRy.cjs")),icon:"icon--epic--insert-text-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"签名板",type:"sign",field:"sign",input:!0,componentProps:{placeholder:"请输入",lineWidth:4,type:"sign",style:{height:"300px"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"线条宽度(px)",type:"input",componentProps:{placeholder:"请选择",clearable:!0},field:"componentProps.lineWidth"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}};function j(e=y.pluginManager){e.component("FormItem",n.ElFormItem),e.component("Form",n.ElForm),e.component("RadioGroup",n.ElRadioGroup),e.component("RadioButton",n.ElRadioButton),e.component("Tabs",n.ElTabs),e.component("TabPane",n.ElTabPane),e.component("Collapse",n.ElCollapse),e.component("CollapseItem",n.ElCollapseItem),e.component("Drawer",n.ElDrawer),[w,g,h,P,v,C,k,R,V,I,D,z,T,q,M,E,S,x,Y,F,N,B,O].forEach(o=>{e.registerComponent(o),e.addBaseComponentTypes(o.defaultSchema.type)}),e.setInitialized(!0)}function L(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=L;exports.setupElementPlus=j;
|
package/package.json
CHANGED
package/dist/index-BHmIF8aI.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),A=require("./axios-CYGTE3lR.cjs");function U(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 ee(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 he(t){const[a]=oe([V(t)],o=>{var n,s;const r={...o,id:`${o.type}_${U(8)}`};return(r.field||r.input)&&!((s=(n=A.pluginManager.getComponentConfingByType(r.type))==null?void 0:n.editConstraints)!=null&&s.fixedField)&&(r.field=r.id),r});return a}function B(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]=[]),B(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 G(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 i=Object.keys(s).sort(),c={};return i.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 te(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 i=0;i<s.children.length&&(n(s.children[i]),!r);i++);if(!r&&s.slots)for(let i in s.slots)for(let c=0;c<s.slots[i].length&&(n(s.slots[i][c]),!r);c++);r||o.pop()}return t.forEach(n),r||console.error(`没有查询到id为${a}的节点`),o}function ve(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 ye(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 i=r[s];n[i]==null&&(n[i]=isNaN(Number(r[s+1]))?{}:[]),n=n[i]}return n[r[r.length-1]]=o,t}function ge(t,a="default"){return ne(t,a).map(r=>r.field)}function ne(t,a="default"){const o=R(t,n=>{var s;return n.type==="form"&&(((s=n.componentProps)==null?void 0:s.name)??n.name===a)},!0);return R((o==null?void 0:o.children)??[],n=>!!n.input,!1,n=>n.type!=="subform")}function R(t,a,o=!1,r){const n=[],s=[...t];for(;s.length;){const i=s.pop();if(i!=null&&i.children&&(!r||r(i))&&s.push(...i.children),i!=null&&i.slots&&(!r||r(i)))for(let c in i.slots)s.push(...i.slots[c]);if(a(i)&&(n.push(i),o))return i}return o?!1:n}function oe(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]);B(n,a(n))}return t}function we(t,a){const o=R(t,r=>r.id===a,!0);if(!o)throw new Error(`没有查询到id为${a}的节点`);return o}function Se(t,a){const o=[{type:"",children:t}];let r=0,n=null;if(R(o,s=>{if(n=s.children??null,!n){if(s!=null&&s.slots)for(let i in s.slots){n=s.slots[i];for(let c=0;c<n.length;c++)if(n[c].id===a)return r=c,!0}return!1}for(let i=0;i<n.length;i++)if(n[i].id===a)return r=i,!0;return!1},!0),!n)throw new Error(`没有查询到id为${a}的节点`);return{list:n,schema:n[r],index:r}}function be(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_"+U()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return a.schemas[0].children[0].children=O(t.list),a}function O(t,a){return t.map(o=>{var u,S,v;let r=o.type??"";const n=o.options??{},s=(l,g)=>{r===l&&(r=g,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:l,maxRows:g}=n;n.autoSize={minRows:l,maxRows:g},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=U());const i={label:o.label,type:r,icon:o.icon||"",field:o.model,componentProps:n,id:o.key};return(n.noFormItem||!n.showLabel)&&(i.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)&&(i.input=!0,((S=(u=o.rules)==null?void 0:u[0])==null?void 0:S.required)===!1&&o.rules.shift(),((v=o.rules)==null?void 0:v.length)>0&&(i.rules=o.rules)),o.list&&(i.children=O(o.list,o)),o.columns&&(i.children=O(o.columns,o)),o.trs&&(i.children=O(o.trs,o)),o.tds&&(i.children=O(o.tds,o)),i})}function Ce(t,a){let o=null;return(...r)=>{o&&clearTimeout(o),o=setTimeout(()=>{t(...r)},a)}}function Y(){const t=e.ref({}),a=e.ref({}),o=e.ref(!1),r=e.ref([]),n=e.reactive({});function s(m){return t.value[m]}function i(m,w){t.value[m]=w}function c(m){delete t.value[m]}function u(m,w=!1){const y=Object.entries(A.pluginManager.publicMethods).reduce((E,[_,M])=>(E[_]=M.handler,E),{});try{new Function(`const epic = this;${m}`).bind({...y,getComponent:s,find:s,defineExpose:S,publicMethods:y,pluginManager:A.pluginManager})()}catch(E){w&&console.error("[epic:自定义函数]异常:",E)}}function S(m){m!=null&&(a.value=m)}function v(m,...w){if(!m||m.length===0){console.warn("未提供任何动作");return}m.forEach(y=>{const E=y.args?JSON.parse(y.args):w;switch(y.type){case"public":l(y,E);break;case"custom":g(y,E);break;case"component":f(y,E);break;default:console.warn(`未知的动作类型: ${y.type}`);break}})}function l(m,w){var y;try{(y=A.pluginManager.publicMethods[m.methodName])==null||y.handler(...w)}catch(E){console.error(`[Epic:公共函数(${m.methodName})]执行异常:`,E)}}function g(m,w){var y,E;try{(E=(y=a.value)[m.methodName])==null||E.call(y,...w)}catch(_){console.error(`[Epic:自定义函数(${m.methodName})]执行异常:`,_)}}function f(m,w){const y=m.componentId!=null&&s(m.componentId);if(!y){console.warn(`[Epic:组件${m.componentId}]未找到`);return}try{y[m.methodName](...w)}catch(E){console.error(`[Epic:组件${m.componentId}函数(${m.methodName})]执行异常:`,E)}}function p(m=!0){o.value=m}function d(m){const w=R(m,()=>!0);r.value=w.map(y=>y.id)}function C(m,w="default"){if(n[w]){const y=n[w];B(m,y)}n[w]=m}function I(m,w="default"){if(n[w]){B(n[w],m,!1);return}n[w]=m}return{componentInstances:t,funcs:a,isDesignMode:o,defaultComponentIds:r,forms:n,addFormData:C,setFormData:I,getComponentInstance:s,find:s,addComponentInstance:i,removeComponentInstance:c,setMethods:u,doActions:v,setDesignMode:p,setDefaultComponentIds:d}}function re(){const t=e.ref([]),a=e.ref([]),o=e.ref(null);let r=0;function n(u,S="插入组件"){const v=Date.now();r+150>v||(r=v,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 i(){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:i,reset:c}}const ke=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:a}){const o=A.pluginManager.getComponent("form-item"),r=t,n=a,s=e.ref(),i=()=>{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:i},r.formItemProps),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(c.$slots,"default",{key:1})}}),ae=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{},sourceDateUrl:{}},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 i=e.inject("slots",{}),c=e.inject("pageManager",{}),u=e.inject("disabled",{value:!1}),S=e.inject("ruleFieldPrefix",null),v=e.inject("resetFormData",!1);let l=e.reactive(V(r.componentSchema));p();async function g(h){if(["cascader","checkbox","select","radio"].includes(h.type)&&h.componentProps.dynamicId){const k=(await A.axios({url:r.sourceDateUrl,method:"get",params:{id:h.componentProps.dynamicId}})).data;let x=await A.axios({url:k.url,method:k.method,data:JSON.parse(k.body),params:JSON.parse(k.params),headers:JSON.parse(k.headers)});if(k&&(k!=null&&k.dataPath)){const pe=k.dataPath.split(".").reduce((W,me)=>W[me],x.data);h.componentProps.options=f(pe).map(W=>({label:W[k.dataKey],value:W[k.dataValue]}))}else h.componentProps.options=f(x.data).map(q=>({label:q[k.dataKey],value:q[k.dataValue]}));return h}return h}function f(h){return h&&Object.prototype.toString.call(h)==="[object Array]"?h:[]}e.watch(()=>r.componentSchema,h=>{G(l,h,["children"])||(B(l,V(h)),p())},{deep:!0}),e.onMounted(()=>{l=V(r.componentSchema)});function p(){c.isDesignMode.value&&typeof l.field=="string"&&(l.field+="-design-mode")}(r.resetFormData||v)&&(s={});const d=a,C=e.ref(),I=e.ref(),m=h=>{I.value=h},w=e.useAttrs();Object.keys(w).length&&e.provide("nodeAttrs",w);const y=e.shallowRef(null),E=e.computed(()=>{var h,D;return(h=l.componentProps)!=null&&h.hidden?!1:typeof l.show=="boolean"?l.show:((D=l.show)==null?void 0:D.call(l,{values:s}))??!0}),_=e.computed(()=>{var k;const h=E.value&&((k=l.rules)==null?void 0:k.map(x=>({...x,validator:x.validator&&c.funcs.value[x.validator]})));let D=l.field;r.ruleField?D=r.ruleField:S&&l.field&&(D=V(S),D.push(l.field));const P={...l,rules:h,rule:h,field:D};return P.children&&delete P.children,P}),M=e.computed(()=>{var P,k;const h=((P=N.value)==null?void 0:P.bindModel)??"modelValue",D={};return l.on&&Object.keys(l.on).forEach(x=>{D[`on${ee(x)}`]=(...q)=>c.doActions(l.on[x],...q)}),{...r,...l.componentProps,disabled:(u==null?void 0:u.value)||((k=l.componentProps)==null?void 0:k.disabled),bindModel:h,...D}}),N=e.computed(()=>A.pluginManager.getComponentConfingByType(l.type)??null);e.watchEffect(()=>{n.value=r.modelValue??s[l.field??""]}),e.watch(()=>n.value,()=>{n.value!==(r.modelValue??s[l.field??""])&&b(n.value)}),e.watch(()=>C.value,()=>{z()},{immediate:!0});function z(){var D;const h=C.value||o;l.id&&h&&(l.input&&(h.setValue=b,h.getValue=()=>s[l.field]||r.modelValue),h.setAttr=(P,k)=>(l.componentProps||(l.componentProps={}),l.componentProps[P]=k),h.getAttr=P=>l.componentProps[P],c.addComponentInstance(l.id,h),(D=N.value)!=null&&D.defaultSchema.input&&l.noFormItem!==!0&&I.value&&c.addComponentInstance(l.id+"formItem",I.value))}function K(){var h;l.id&&(c.removeComponentInstance(l.id),(h=N.value)!=null&&h.defaultSchema.input&&l.noFormItem!==!0&&c.removeComponentInstance(l.id+"formItem"))}async function J(){var D,P,k;if(l=await g(l),typeof((D=l.componentProps)==null?void 0:D.defaultValue)<"u"){const x=c.isDesignMode.value?(P=l.componentProps)==null?void 0:P.defaultValue:s[l.field]??((k=l.componentProps)==null?void 0:k.defaultValue);b(V(x))}if(l.type==="slot"){const x=l.slotName;if(!x)return;y.value=e.defineComponent({setup(){return()=>e.renderSlot(i,x,{componentSchema:l,model:s})}});return}const h=A.pluginManager.getComponent(l.type);if(!h){console.error(`组件${l.type}未注册`);return}if(typeof h=="function"){const x=await h();y.value=x.default??x}else y.value=h}function b(h){d("update:modelValue",h),d("change",h),l.field&&(s[l.field]=h)}function T(h){d("update:dynamicId",h)}let j=null;return e.watch(()=>l,async h=>{const D=JSON.stringify({...h,children:void 0});if(D===j)return!1;j=D,J()},{immediate:!0,deep:!0}),e.onUnmounted(K),(h,D)=>{var k;const P=e.resolveComponent("ENode");return y.value&&E.value?(e.openBlock(),e.createBlock(ke,{key:0,hasFormItem:e.unref(l).noFormItem!==!0&&((k=N.value)==null?void 0:k.defaultSchema.input),formItemProps:_.value,onUpdateFormItemRef:m},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y.value),e.mergeProps({ref_key:"componentInstance",ref:C,onVnodeMounted:z,model:e.unref(s)},{...M.value},{[M.value.bindModel]:n.value,["onUpdate:"+M.value.bindModel]:D[0]||(D[0]=x=>n.value=x),[`onUpdate:${M.value.bindModel}`||""]:b,"onUpdate:dynamicId":T}),{node:e.withCtx(x=>[e.createVNode(P,e.normalizeProps(e.guardReactiveProps(x)),null,16)]),"edit-node":e.withCtx(()=>[e.renderSlot(h.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function Ee(){const t=e.ref(!1),a=Y(),o=e.ref({});function r(){return new Promise(f=>{if(t.value)f();else{const p=e.watch(t,()=>{p(),f()})}})}async function n(f="default"){var d;await r();const p=(d=o.value)==null?void 0:d[f];if(!p)throw new Error(`表单 [name=${f}] 不存在`);return p}async function s(f,p){const d=await n(f);return V(await p(d))}async function i(f="default"){return await s(f,p=>p.getData())}function c(f,p="default"){var C;a.setFormData(f,p);const d=(C=o.value)==null?void 0:C[p];d==null||d.clearValidate()}async function u(f="default"){return await s(f,async p=>(await p.validate(),await p.getData()))}async function S(f){await r();const p={};for(const d in o.value){const C=o.value[d];C&&(p[d]=V(await f(C)))}return p}async function v(){return await S(f=>f.getData())}function l(f){for(const p in f)c(f[p],p)}async function g(){return await S(async f=>(await f.validate(),await f.getData()))}return{ready:t,pageManager:a,forms:o,getData:i,setData:c,validate:u,getForms:v,setForms:l,validateAll:g,getFormInstance:n}}const Ae={key:0,class:"epic-loading-box"},De={class:"epic-builder-main"},xe={class:"epic-loading-box"},se=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean},sourceDateUrl:{}},emits:["ready"],setup(t,{expose:a,emit:o}){const r=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),n=o,{ready:s,pageManager:i,forms:c,getData:u,setData:S,validate:v,getForms:l,setForms:g,validateAll:f,getFormInstance:p}=Ee(),d=t,C=e.reactive({schemas:[]});e.watch(()=>d.pageSchema,y=>{B(C,y)},{immediate:!0,deep:!0}),e.watch(()=>d.formData,y=>{y&&S(y)},{immediate:!0,deep:!0}),e.watch(()=>C.script,y=>{y&&i.setMethods(y,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",i),e.provide("forms",c),e.provide("pageSchema",C),e.provide("disabled",e.computed(()=>d.disabled));const I=e.getCurrentInstance(),m=I==null?void 0:I.proxy;function w(){e.nextTick(()=>{s.value=!0,n("ready",i),m&&i.addComponentInstance("builder",m)})}return a({ready:s,pageManager:i,getData:u,setData:S,validate:v,getForms:l,setForms:g,validateAll:f,getFormInstance:p}),(y,E)=>e.unref(A.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:w},{default:e.withCtx(()=>[e.createElementVNode("div",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.schemas,(_,M)=>(e.openBlock(),e.createBlock(e.unref(ae),{key:M,sourceDateUrl:y.sourceDateUrl,componentSchema:_},null,8,["sourceDateUrl","componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",xe,[e.createVNode(e.unref(r))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Ae))}});function X(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function Ie(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))),X(n),o)}function $(t){return typeof t=="function"?t():e.unref(t)}const Pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _e=t=>typeof t<"u",Ve=Object.prototype.toString,Me=t=>Ve.call(t)==="[object Object]",Be=()=>{};function Ne(t){return e.getCurrentInstance()}function Fe(t,a=!0,o){Ne()?e.onMounted(t,o):a?t():e.nextTick(t)}function Oe(t=!1,a={}){const{truthyValue:o=!0,falsyValue:r=!1}=a,n=e.isRef(t),s=e.ref(t);function i(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?i:[s,i]}function Re(t,a,o){const r=e.watch(t,(...n)=>(e.nextTick(()=>r()),a(...n)),o);return r}const H=Pe?window:void 0;function F(t){var a;const o=$(t);return(a=o==null?void 0:o.$el)!=null?a:o}function $e(...t){let a,o,r,n;if(typeof t[0]=="string"||Array.isArray(t[0])?([o,r,n]=t,a=H):[a,o,r,n]=t,!a)return Be;Array.isArray(o)||(o=[o]),Array.isArray(r)||(r=[r]);const s=[],i=()=>{s.forEach(v=>v()),s.length=0},c=(v,l,g,f)=>(v.addEventListener(l,g,f),()=>v.removeEventListener(l,g,f)),u=e.watch(()=>[F(a),$(n)],([v,l])=>{if(i(),!v)return;const g=Me(l)?{...l}:l;s.push(...o.flatMap(f=>r.map(p=>c(v,f,p,g))))},{immediate:!0,flush:"post"}),S=()=>{u(),i()};return X(S),S}function Te(t){return typeof t=="function"?t:typeof t=="string"?a=>a.key===t:Array.isArray(t)?a=>t.includes(a.key):()=>!0}function le(...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=H,eventName:s="keydown",passive:i=!1,dedupe:c=!1}=r,u=Te(a);return $e(n,s,v=>{v.repeat&&$(c)||u(v)&&o(v)},i)}function Z(t,a,o={}){return le(t,a,{...o,eventName:"keydown"})}function Q(t,a,o={}){return le(t,a,{...o,eventName:"keyup"})}function qe(){const t=e.ref(!1),a=e.getCurrentInstance();return a&&e.onMounted(()=>{t.value=!0},a),t}function Ue(t){const a=qe();return e.computed(()=>(a.value,!!t()))}function Le(t){return JSON.parse(JSON.stringify(t))}function ie(t,a,o={}){const{window:r=H,...n}=o;let s;const i=Ue(()=>r&&"ResizeObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},u=e.computed(()=>{const l=$(t);return Array.isArray(l)?l.map(g=>F(g)):[F(l)]}),S=e.watch(u,l=>{if(c(),i.value&&r){s=new ResizeObserver(a);for(const g of l)g&&s.observe(g,n)}},{immediate:!0,flush:"post"}),v=()=>{c(),S()};return X(v),{isSupported:i,stop:v}}function ze(t,a={width:0,height:0},o={}){const{window:r=H,box:n="content-box"}=o,s=e.computed(()=>{var l,g;return(g=(l=F(t))==null?void 0:l.namespaceURI)==null?void 0:g.includes("svg")}),i=e.ref(a.width),c=e.ref(a.height),{stop:u}=ie(t,([l])=>{const g=n==="border-box"?l.borderBoxSize:n==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(r&&s.value){const f=F(t);if(f){const p=f.getBoundingClientRect();i.value=p.width,c.value=p.height}}else if(g){const f=Array.isArray(g)?g:[g];i.value=f.reduce((p,{inlineSize:d})=>p+d,0),c.value=f.reduce((p,{blockSize:d})=>p+d,0)}else i.value=l.contentRect.width,c.value=l.contentRect.height},o);Fe(()=>{const l=F(t);l&&(i.value="offsetWidth"in l?l.offsetWidth:a.width,c.value="offsetHeight"in l?l.offsetHeight:a.height)});const S=e.watch(()=>F(t),l=>{i.value=l?a.width:0,c.value=l?a.height:0});function v(){u(),S()}return{width:i,height:c,stop:v}}function Je(t,a,o,r={}){var n,s,i;const{clone:c=!1,passive:u=!1,eventName:S,deep:v=!1,defaultValue:l,shouldEmit:g}=r,f=e.getCurrentInstance(),p=o||(f==null?void 0:f.emit)||((n=f==null?void 0:f.$emit)==null?void 0:n.bind(f))||((i=(s=f==null?void 0:f.proxy)==null?void 0:s.$emit)==null?void 0:i.bind(f==null?void 0:f.proxy));let d=S;a||(a="modelValue"),d=d||`update:${a.toString()}`;const C=w=>c?typeof c=="function"?c(w):Le(w):w,I=()=>_e(t[a])?C(t[a]):l,m=w=>{g?g(w)&&p(d,w):p(d,w)};if(u){const w=I(),y=e.ref(w);let E=!1;return e.watch(()=>t[a],_=>{E||(E=!0,y.value=C(_),e.nextTick(()=>E=!1))}),e.watch(y,_=>{!E&&(_!==t[a]||v)&&m(_)},{deep:v}),y}else return e.computed({get(){return I()},set(w){m(w)}})}function We(){const{isDark:t}=L(),a=Oe(t);return{isDark:t,toggleDark:a}}function ce(){const t=e.ref(!1);return e.onMounted(()=>{ue(t),He(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function ue(t){var a=document.documentElement;a&&(a.classList.contains("dark")?t.value=!0:t.value=!1)}function He(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 de(){const t=e.ref(1),a=e.ref(!1),{isDark:o}=ce(),{pressSpace:r,pressShift:n,pressCtrl:s}=fe();return{canvasScale:t,pressSpace:r,pressShift:n,pressCtrl:s,disabledZoom:a,isDark:o}}const L=Ie(de);function fe(){const t=e.ref(!1),a=e.ref(!1),o=e.ref(!1);return Z(" ",()=>{t.value=!0}),Q(" ",()=>{t.value=!1}),Z("Shift",r=>{r.preventDefault(),a.value=!0}),Q("Shift",()=>{a.value=!1}),Z("Control",r=>{r.preventDefault(),o.value=!0}),Q("Control",()=>{o.value=!1}),{pressSpace:t,pressShift:a,pressCtrl:o}}function Ke(t){const{pressSpace:a}=L(),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 i(u){if(u.preventDefault(),!u.x||!u.y||!a.value)return;const S=u.x-r,v=u.y-n;r=u.x,n=u.y,t.value&&(t.value.scrollTop-=v,t.value.scrollLeft-=S)}function c(){a.value=!1}return{handleElementDragStart:s,handleElementDrag:i,handleElementDragEnd:c}}function Ze(t){const{pressCtrl:a,canvasScale:o,disabledZoom:r}=L();function n(s){if(!a.value||r.value)return;s.preventDefault();let i=0;s.deltaY<0?i=o.value+.05:i=o.value-.05,!(i>150||i<.5)&&(o.value=i)}return e.watch(()=>o.value,s=>{t.value&&!r.value&&(t.value.style.transform=`scale(${s})`)}),{handleZoom:n,canvasScale:o}}function Qe(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 Ge={class:"min-w-750px rounded"},Ye={class:"h-full rounded"},Xe=e.defineComponent({__name:"index",setup(t,{expose:a}){const o=A.pluginManager.getComponent("monacoEditor"),r=A.pluginManager.getComponent("modal"),n=e.ref(null),s=e.ref(!1),i=e.ref(!1),c=e.ref({}),u=e.inject("pageSchema"),S=e.ref(null),v=e.ref("");function l(){i.value=!1}function g(){s.value=!1}function f(){s.value=!0,v.value=U()}async function p(){try{let d=await S.value.validateAll();if(!Object.keys(d).length){alert("请添加表单组件后再尝试!");return}Object.keys(d).length===1&&(d=d.default),c.value=JSON.stringify(d,null,2),e.nextTick(()=>{var C;(C=n.value)==null||C.setValue(c.value)}),i.value=!0}catch(d){console.error(d)}}return a({handleOpen:f}),(d,C)=>(e.openBlock(),e.createBlock(e.unref(r),{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=I=>s.value=I),title:"预览",class:"w-900px",width:"900px",onClose:g,onOk:p,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ge,[(e.openBlock(),e.createBlock(e.unref(se),{key:v.value,ref_key:"kb",ref:S,"page-schema":e.unref(u)},null,8,["page-schema"])),e.createVNode(e.unref(r),{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=I=>i.value=I),title:"表单数据",class:"w-860px",width:"860px",onClose:l,onOk:l},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[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"]))}}),je={key:0,class:"epic-loading-box"},et={class:"epic-designer-main"},tt={class:"epic-header-container"},nt={class:"epic-loading-box"},ot=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=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-1afOcXnV.cjs"))),n=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BJlPL6eL.cjs"))),s=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-YHlIFgpT.cjs"))),i=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C6ceZM1C.cjs"))),c=A.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),u=Y(),S=re(),v=t;let l={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(v.defaultSchema){l=v.defaultSchema;return}v.source&&A.pluginManager.setSourceData(v.source),v.formMode&&(l.schemas=A.pluginManager.formSchemas)}),u.setDesignMode(),u.setDefaultComponentIds(l.schemas);const g=o,f=e.ref(null),p=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),d=e.reactive({schemas:[],script:l.script}),{disabledZoom:C}=L();e.watchEffect(()=>{C.value=v.disabledZoom}),e.watchEffect(()=>{const b=d.script;b&&b!==""&&u.setMethods(b)}),e.provide("pageSchema",d),e.provide("revoke",S),e.provide("pageManager",u),e.provide("designerProps",e.computed(()=>v)),e.provide("designer",{setCheckedNode:m,setHoverNode:w,setDisableHover:E,handleToggleDeviceMode:K,reset:N,state:p}),A.EventBus.on("saveSourceData",b=>{g("saveSourceData",b)}),A.EventBus.on("deleteSourceData",b=>{g("deleteSourceData",b)}),A.EventBus.on("updateSourceData",b=>{g("updateSourceData",b)});function I(){d.schemas=V(l.schemas),m(d.schemas[0]),S.push(d.schemas,"初始化撤销功能")}async function m(b=d.schemas[0]){p.checkedNode=b,p.matched=te(d.schemas,b.id)}async function w(b=null){var T;if(!b||p.disableHover)return p.hoverNode=null,!1;if((b==null?void 0:b.id)===((T=p.hoverNode)==null?void 0:T.id))return!1;p.hoverNode=b}function y(){e.nextTick(()=>{g("ready",{pageManager:u})})}async function E(b=!1){p.disableHover=b}function _(b){B(d,V(b))}function M(){return e.toRaw(d)}function N(){G(d.schemas,l.schemas)&&d.script===l.script||(B(d.schemas,l.schemas),d.script=l.script,m(d.schemas[0]),S.push(d.schemas,"重置操作"),g("reset",d))}function z(){g("save",e.toRaw(d))}function K(b){g("toggleDeviceMode",b)}function J(){f.value.handleOpen()}return I(),a({revoke:S,setData:_,getData:M,reset:N,preview:J}),(b,T)=>e.unref(A.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:y},{default:e.withCtx(()=>[e.createElementVNode("div",et,[e.createElementVNode("div",tt,[e.renderSlot(b.$slots,"header",{},()=>[v.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r),{key:0,onPreview:J,onSave:z},{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(i))],2),e.createVNode(Xe,{ref_key:"previewRef",ref:f},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",nt,[e.createVNode(e.unref(c))])]),_:3})):(e.openBlock(),e.createElementBlock("div",je))}}),rt={component:async()=>await Promise.resolve().then(()=>require("./index-CdgT4gQu.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"},at={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 st(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-DpzLP1Zp.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-CNzcV-bQ.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-D8YBJFH6.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-By5rfqCj.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-CkRhCvJK.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-lH0_mCG-.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-B03W7FZR.cjs"))),t.registerActivitybar({id:"component_view",title:"组件",icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-CGHtM1lr.cjs"))}),t.registerActivitybar({id:"sound_code_view",title:"源码",icon:"icon--epic--sdk-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./index-BXNPTGKl.cjs"))}),t.registerActivitybar({id:"outline_view",title:"大纲",icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-CJSEUbgc.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:"属性",component:async()=>await Promise.resolve().then(()=>require("./attributeView-lpFl3t4a.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-auUK19Dr.cjs"))}),t.registerRightSidebar({id:"event_view",title:"事件",component:async()=>await Promise.resolve().then(()=>require("./eventView-DgqXxWY1.cjs"))}),[rt,at].forEach(o=>{t.registerComponent(o)})}st(A.pluginManager);exports._sfc_main=ae;exports._sfc_main$1=se;exports._sfc_main$2=ot;exports.capitalizeFirstLetter=ee;exports.convertKFormData=be;exports.debounce=Ce;exports.deepClone=V;exports.deepCompareAndModify=B;exports.deepEqual=G;exports.findSchemaById=we;exports.findSchemaInfoById=Se;exports.findSchemas=R;exports.generateNewSchema=he;exports.getDarkState=ue;exports.getFormFields=ge;exports.getFormSchemas=ne;exports.getMatchedById=te;exports.getUUID=U;exports.getValueByPath=ve;exports.initStore=de;exports.mapSchemas=oe;exports.recursionConvertedNode=O;exports.setValueByPath=ye;exports.useDark=ce;exports.useElementDrag=Ke;exports.useElementSize=ze;exports.useElementZoom=Ze;exports.useKeyPress=fe;exports.usePageManager=Y;exports.useResizeObserver=ie;exports.useRevoke=re;exports.useStore=L;exports.useTheme=We;exports.useTimedQuery=Qe;exports.useVModel=Je;exports.watchOnce=Re;
|
package/dist/index-CL_7RzF7.js
DELETED
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { defineComponent as B, inject as M, resolveComponent as j, openBlock as p, createBlock as N, unref as n, isRef as O, withCtx as z, createElementVNode as m, normalizeClass as A, createVNode as d, createCommentVNode as $, createElementBlock as g, ref as J, reactive as w, onMounted as K, watch as L, provide as P, Fragment as R, renderList as T, toDisplayString as F, withDirectives as q, vShow as G, createTextVNode as H } from "vue";
|
|
2
|
-
import { d as Q } from "./vuedraggable.umd-D2S7Eo7p.js";
|
|
3
|
-
import { p as b, E as W, a as X } from "./axios-ITY6Uw7A.js";
|
|
4
|
-
import { _ as E } from "./icon.vue_vue_type_script_setup_true_lang-D3QdcReY.js";
|
|
5
|
-
import { n as I } from "./index-Ol-YPkY9.js";
|
|
6
|
-
import { ElMessage as Y } from "element-plus";
|
|
7
|
-
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const ee = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "pl-4"
|
|
11
|
-
}, le = /* @__PURE__ */ B({
|
|
12
|
-
name: "EOptionItem",
|
|
13
|
-
__name: "optionItem",
|
|
14
|
-
props: {
|
|
15
|
-
modelValue: {}
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:modelValue"],
|
|
18
|
-
setup(k, { emit: C }) {
|
|
19
|
-
const U = k, x = b.getComponent("input"), c = M("tree", !1), i = I(U, "modelValue", C);
|
|
20
|
-
function y(l) {
|
|
21
|
-
const s = {
|
|
22
|
-
label: "",
|
|
23
|
-
value: ""
|
|
24
|
-
};
|
|
25
|
-
l.children ? l.children.push(s) : l.children = [s];
|
|
26
|
-
}
|
|
27
|
-
function r(l) {
|
|
28
|
-
i.value = i.value.filter((s, f) => f !== l);
|
|
29
|
-
}
|
|
30
|
-
return (l, s) => {
|
|
31
|
-
const f = j("EOptionItem");
|
|
32
|
-
return p(), N(n(Q), {
|
|
33
|
-
modelValue: n(i),
|
|
34
|
-
"onUpdate:modelValue": s[0] || (s[0] = (a) => O(i) ? i.value = a : null),
|
|
35
|
-
"item-key": "id",
|
|
36
|
-
"component-data": {
|
|
37
|
-
type: "transition-group"
|
|
38
|
-
},
|
|
39
|
-
group: "option-list",
|
|
40
|
-
handle: ".handle",
|
|
41
|
-
animation: 200
|
|
42
|
-
}, {
|
|
43
|
-
item: z(({ element: a, index: h }) => [
|
|
44
|
-
m("div", null, [
|
|
45
|
-
m("div", {
|
|
46
|
-
class: A([n(c) ? "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"])
|
|
47
|
-
}, [
|
|
48
|
-
d(n(E), {
|
|
49
|
-
class: "mr-2 cursor-move handle",
|
|
50
|
-
name: "icon--epic--drag"
|
|
51
|
-
}),
|
|
52
|
-
d(n(x), {
|
|
53
|
-
modelValue: a.label,
|
|
54
|
-
"onUpdate:modelValue": (u) => a.label = u,
|
|
55
|
-
value: a.label,
|
|
56
|
-
"onUpdate:value": (u) => a.label = u,
|
|
57
|
-
placeholder: "label"
|
|
58
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
59
|
-
d(n(x), {
|
|
60
|
-
modelValue: a.value,
|
|
61
|
-
"onUpdate:modelValue": (u) => a.value = u,
|
|
62
|
-
value: a.value,
|
|
63
|
-
"onUpdate:value": (u) => a.value = u,
|
|
64
|
-
placeholder: "value"
|
|
65
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "value", "onUpdate:value"]),
|
|
66
|
-
n(c) ? (p(), N(n(E), {
|
|
67
|
-
key: 0,
|
|
68
|
-
class: "cursor-pointer text-lg!",
|
|
69
|
-
name: "icon--epic--add-rounded",
|
|
70
|
-
onClick: (u) => y(a)
|
|
71
|
-
}, null, 8, ["onClick"])) : $("", !0),
|
|
72
|
-
d(n(E), {
|
|
73
|
-
class: "hover:text-red cursor-pointer",
|
|
74
|
-
name: "icon--epic--delete-outline-rounded",
|
|
75
|
-
onClick: (u) => r(h)
|
|
76
|
-
}, null, 8, ["onClick"])
|
|
77
|
-
], 2),
|
|
78
|
-
a.children ? (p(), g("div", ee, [
|
|
79
|
-
d(f, {
|
|
80
|
-
modelValue: a.children,
|
|
81
|
-
"onUpdate:modelValue": (u) => a.children = u
|
|
82
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
83
|
-
])) : $("", !0)
|
|
84
|
-
])
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
}, 8, ["modelValue"]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}), te = { class: "" }, ae = { class: "epic-tabs-box" }, oe = ["title", "onClick"], ne = { key: 0 }, ue = { class: "py-4 my-2 text-center text-gray-400 bg-white" }, re = { key: 1 }, ie = /* @__PURE__ */ B({
|
|
91
|
-
__name: "index",
|
|
92
|
-
props: {
|
|
93
|
-
tree: { type: Boolean },
|
|
94
|
-
modelValue: {},
|
|
95
|
-
dynamicId: {},
|
|
96
|
-
type: {}
|
|
97
|
-
},
|
|
98
|
-
emits: ["update:modelValue", "update:EOptionsEditor"],
|
|
99
|
-
setup(k, { emit: C }) {
|
|
100
|
-
const U = b.getComponent("button"), x = b.getComponent("select"), c = J([]), v = w({
|
|
101
|
-
title: "静态"
|
|
102
|
-
}), i = k, y = C;
|
|
103
|
-
W.on("updateSource", (t) => {
|
|
104
|
-
c.value = b.sourceData.map((e) => ({
|
|
105
|
-
...e,
|
|
106
|
-
label: e.apiName,
|
|
107
|
-
value: e.id
|
|
108
|
-
})), console.log("%c [ ]-79", "font-size:13px; background:pink; color:#bf2c9f;", l.value), h(l.value);
|
|
109
|
-
}), K(() => {
|
|
110
|
-
c.value = b.sourceData.map((t) => ({
|
|
111
|
-
...t,
|
|
112
|
-
label: t.apiName,
|
|
113
|
-
value: t.id
|
|
114
|
-
})), console.log("%c [ ]-89", "font-size:13px; background:pink; color:#bf2c9f;", l.value), h(l.value);
|
|
115
|
-
});
|
|
116
|
-
const r = I(i, "modelValue", y), l = I(i, "dynamicId", y);
|
|
117
|
-
function s(t) {
|
|
118
|
-
return t && Object.prototype.toString.call(t) === "[object Array]" ? t : (Y.info("请检查数据位置是否配置准确"), []);
|
|
119
|
-
}
|
|
120
|
-
L(
|
|
121
|
-
() => l.value,
|
|
122
|
-
async () => {
|
|
123
|
-
l.value ? v.title = "动态" : v.title = "静态";
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
immediate: !0
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
const f = [
|
|
130
|
-
{
|
|
131
|
-
title: "静态"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
title: "动态"
|
|
135
|
-
}
|
|
136
|
-
];
|
|
137
|
-
async function a(t) {
|
|
138
|
-
v.title = t.title, t.title === "静态" && (l.value = "");
|
|
139
|
-
}
|
|
140
|
-
async function h(t) {
|
|
141
|
-
const e = c.value.find((o) => o.id === t);
|
|
142
|
-
let V = await X({
|
|
143
|
-
method: (e == null ? void 0 : e.method) || "get",
|
|
144
|
-
url: e.url,
|
|
145
|
-
// url: "http://localhost:3333/users",
|
|
146
|
-
params: e != null && e.params ? JSON.parse(e == null ? void 0 : e.params) : {},
|
|
147
|
-
data: e != null && e.data ? JSON.parse(e == null ? void 0 : e.data) : {},
|
|
148
|
-
headers: e != null && e.header ? JSON.parse(e == null ? void 0 : e.header) : {}
|
|
149
|
-
});
|
|
150
|
-
if (e && (e != null && e.dataPath)) {
|
|
151
|
-
const S = e.dataPath.split(".").reduce((_, D) => _[D], V.data);
|
|
152
|
-
r.value = s(S).map((_) => ({
|
|
153
|
-
label: _[e.dataKey],
|
|
154
|
-
value: _[e.dataValue]
|
|
155
|
-
}));
|
|
156
|
-
} else
|
|
157
|
-
r.value = s(V.data).map((o) => ({
|
|
158
|
-
label: o[e.dataKey],
|
|
159
|
-
value: o[e.dataValue]
|
|
160
|
-
}));
|
|
161
|
-
}
|
|
162
|
-
i.modelValue, P("tree", i.tree);
|
|
163
|
-
function u() {
|
|
164
|
-
const t = w({
|
|
165
|
-
label: "",
|
|
166
|
-
value: ""
|
|
167
|
-
});
|
|
168
|
-
r.value.length ? r.value = [...r.value, t] : r.value = [t];
|
|
169
|
-
}
|
|
170
|
-
return (t, e) => {
|
|
171
|
-
var V;
|
|
172
|
-
return p(), g("div", te, [
|
|
173
|
-
m("div", null, [
|
|
174
|
-
m("div", ae, [
|
|
175
|
-
(p(), g(R, null, T(f, (o, S) => m("div", {
|
|
176
|
-
class: A(["epic-tab cursor-pointer truncate", { checked: v.title === o.title }]),
|
|
177
|
-
key: S,
|
|
178
|
-
title: o.title,
|
|
179
|
-
onClick: (_) => a(o)
|
|
180
|
-
}, F(o.title), 11, oe)), 64))
|
|
181
|
-
]),
|
|
182
|
-
v.title === "静态" ? (p(), g("div", ne, [
|
|
183
|
-
q(m("div", ue, "暂无选项", 512), [
|
|
184
|
-
[G, !((V = n(r)) != null && V.length)]
|
|
185
|
-
]),
|
|
186
|
-
d(le, {
|
|
187
|
-
modelValue: n(r),
|
|
188
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) => O(r) ? r.value = o : null)
|
|
189
|
-
}, null, 8, ["modelValue"]),
|
|
190
|
-
d(n(U), { onClick: u }, {
|
|
191
|
-
default: z(() => e[2] || (e[2] = [
|
|
192
|
-
H("添加选项")
|
|
193
|
-
])),
|
|
194
|
-
_: 1
|
|
195
|
-
})
|
|
196
|
-
])) : (p(), g("div", re, [
|
|
197
|
-
e[3] || (e[3] = m("span", { style: { "font-size": "12px", "margin-bottom": "8px", display: "inline-block" } }, "数据源", -1)),
|
|
198
|
-
d(n(x), {
|
|
199
|
-
modelValue: n(l),
|
|
200
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) => O(l) ? l.value = o : null),
|
|
201
|
-
placeholder: "请选择数据源",
|
|
202
|
-
clearable: "",
|
|
203
|
-
options: c.value,
|
|
204
|
-
onChange: h
|
|
205
|
-
}, null, 8, ["modelValue", "options"])
|
|
206
|
-
]))
|
|
207
|
-
])
|
|
208
|
-
]);
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}), he = /* @__PURE__ */ Z(ie, [["__scopeId", "data-v-8768ae69"]]);
|
|
212
|
-
export {
|
|
213
|
-
he as default
|
|
214
|
-
};
|
package/dist/index-CkRhCvJK.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("./axios-CYGTE3lR.cjs"),y=require("./icon.vue_vue_type_script_setup_true_lang-DJbUD5AQ.cjs"),C=require("./index-BHmIF8aI.cjs"),B=require("element-plus"),S=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),U={key:0,class:"pl-4"},M=e.defineComponent({name:"EOptionItem",__name:"optionItem",props:{modelValue:{}},emits:["update:modelValue"],setup(h,{emit:k}){const b=h,_=p.pluginManager.getComponent("input"),d=e.inject("tree",!1),s=k,c=C.useVModel(b,"modelValue",s);function g(l){const i={label:"",value:""};l.children?l.children.push(i):l.children=[i]}function u(l){c.value=c.value.filter((i,m)=>m!==l)}return(l,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(_),{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(_),{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=>g(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",U,[e.createVNode(m,{modelValue:a.children,"onUpdate:modelValue":r=>a.children=r},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"])}}}),O={class:""},I={class:"epic-tabs-box"},q=["title","onClick"],w={key:0},$={class:"py-4 my-2 text-center text-gray-400 bg-white"},z={key:1},j=e.defineComponent({__name:"index",props:{tree:{type:Boolean},modelValue:{},dynamicId:{},type:{}},emits:["update:modelValue","update:EOptionsEditor"],setup(h,{emit:k}){const b=p.pluginManager.getComponent("button"),_=p.pluginManager.getComponent("select"),d=e.ref([]),s=e.reactive({title:"静态"}),c=h,g=k;p.EventBus.on("updateSource",n=>{d.value=p.pluginManager.sourceData.map(t=>({...t,label:t.apiName,value:t.id})),console.log("%c [ ]-79","font-size:13px; background:pink; color:#bf2c9f;",l.value),v(l.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;",l.value),v(l.value)});const u=C.useVModel(c,"modelValue",g),l=C.useVModel(c,"dynamicId",g);function i(n){return n&&Object.prototype.toString.call(n)==="[object Array]"?n:(B.ElMessage.info("请检查数据位置是否配置准确"),[])}e.watch(()=>l.value,async()=>{l.value?s.title="动态":s.title="静态"},{immediate:!0});const m=[{title:"静态"},{title:"动态"}];async function a(n){s.title=n.title,n.title==="静态"&&(l.value="")}async function v(n){const t=d.value.find(o=>o.id===n);let V=await p.axios({method:(t==null?void 0:t.method)||"get",url:t.url,params:t!=null&&t.params?JSON.parse(t==null?void 0:t.params):{},data:t!=null&&t.data?JSON.parse(t==null?void 0:t.data):{},headers:t!=null&&t.header?JSON.parse(t==null?void 0:t.header):{}});if(t&&(t!=null&&t.dataPath)){const x=t.dataPath.split(".").reduce((f,N)=>f[N],V.data);u.value=i(x).map(f=>({label:f[t.dataKey],value:f[t.dataValue]}))}else u.value=i(V.data).map(o=>({label:o[t.dataKey],value:o[t.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,t)=>{var V;return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(m,(o,x)=>e.createElementVNode("div",{class:e.normalizeClass(["epic-tab cursor-pointer truncate",{checked:s.title===o.title}]),key:x,title:o.title,onClick:f=>a(o)},e.toDisplayString(o.title),11,q)),64))]),s.title==="静态"?(e.openBlock(),e.createElementBlock("div",w,[e.withDirectives(e.createElementVNode("div",$,"暂无选项",512),[[e.vShow,!((V=e.unref(u))!=null&&V.length)]]),e.createVNode(M,{modelValue:e.unref(u),"onUpdate:modelValue":t[0]||(t[0]=o=>e.isRef(u)?u.value=o:null)},null,8,["modelValue"]),e.createVNode(e.unref(b),{onClick:r},{default:e.withCtx(()=>t[2]||(t[2]=[e.createTextVNode("添加选项")])),_:1})])):(e.openBlock(),e.createElementBlock("div",z,[t[3]||(t[3]=e.createElementVNode("span",{style:{"font-size":"12px","margin-bottom":"8px",display:"inline-block"}},"数据源",-1)),e.createVNode(e.unref(_),{modelValue:e.unref(l),"onUpdate:modelValue":t[1]||(t[1]=o=>e.isRef(l)?l.value=o:null),placeholder:"请选择数据源",clearable:"",options:d.value,onChange:v},null,8,["modelValue","options"])]))])])}}}),A=S._export_sfc(j,[["__scopeId","data-v-8768ae69"]]);exports.default=A;
|
package/dist/index-qJNRPNIj.js
DELETED
package/dist/select-B479QwwL.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");;/* empty css */const o=require("element-plus"),c=l.defineComponent({emits:["update:modelValue"],setup(d,{emit:a,attrs:t}){function r(e=null){a("update:modelValue",e)}return()=>{const e={...t,key:String(t.multiple),"onUpdate:modelValue":r};return console.log("%c [ ]-20","font-size:13px; background:pink; color:#bf2c9f;",e),l.h(o.ElSelect,e,{default:()=>{var u;return[(u=e==null?void 0:e.options)==null?void 0:u.map(n=>l.h(o.ElOption,{label:n.label,value:n.value}))]}})}}});exports.default=c;
|
package/dist/select-CtUVWh2M.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, h as n } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import { ElSelect as d, ElOption as m } from "element-plus";
|
|
4
|
-
const s = p({
|
|
5
|
-
emits: ["update:modelValue"],
|
|
6
|
-
setup(i, { emit: a, attrs: l }) {
|
|
7
|
-
function u(e = null) {
|
|
8
|
-
a("update:modelValue", e);
|
|
9
|
-
}
|
|
10
|
-
return () => {
|
|
11
|
-
const e = {
|
|
12
|
-
...l,
|
|
13
|
-
key: String(l.multiple),
|
|
14
|
-
"onUpdate:modelValue": u
|
|
15
|
-
};
|
|
16
|
-
return console.log("%c [ ]-20", "font-size:13px; background:pink; color:#bf2c9f;", e), n(d, e, {
|
|
17
|
-
default: () => {
|
|
18
|
-
var o;
|
|
19
|
-
return [
|
|
20
|
-
(o = e == null ? void 0 : e.options) == null ? void 0 : o.map((t) => n(m, { label: t.label, value: t.value }))
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
export {
|
|
28
|
-
s as default
|
|
29
|
-
};
|