epic-designer-gold 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{attributeView-CWoguTGM.cjs → attributeView-BjvAO4_R.cjs} +1 -1
  2. package/dist/{attributeView-CGtxobMF.js → attributeView-PbDEjn8T.js} +1 -1
  3. package/dist/form-2lbtG-zj.js +74 -0
  4. package/dist/form-BM53wx9g.cjs +1 -0
  5. package/dist/{index-DBRz4gi5.js → index-5datIIzJ.js} +1 -1
  6. package/dist/{index-DCoUYKRW.cjs → index-BUBtVoa0.cjs} +1 -1
  7. package/dist/{index-Bj6zKw82.js → index-BZQLip5V.js} +443 -440
  8. package/dist/{index-B7Uy532l.cjs → index-C2ioP4Qy.cjs} +1 -1
  9. package/dist/{index-BBNxCX9U.cjs → index-C3hWImRT.cjs} +1 -1
  10. package/dist/{index-DFP-9KaA.js → index-C95DVYrN.js} +1 -1
  11. package/dist/{index-wxDrmXkw.js → index-CE7JKdc3.js} +1 -1
  12. package/dist/index-Cpm-oLdy.js +4 -0
  13. package/dist/{index-F-tQsU_8.cjs → index-CzOycR7-.cjs} +1 -1
  14. package/dist/index-D3RJLUGU.cjs +10 -0
  15. package/dist/{index-Dan8DnTn.cjs → index-DHHX2mwy.cjs} +1 -1
  16. package/dist/{index-ChGNJr_v.cjs → index-DQjDcBV5.cjs} +1 -1
  17. package/dist/{index-DU0OYNvy.cjs → index-Da3mrdHZ.cjs} +1 -1
  18. package/dist/{index-CDzXkVHK.js → index-Da8OPaOM.js} +2 -2
  19. package/dist/{index-C7VY8nRX.js → index-DxkPriDk.js} +1 -1
  20. package/dist/{index-DWKirflC.js → index-l1DO3QH_.js} +1 -1
  21. package/dist/{index-9xlsE_Mf.cjs → index-l4brKgI9.cjs} +1 -1
  22. package/dist/{index-BALf0q8e.js → index-laQFS5Nd.js} +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/sign-BS8owiJT.cjs +1 -0
  26. package/dist/sign-DZvUIxel.js +155 -0
  27. package/dist/style.css +1 -1
  28. package/dist/{styleView-BHaWjsLQ.js → styleView-LX_E7EFf.js} +1 -1
  29. package/dist/{styleView-BgoSZRkZ.cjs → styleView-oaDQbGne.cjs} +1 -1
  30. package/dist/ui/elementPlus/index.cjs +1 -1
  31. package/dist/ui/elementPlus/index.js +8 -8
  32. package/dist/{uploadImage-CYV7X1sG.js → uploadImage-tLXX1j6A.js} +12 -12
  33. package/package.json +1 -1
  34. package/dist/form-6cUK-Ari.js +0 -72
  35. package/dist/form-CthzLIgs.cjs +0 -1
  36. package/dist/index-9eiypGfJ.cjs +0 -10
  37. package/dist/index-By5d6rRB.js +0 -4
  38. package/dist/sign-BCmA2v-3.cjs +0 -1
  39. package/dist/sign-CSv8hClp.js +0 -149
@@ -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-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://ess-ds.com/prod-api/center-file/file/upload",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://ess-ds.com/prod-api/center-file/file/upload",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-BCmA2v-3.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.readonly"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}]}};function L(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 W(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=W;exports.setupElementPlus=L;
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-BM53wx9g.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://ess-ds.com/prod-api/center-file/file/upload",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://ess-ds.com/prod-api/center-file/file/upload",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-BS8owiJT.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.readonly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}]}};function L(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 W(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=W;exports.setupElementPlus=L;
@@ -470,7 +470,7 @@ const h = {
470
470
  ]
471
471
  }
472
472
  }, w = {
473
- component: () => import("../../form-6cUK-Ari.js"),
473
+ component: () => import("../../form-2lbtG-zj.js"),
474
474
  groupName: "表单",
475
475
  icon: "icon--epic--list-alt-outline-rounded",
476
476
  sort: 600,
@@ -2486,7 +2486,7 @@ const z = {
2486
2486
  },
2487
2487
  bindModel: "modelValue"
2488
2488
  }, M = {
2489
- component: () => import("../../uploadImage-CYV7X1sG.js"),
2489
+ component: () => import("../../uploadImage-tLXX1j6A.js"),
2490
2490
  groupName: "表单",
2491
2491
  icon: "icon--epic--imagesmode-outline-rounded",
2492
2492
  sort: 920,
@@ -2588,7 +2588,7 @@ const z = {
2588
2588
  }
2589
2589
  }, O = {
2590
2590
  // component: async () => await import("../../../../packages/core/components/designer/src"),
2591
- component: async () => await import("../../sign-CSv8hClp.js"),
2591
+ component: async () => await import("../../sign-DZvUIxel.js"),
2592
2592
  icon: "icon--epic--insert-text-outline-rounded",
2593
2593
  groupName: "表单",
2594
2594
  sort: 705,
@@ -2637,11 +2637,11 @@ const z = {
2637
2637
  type: "switch",
2638
2638
  field: "componentProps.readonly"
2639
2639
  },
2640
- // {
2641
- // label: "禁用",
2642
- // type: "switch",
2643
- // field: "componentProps.disabled",
2644
- // },
2640
+ {
2641
+ label: "禁用",
2642
+ type: "switch",
2643
+ field: "componentProps.disabled"
2644
+ },
2645
2645
  {
2646
2646
  label: "隐藏",
2647
2647
  type: "switch",
@@ -55,18 +55,18 @@ const P = V({
55
55
  default: () => [
56
56
  a(w, h.value, {
57
57
  default: () => [
58
- a("div", { style: { "text-align": "center" } }, {
59
- default: () => [
60
- a("span", {
61
- class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-lg"
62
- }),
63
- a(
64
- "div",
65
- { class: "ant-upload-text" },
66
- { default: () => "点击上传" }
67
- )
68
- ]
69
- })
58
+ a(
59
+ "div",
60
+ { style: { "text-align": "center" } },
61
+ {
62
+ default: () => [
63
+ a("span", {
64
+ class: "icon--epic icon--epic--cloud-upload-outlined mr-2px text-lg"
65
+ }),
66
+ a("div", { class: "ant-upload-text" }, { default: () => "点击上传" })
67
+ ]
68
+ }
69
+ )
70
70
  ]
71
71
  }),
72
72
  (() => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "epic-designer-gold",
3
3
  "private": false,
4
- "version": "0.0.39",
4
+ "version": "0.0.40",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -1,72 +0,0 @@
1
- import { defineComponent as w, inject as i, ref as d, reactive as k, provide as j, onMounted as F, computed as f, openBlock as h, createElementBlock as v, createVNode as M, unref as W, mergeProps as $, withCtx as B, renderSlot as _, Fragment as E, renderList as L, createCommentVNode as N } from "vue";
2
- import { ElForm as O } from "element-plus";
3
- import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const q = {
5
- key: 0,
6
- class: "form-main",
7
- style: { height: "100%" }
8
- }, I = /* @__PURE__ */ w({
9
- __name: "form",
10
- props: {
11
- componentSchema: {
12
- type: Object,
13
- require: !0,
14
- default: () => ({})
15
- }
16
- },
17
- setup(b, { expose: g }) {
18
- var s, p;
19
- const n = b, y = i("pageManager", {}), t = d(null), l = i("forms", {}), S = d(!0), r = k({});
20
- y.addFormData(r, (p = (s = n.componentSchema) == null ? void 0 : s.componentProps) == null ? void 0 : p.name), j("formData", r);
21
- function c() {
22
- return r;
23
- }
24
- function m(e) {
25
- Object.assign(r, e);
26
- }
27
- function C() {
28
- var e;
29
- return (e = t.value) == null ? void 0 : e.validate();
30
- }
31
- F(async () => {
32
- var e, a, o, u;
33
- if (((e = n.componentSchema) == null ? void 0 : e.type) === "form" && l.value && t.value) {
34
- const P = ((o = (a = n.componentSchema) == null ? void 0 : a.componentProps) == null ? void 0 : o.name) ?? ((u = n.componentSchema) == null ? void 0 : u.name) ?? "default";
35
- return l.value[P] = t.value, t.value.getData = c, t.value.setData = m, !1;
36
- }
37
- });
38
- const D = f(() => {
39
- const e = n.componentSchema.componentProps;
40
- let a = e.labelCol, o = e.wrapperCol;
41
- return e.labelLayout === "fixed" && (a = {
42
- style: `width:${typeof e.labelWidth == "number" ? e.labelWidth + "px" : e.labelWidth}`
43
- }, o = { style: "width:auto;flex:1" }), {
44
- ...e,
45
- labelCol: a,
46
- wrapperCol: o
47
- };
48
- }), x = f(() => n.componentSchema.children ?? []);
49
- return g({
50
- form: t,
51
- getData: c,
52
- setData: m,
53
- validate: C
54
- }), (e, a) => S.value ? (h(), v("div", q, [
55
- M(W(O), $({
56
- ref_key: "form",
57
- ref: t,
58
- model: r
59
- }, D.value, { style: { height: "100%" } }), {
60
- default: B(() => [
61
- _(e.$slots, "edit-node", {}, () => [
62
- (h(!0), v(E, null, L(x.value, (o) => _(e.$slots, "node", { componentSchema: o }, void 0, !0)), 256))
63
- ], !0)
64
- ]),
65
- _: 3
66
- }, 16, ["model"])
67
- ])) : N("", !0);
68
- }
69
- }), H = /* @__PURE__ */ V(I, [["__scopeId", "data-v-64ba7c56"]]);
70
- export {
71
- H as default
72
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),S=require("element-plus"),P=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C={key:0,class:"form-main",style:{height:"100%"}},D=e.defineComponent({__name:"form",props:{componentSchema:{type:Object,require:!0,default:()=>({})}},setup(d,{expose:f}){var u,p;const r=d,h=e.inject("pageManager",{}),o=e.ref(null),c=e.inject("forms",{}),v=e.ref(!0),l=e.reactive({});h.addFormData(l,(p=(u=r.componentSchema)==null?void 0:u.componentProps)==null?void 0:p.name),e.provide("formData",l);function m(){return l}function s(t){Object.assign(l,t)}function g(){var t;return(t=o.value)==null?void 0:t.validate()}e.onMounted(async()=>{var t,a,n,i;if(((t=r.componentSchema)==null?void 0:t.type)==="form"&&c.value&&o.value){const y=((n=(a=r.componentSchema)==null?void 0:a.componentProps)==null?void 0:n.name)??((i=r.componentSchema)==null?void 0:i.name)??"default";return c.value[y]=o.value,o.value.getData=m,o.value.setData=s,!1}});const _=e.computed(()=>{const t=r.componentSchema.componentProps;let a=t.labelCol,n=t.wrapperCol;return t.labelLayout==="fixed"&&(a={style:`width:${typeof t.labelWidth=="number"?t.labelWidth+"px":t.labelWidth}`},n={style:"width:auto;flex:1"}),{...t,labelCol:a,wrapperCol:n}}),b=e.computed(()=>r.componentSchema.children??[]);return f({form:o,getData:m,setData:s,validate:g}),(t,a)=>v.value?(e.openBlock(),e.createElementBlock("div",C,[e.createVNode(e.unref(S.ElForm),e.mergeProps({ref_key:"form",ref:o,model:l},_.value,{style:{height:"100%"}}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"edit-node",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,n=>e.renderSlot(t.$slots,"node",{componentSchema:n},void 0,!0)),256))],!0)]),_:3},16,["model"])])):e.createCommentVNode("",!0)}}),k=P._export_sfc(D,[["__scopeId","data-v-64ba7c56"]]);exports.default=k;
@@ -1,10 +0,0 @@
1
- "use strict";const e=require("vue"),M=require("./axios-CYGTE3lR.cjs");function J(t=10){const s="abcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<t;n++){const o=Math.floor(Math.random()*s.length);r+=s[o]}return r}function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}function F(t,s=new WeakMap){if(typeof t!="object"||t===null)return t;if(s.has(t))return s.get(t);if(Array.isArray(t)){const n=t.map(o=>F(o,s));return s.set(t,n),n}const r={};return s.set(t,r),Object.keys(t).forEach(n=>{r[n]=F(t[n],s)}),r}function he(t){const[s]=ne([F(t)],r=>{var o,a;const n={...r,id:`${r.type}_${J(8)}`};return(n.field||n.input)&&!((a=(o=M.pluginManager.getComponentConfingByType(n.type))==null?void 0:o.editConstraints)!=null&&a.fixedField)&&(n.field=n.id),n});return s}function $(t,s,r=!0){for(const[n,o]of Object.entries(s)){let a=t==null?void 0:t[n];a&&o&&typeof a=="object"&&typeof o=="object"?(Array.isArray(a)&&!Array.isArray(o)?a=t[n]={}:!Array.isArray(a)&&Array.isArray(o)&&(a=t[n]=[]),$(a,o,r)):t[n]=o}r&&Object.keys(t).reverse().forEach(n=>{s.hasOwnProperty(n)||(Array.isArray(t)?t.splice(Number(n),1):delete t[n])})}function Q(t,s,r=[],n=new WeakMap){const o=a=>{if(Array.isArray(a))return a.map(o);if(typeof a=="object"&&a!==null){if(n.has(a))return"[Circular]";n.set(a,!0);const i=Object.keys(a).sort(),u={};return i.forEach(p=>{r.includes(p)||(u[p]=o(a[p]))}),n.delete(a),u}else return a};return JSON.stringify(o(t))===JSON.stringify(o(s))}function ee(t,s){const r=[];let n=!1;function o(a){if(r.push(a),a.id===s&&(n=!0),!n&&a.children!=null&&a.children.length>0)for(let i=0;i<a.children.length&&(o(a.children[i]),!n);i++);if(!n&&a.slots)for(let i in a.slots)for(let u=0;u<a.slots[i].length&&(o(a.slots[i][u]),!n);u++);n||r.pop()}return t.forEach(o),n||console.error(`没有查询到id为${s}的节点`),r}function ve(t,s,r){const n=s.split(".");let o=t;for(let a=0;a<n.length;a++){if(o==null)return r;o=o[n[a]]}return o===void 0?r:o}function ge(t,s,r){const n=s.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let o=t;for(let a=0;a<n.length-1;a++){const i=n[a];o[i]==null&&(o[i]=isNaN(Number(n[a+1]))?{}:[]),o=o[i]}return o[n[n.length-1]]=r,t}function ye(t,s="default"){return te(t,s).map(n=>n.field)}function te(t,s="default"){const r=L(t,o=>{var a;return o.type==="form"&&(((a=o.componentProps)==null?void 0:a.name)??o.name===s)},!0);return L((r==null?void 0:r.children)??[],o=>!!o.input,!1,o=>o.type!=="subform")}function L(t,s,r=!1,n){const o=[],a=[...t];for(;a.length;){const i=a.pop();if(i!=null&&i.children&&(!n||n(i))&&a.push(...i.children),i!=null&&i.slots&&(!n||n(i)))for(let u in i.slots)a.push(...i.slots[u]);if(s(i)&&(o.push(i),r))return i}return r?!1:o}function ne(t,s,r){const n=[...t];for(;n.length;){const o=n.pop();if(o!=null&&o.children&&(!r||r(o))&&n.push(...o.children),o!=null&&o.slots&&(!r||r(o)))for(let a in o.slots)n.push(...o.slots[a]);$(o,s(o))}return t}function we(t,s){const r=L(t,n=>n.id===s,!0);if(!r)throw new Error(`没有查询到id为${s}的节点`);return r}function Se(t,s){const r=[{type:"",children:t}];let n=0,o=null;if(L(r,a=>{if(o=a.children??null,!o){if(a!=null&&a.slots)for(let i in a.slots){o=a.slots[i];for(let u=0;u<o.length;u++)if(o[u].id===s)return n=u,!0}return!1}for(let i=0;i<o.length;i++)if(o[i].id===s)return n=i,!0;return!1},!0),!o)throw new Error(`没有查询到id为${s}的节点`);return{list:o,schema:o[n],index:n}}function Ce(t){const s={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_"+J()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return s.schemas[0].children[0].children=q(t.list),s}function q(t,s){return t.map(r=>{var p,P,w;let n=r.type??"";const o=r.options??{},a=(l,E)=>{n===l&&(n=E,o.defaultValue&&(o.defaultValue=JSON.parse(o.defaultValue)))};if(a("uploadImg","upload-image"),a("uploadFile","upload-file"),n==="date"&&o.range&&(o.type="daterange",delete o.range),(n==="date"||n==="time")&&(o.valueFormat=o.format),n==="textarea"){const{minRows:l,maxRows:E}=o;o.autoSize={minRows:l,maxRows:E},delete o.minRows,delete o.maxRows}n==="number"&&!o.precision&&delete o.precision,o.width&&(o.style={width:o.width},delete o.width),n==="grid"&&(n="row"),s&&s.type==="grid"&&(n="col",o.span=r.span,r.key=J());const i={label:r.label,type:n,icon:r.icon||"",field:r.model,componentProps:o,id:r.key};return(o.noFormItem||!o.showLabel)&&(i.noFormItem=!0,delete o.noFormItem,delete o.showLabel),o.clearable&&(o.allowClear=!0,delete o.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(n)&&(i.input=!0,((P=(p=r.rules)==null?void 0:p[0])==null?void 0:P.required)===!1&&r.rules.shift(),((w=r.rules)==null?void 0:w.length)>0&&(i.rules=r.rules)),r.list&&(i.children=q(r.list,r)),r.columns&&(i.children=q(r.columns,r)),r.trs&&(i.children=q(r.trs,r)),r.tds&&(i.children=q(r.tds,r)),i})}function Ee(t,s){let r=null;return(...n)=>{r&&clearTimeout(r),r=setTimeout(()=>{t(...n)},s)}}function G(){const t=e.ref({}),s=e.ref({}),r=e.ref(!1),n=e.ref([]),o=e.reactive({});function a(v){return t.value[v]}function i(v,C){t.value[v]=C}function u(v){delete t.value[v]}function p(v,C=!1){const D=Object.entries(M.pluginManager.publicMethods).reduce((b,[c,B])=>(b[c]=B.handler,b),{});try{new Function(`const epic = this;${v}`).bind({...D,getComponent:a,find:a,defineExpose:P,publicMethods:D,pluginManager:M.pluginManager})()}catch(b){C&&console.error("[epic:自定义函数]异常:",b)}}function P(v){v!=null&&(s.value=v)}function w(v,...C){if(!v||v.length===0){console.warn("未提供任何动作");return}v.forEach(D=>{const b=D.args?JSON.parse(D.args):C;switch(D.type){case"public":l(D,b);break;case"custom":E(D,b);break;case"component":m(D,b);break;default:console.warn(`未知的动作类型: ${D.type}`);break}})}function l(v,C){var D;try{(D=M.pluginManager.publicMethods[v.methodName])==null||D.handler(...C)}catch(b){console.error(`[Epic:公共函数(${v.methodName})]执行异常:`,b)}}function E(v,C){var D,b;try{(b=(D=s.value)[v.methodName])==null||b.call(D,...C)}catch(c){console.error(`[Epic:自定义函数(${v.methodName})]执行异常:`,c)}}function m(v,C){const D=v.componentId!=null&&a(v.componentId);if(!D){console.warn(`[Epic:组件${v.componentId}]未找到`);return}try{D[v.methodName](...C)}catch(b){console.error(`[Epic:组件${v.componentId}函数(${v.methodName})]执行异常:`,b)}}function g(v=!0){r.value=v}function d(v){const C=L(v,()=>!0);n.value=C.map(D=>D.id)}function _(v,C="default"){if(o[C]){const D=o[C];$(v,D)}o[C]=v}function O(v,C="default"){if(o[C]){$(o[C],v,!1);return}o[C]=v}return{componentInstances:t,funcs:s,isDesignMode:r,defaultComponentIds:n,forms:o,addFormData:_,setFormData:O,getComponentInstance:a,find:a,addComponentInstance:i,removeComponentInstance:u,setMethods:p,doActions:w,setDesignMode:g,setDefaultComponentIds:d}}function oe(){const t=e.ref([]),s=e.ref([]),r=e.ref(null);let n=0;function o(p,P="插入组件"){const w=Date.now();n+150>w||(n=w,r.value!=null&&(t.value.push(r.value),s.value.splice(0,s.value.length)),r.value={type:P,componentSchema:JSON.stringify(p)},t.value.length>60&&t.value.unshift())}function a(){if(t.value.length===0)return!1;const p=t.value.pop();return r.value!=null&&s.value.push(r.value),r.value=p,JSON.parse(p.componentSchema)}function i(){if(s.value.length===0)return!1;const p=s.value.pop();return r.value!=null&&t.value.push(r.value),r.value=p,JSON.parse(p.componentSchema)}function u(){t.value=[],s.value=[],r.value=null}return{recordList:t,undoList:s,currentRecord:r,push:o,undo:a,redo:i,reset:u}}const De=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:s}){const r=M.pluginManager.getComponent("form-item"),n=t,o=s,a=e.ref(),i=()=>{o("updateFormItemRef",a.value)};return(u,p)=>n.hasFormItem?(e.openBlock(),e.createBlock(e.unref(r),e.mergeProps({key:0,ref_key:"formItemRef",ref:a,onVnodeMounted:i},n.formItemProps),{default:e.withCtx(()=>[e.renderSlot(u.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(u.$slots,"default",{key:1})}}),re=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{},sourceDateUrl:{},id:{}},emits:["update:modelValue","change","update:dynamicId"],setup(t,{emit:s}){const{proxy:r}=e.getCurrentInstance(),n=t,o=e.ref(null);let a=e.inject("formData",e.reactive({}));const i=e.inject("slots",{}),u=e.inject("pageManager",{}),p=e.inject("disabled",{value:!1}),P=e.inject("ruleFieldPrefix",null),w=e.inject("resetFormData",!1);let l=e.reactive(F(n.componentSchema));g();async function E(h){if(["cascader","checkbox","select","radio"].includes(h.type)&&h.componentProps.dynamicId&&n.sourceDateUrl){const y=(await M.axios({url:n.sourceDateUrl,method:"get",params:{id:h.componentProps.dynamicId}})).data.data;let V=await M.axios({url:y.url,method:y.method,data:JSON.parse(y.body),params:JSON.parse(y.params),headers:JSON.parse(y.headers)});if(y&&(y!=null&&y.dataPath)){const fe=y.dataPath.split(".").reduce((pe,me)=>pe[me],V.data);h.componentProps.options=m(fe,y.dataKey,y.dataValue)}else h.componentProps.options=m(V.data,y.dataKey,y.dataValue);return h}return h}function m(h,I,k){return h&&Object.prototype.toString.call(h)==="[object Array]"?h.map(y=>y.children&&y.children.length?{label:y[I],value:y[k]+"",children:m(y.children,I,k)}:{label:y[I],value:y[k]+""}):[]}e.watch(()=>n.componentSchema,h=>{Q(l,h,["children"])||($(l,F(h)),g())},{deep:!0});function g(){u.isDesignMode.value&&typeof l.field=="string"&&(l.field+="-design-mode")}(n.resetFormData||w)&&(a={});const d=s,_=e.ref(),O=e.ref(),v=h=>{O.value=h},C=e.useAttrs();Object.keys(C).length&&e.provide("nodeAttrs",C);const D=e.shallowRef(null),b=e.computed(()=>{var h,I;return(h=l.componentProps)!=null&&h.hidden?!1:typeof l.show=="boolean"?l.show:((I=l.show)==null?void 0:I.call(l,{values:a}))??!0}),c=e.computed(()=>{var y;const h=b.value&&((y=l.rules)==null?void 0:y.map(V=>({...V,validator:V.validator&&u.funcs.value[V.validator]})));let I=l.field;n.ruleField?I=n.ruleField:P&&l.field&&(I=F(P),I.push(l.field));const k={...l,rules:h,rule:h,field:I};return k.children&&delete k.children,k}),B=e.computed(()=>{var k,y;const h=((k=A.value)==null?void 0:k.bindModel)??"modelValue",I={};return l.on&&Object.keys(l.on).forEach(V=>{I[`on${j(V)}`]=(...X)=>u.doActions(l.on[V],...X)}),{...n,...l.componentProps,disabled:(p==null?void 0:p.value)||((y=l.componentProps)==null?void 0:y.disabled),bindModel:h,...I}}),A=e.computed(()=>M.pluginManager.getComponentConfingByType(l.type)??null);e.watchEffect(()=>{o.value=n.modelValue??a[l.field??""]}),e.watch(()=>o.value,()=>{o.value!==(n.modelValue??a[l.field??""])&&S(o.value)}),e.watch(()=>_.value,()=>{f()},{immediate:!0});function f(){var I;const h=_.value||r;l.id&&h&&(l.input&&(h.setValue=S,h.getValue=()=>a[l.field]||n.modelValue),h.setAttr=(k,y)=>(l.componentProps||(l.componentProps={}),l.componentProps[k]=y),h.getAttr=k=>l.componentProps[k],u.addComponentInstance(l.id,h),(I=A.value)!=null&&I.defaultSchema.input&&l.noFormItem!==!0&&O.value&&u.addComponentInstance(l.id+"formItem",O.value))}function x(){var h;l.id&&(u.removeComponentInstance(l.id),(h=A.value)!=null&&h.defaultSchema.input&&l.noFormItem!==!0&&u.removeComponentInstance(l.id+"formItem"))}async function R(){var I,k,y;if(l=await E(l),typeof((I=l.componentProps)==null?void 0:I.defaultValue)<"u"){const V=u.isDesignMode.value?(k=l.componentProps)==null?void 0:k.defaultValue:a[l.field]??((y=l.componentProps)==null?void 0:y.defaultValue);S(F(V))}if(l.type==="slot"){const V=l.slotName;if(!V)return;D.value=e.defineComponent({setup(){return()=>e.renderSlot(i,V,{componentSchema:l,model:a})}});return}const h=M.pluginManager.getComponent(l.type);if(!h){console.error(`组件${l.type}未注册`);return}if(typeof h=="function"){const V=await h();D.value=V.default??V}else D.value=h}function S(h){d("update:modelValue",h),d("change",h),l.field&&(a[l.field]=h),M.EventBus.emit("updateformData"+n.id,a)}function N(h){d("update:dynamicId",h)}let T=null;return e.watch(()=>l,async h=>{const I=JSON.stringify({...h,children:void 0,componentProps:{...h.componentProps,options:null}});if(I===T)return!1;T=I,R()},{immediate:!0,deep:!0}),e.onUnmounted(x),(h,I)=>{var y;const k=e.resolveComponent("ENode");return D.value&&b.value?(e.openBlock(),e.createBlock(De,{key:0,hasFormItem:e.unref(l).noFormItem!==!0&&((y=A.value)==null?void 0:y.defaultSchema.input),formItemProps:c.value,onUpdateFormItemRef:v},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(D.value),e.mergeProps({ref_key:"componentInstance",ref:_,onVnodeMounted:f,model:e.unref(a)},{...B.value},{[B.value.bindModel]:o.value,["onUpdate:"+B.value.bindModel]:I[0]||(I[0]=V=>o.value=V),[`onUpdate:${B.value.bindModel}`||""]:S,"onUpdate:dynamicId":N}),{node:e.withCtx(V=>[e.createVNode(k,e.mergeProps({id:n.id},V,{sourceDateUrl:n.sourceDateUrl}),null,16,["id","sourceDateUrl"])]),"edit-node":e.withCtx(()=>[e.renderSlot(h.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function xe(){const t=e.ref(!1),s=G(),r=e.ref({});function n(){return new Promise(m=>{if(t.value)m();else{const g=e.watch(t,()=>{g(),m()})}})}async function o(m="default"){var d;await n();const g=(d=r.value)==null?void 0:d[m];if(!g)throw new Error(`表单 [name=${m}] 不存在`);return g}async function a(m,g){const d=await o(m);return F(await g(d))}async function i(m="default"){return await a(m,g=>g.getData())}function u(m,g="default",d=void 0){var _,O;if(d&&Object.keys(d).length){let v=function(c){let B=[];return c.forEach(A=>{A.children&&(B=[...B,...v(A.children)]),B.push(A)}),B},D=function(c){var A;let B=v((A=d==null?void 0:d.schemas[0])==null?void 0:A.children);return Object.keys(c).forEach(f=>{var S,N,T,h,I,k,y;const x=B.find(V=>V.field===f),R=["datetimerange","daterange","monthrange","dates"];(x&&(x==null?void 0:x.type)==="checkbox"||(x==null?void 0:x.type)==="select"&&((S=x==null?void 0:x.componentProps)!=null&&S.multiple)||(x==null?void 0:x.type)==="cascader"&&!((T=(N=x==null?void 0:x.componentProps)==null?void 0:N.props)!=null&&T.multiple)||(x==null?void 0:x.type)==="date"&&R.includes((h=x==null?void 0:x.componentProps)==null?void 0:h.type))&&typeof c[f]=="string"?c[f]=(I=c[f])==null?void 0:I.split(","):(x==null?void 0:x.type)==="cascader"&&((y=(k=x==null?void 0:x.componentProps)==null?void 0:k.props)!=null&&y.multiple)&&typeof c[f]=="string"?(c[f].indexOf(";")>-1?c[f]=c[f].split(";").map(V=>V.split(",")):c[f]=c[f].split(","),c[f].indexOf(";")>-1?c[f]=c[f].split(";").map(V=>V.split(",")):c[f]=c[f].split(",")):((x==null?void 0:x.type)==="upload-image"||(x==null?void 0:x.type)==="upload-file")&&typeof c[f]=="string"&&(c[f]=c[f].split(",").map(V=>({url:V,name:V})))}),c}(m);s.setFormData(D,g);const b=(_=r.value)==null?void 0:_[g];b==null||b.clearValidate()}else{s.setFormData(m,g);const v=(O=r.value)==null?void 0:O[g];v==null||v.clearValidate()}}async function p(m="default"){return await a(m,async g=>(await g.validate(),await g.getData()))}async function P(m){await n();const g={};for(const d in r.value){const _=r.value[d];_&&(g[d]=F(await m(_)))}return g}async function w(){return await P(m=>m.getData())}function l(m){for(const g in m)u(m[g],g)}async function E(){return await P(async m=>(await m.validate(),await m.getData()))}return{ready:t,pageManager:s,forms:r,getData:i,setData:u,validate:p,getForms:w,setForms:l,validateAll:E,getFormInstance:o}}const Ae={key:0,class:"epic-loading-box"},Pe={class:"epic-builder-main"},Ie={class:"epic-loading-box"},se=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean},sourceDateUrl:{},id:{}},emits:["change","ready"],setup(t,{expose:s,emit:r}){const n=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),o=r,{ready:a,pageManager:i,forms:u,getData:p,setData:P,validate:w,getForms:l,setForms:E,validateAll:m,getFormInstance:g}=xe(),d=t,_=e.reactive({schemas:[]});e.watch(()=>d.pageSchema,c=>{$(_,c)},{immediate:!0,deep:!0}),e.watch(()=>d.formData,c=>{if(c){let B=v(c);P(B)}},{immediate:!0,deep:!0});function O(c){let B=[];return c.forEach(A=>{A.children&&(B=[...B,...O(A.children)]),B.push(A)}),B}function v(c){let B=O(d.pageSchema.schemas[0].children);return Object.keys(c).forEach(A=>{var R,S,N,T,h,I,k;const f=B.find(y=>y.field===A),x=["datetimerange","daterange","monthrange","dates"];(f&&(f==null?void 0:f.type)==="checkbox"||(f==null?void 0:f.type)==="select"&&((R=f==null?void 0:f.componentProps)!=null&&R.multiple)||(f==null?void 0:f.type)==="cascader"&&!((N=(S=f==null?void 0:f.componentProps)==null?void 0:S.props)!=null&&N.multiple)||(f==null?void 0:f.type)==="date"&&x.includes((T=f==null?void 0:f.componentProps)==null?void 0:T.type))&&typeof c[A]=="string"?c[A]=(h=c[A])==null?void 0:h.split(","):(f==null?void 0:f.type)==="cascader"&&((k=(I=f==null?void 0:f.componentProps)==null?void 0:I.props)!=null&&k.multiple)&&typeof c[A]=="string"?(c[A].indexOf(";")>-1?c[A]=c[A].split(";").map(y=>y.split(",")):c[A]=c[A].split(","),c[A].indexOf(";")>-1?c[A]=c[A].split(";").map(y=>y.split(",")):c[A]=c[A].split(",")):((f==null?void 0:f.type)==="upload-image"||(f==null?void 0:f.type)==="upload-file")&&typeof c[A]=="string"&&(c[A]=c[A].split(",").map(y=>({url:y,name:y})))}),c}e.watch(()=>_.script,c=>{c&&i.setMethods(c,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",i),e.provide("forms",u),e.provide("pageSchema",_),e.provide("disabled",e.computed(()=>d.disabled));const C=e.getCurrentInstance(),D=C==null?void 0:C.proxy;function b(){e.nextTick(()=>{a.value=!0,o("ready",i),D&&i.addComponentInstance("builder",D)})}return M.EventBus.on("updateformData"+d.id,c=>{o("change",c)}),s({ready:a,pageManager:i,getData:p,setData:P,validate:w,getForms:l,setForms:E,validateAll:m,getFormInstance:g}),(c,B)=>e.unref(M.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:b},{default:e.withCtx(()=>[e.createElementVNode("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.schemas,(A,f)=>(e.openBlock(),e.createBlock(e.unref(re),{id:d.id,key:f,sourceDateUrl:d.sourceDateUrl,componentSchema:A},null,8,["id","sourceDateUrl","componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(e.unref(n))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Ae))}});function Y(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function be(t){let s=0,r,n;const o=()=>{s-=1,n&&s<=0&&(n.stop(),r=void 0,n=void 0)};return(...a)=>(s+=1,n||(n=e.effectScope(!0),r=n.run(()=>t(...a))),Y(o),r)}function z(t){return typeof t=="function"?t():e.unref(t)}const Ve=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _e=t=>typeof t<"u",Me=Object.prototype.toString,ke=t=>Me.call(t)==="[object Object]",Be=()=>{};function Oe(t){return e.getCurrentInstance()}function Fe(t,s=!0,r){Oe()?e.onMounted(t,r):s?t():e.nextTick(t)}function Ne(t=!1,s={}){const{truthyValue:r=!0,falsyValue:n=!1}=s,o=e.isRef(t),a=e.ref(t);function i(u){if(arguments.length)return a.value=u,a.value;{const p=z(r);return a.value=a.value===p?z(n):p,a.value}}return o?i:[a,i]}function Re(t,s,r){const n=e.watch(t,(...o)=>(e.nextTick(()=>n()),s(...o)),r);return n}const H=Ve?window:void 0;function U(t){var s;const r=z(t);return(s=r==null?void 0:r.$el)!=null?s:r}function $e(...t){let s,r,n,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,o]=t,s=H):[s,r,n,o]=t,!s)return Be;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],i=()=>{a.forEach(w=>w()),a.length=0},u=(w,l,E,m)=>(w.addEventListener(l,E,m),()=>w.removeEventListener(l,E,m)),p=e.watch(()=>[U(s),z(o)],([w,l])=>{if(i(),!w)return;const E=ke(l)?{...l}:l;a.push(...r.flatMap(m=>n.map(g=>u(w,m,g,E))))},{immediate:!0,flush:"post"}),P=()=>{p(),i()};return Y(P),P}function Te(t){return typeof t=="function"?t:typeof t=="string"?s=>s.key===t:Array.isArray(t)?s=>t.includes(s.key):()=>!0}function ae(...t){let s,r,n={};t.length===3?(s=t[0],r=t[1],n=t[2]):t.length===2?typeof t[1]=="object"?(s=!0,r=t[0],n=t[1]):(s=t[0],r=t[1]):(s=!0,r=t[0]);const{target:o=H,eventName:a="keydown",passive:i=!1,dedupe:u=!1}=n,p=Te(s);return $e(o,a,w=>{w.repeat&&z(u)||p(w)&&r(w)},i)}function K(t,s,r={}){return ae(t,s,{...r,eventName:"keydown"})}function Z(t,s,r={}){return ae(t,s,{...r,eventName:"keyup"})}function Ue(){const t=e.ref(!1),s=e.getCurrentInstance();return s&&e.onMounted(()=>{t.value=!0},s),t}function qe(t){const s=Ue();return e.computed(()=>(s.value,!!t()))}function Le(t){return JSON.parse(JSON.stringify(t))}function le(t,s,r={}){const{window:n=H,...o}=r;let a;const i=qe(()=>n&&"ResizeObserver"in n),u=()=>{a&&(a.disconnect(),a=void 0)},p=e.computed(()=>{const l=z(t);return Array.isArray(l)?l.map(E=>U(E)):[U(l)]}),P=e.watch(p,l=>{if(u(),i.value&&n){a=new ResizeObserver(s);for(const E of l)E&&a.observe(E,o)}},{immediate:!0,flush:"post"}),w=()=>{u(),P()};return Y(w),{isSupported:i,stop:w}}function ze(t,s={width:0,height:0},r={}){const{window:n=H,box:o="content-box"}=r,a=e.computed(()=>{var l,E;return(E=(l=U(t))==null?void 0:l.namespaceURI)==null?void 0:E.includes("svg")}),i=e.ref(s.width),u=e.ref(s.height),{stop:p}=le(t,([l])=>{const E=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(n&&a.value){const m=U(t);if(m){const g=m.getBoundingClientRect();i.value=g.width,u.value=g.height}}else if(E){const m=Array.isArray(E)?E:[E];i.value=m.reduce((g,{inlineSize:d})=>g+d,0),u.value=m.reduce((g,{blockSize:d})=>g+d,0)}else i.value=l.contentRect.width,u.value=l.contentRect.height},r);Fe(()=>{const l=U(t);l&&(i.value="offsetWidth"in l?l.offsetWidth:s.width,u.value="offsetHeight"in l?l.offsetHeight:s.height)});const P=e.watch(()=>U(t),l=>{i.value=l?s.width:0,u.value=l?s.height:0});function w(){p(),P()}return{width:i,height:u,stop:w}}function Je(t,s,r,n={}){var o,a,i;const{clone:u=!1,passive:p=!1,eventName:P,deep:w=!1,defaultValue:l,shouldEmit:E}=n,m=e.getCurrentInstance(),g=r||(m==null?void 0:m.emit)||((o=m==null?void 0:m.$emit)==null?void 0:o.bind(m))||((i=(a=m==null?void 0:m.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(m==null?void 0:m.proxy));let d=P;s||(s="modelValue"),d=d||`update:${s.toString()}`;const _=C=>u?typeof u=="function"?u(C):Le(C):C,O=()=>_e(t[s])?_(t[s]):l,v=C=>{E?E(C)&&g(d,C):g(d,C)};if(p){const C=O(),D=e.ref(C);let b=!1;return e.watch(()=>t[s],c=>{b||(b=!0,D.value=_(c),e.nextTick(()=>b=!1))}),e.watch(D,c=>{!b&&(c!==t[s]||w)&&v(c)},{deep:w}),D}else return e.computed({get(){return O()},set(C){v(C)}})}function We(){const{isDark:t}=W(),s=Ne(t);return{isDark:t,toggleDark:s}}function ie(){const t=e.ref(!1);return e.onMounted(()=>{ce(t),He(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function ce(t){var s=document.documentElement;s&&(s.classList.contains("dark")?t.value=!0:t.value=!1)}function He(t){var s=document.querySelector("html"),r=new MutationObserver(function(n){for(var o of n)if(o.type==="attributes"&&o.attributeName==="class"){const a=o.target;new Array(...a.classList).includes("dark")?t.value=!0:t.value=!1}});r.observe(s,{attributes:!0,attributeFilter:["class"]}),e.onUnmounted(()=>{r.disconnect()})}function ue(){const t=e.ref(1),s=e.ref(!1),{isDark:r}=ie(),{pressSpace:n,pressShift:o,pressCtrl:a}=de();return{canvasScale:t,pressSpace:n,pressShift:o,pressCtrl:a,disabledZoom:s,isDark:r}}const W=be(ue);function de(){const t=e.ref(!1),s=e.ref(!1),r=e.ref(!1);return K(" ",()=>{t.value=!0}),Z(" ",()=>{t.value=!1}),K("Shift",n=>{n.preventDefault(),s.value=!0}),Z("Shift",()=>{s.value=!1}),K("Control",n=>{n.preventDefault(),r.value=!0}),Z("Control",()=>{r.value=!1}),{pressSpace:t,pressShift:s,pressCtrl:r}}function Ke(t){const{pressSpace:s}=W(),r=new Image(1,1);r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let n=0,o=0;function a(p){var P;s.value&&(n=p.x,o=p.y,(P=p.dataTransfer)==null||P.setDragImage(document.createElement("div"),0,0))}function i(p){if(p.preventDefault(),!p.x||!p.y||!s.value)return;const P=p.x-n,w=p.y-o;n=p.x,o=p.y,t.value&&(t.value.scrollTop-=w,t.value.scrollLeft-=P)}function u(){s.value=!1}return{handleElementDragStart:a,handleElementDrag:i,handleElementDragEnd:u}}function Ze(t){const{pressCtrl:s,canvasScale:r,disabledZoom:n}=W();function o(a){if(!s.value||n.value)return;a.preventDefault();let i=0;a.deltaY<0?i=r.value+.05:i=r.value-.05,!(i>150||i<.5)&&(r.value=i)}return e.watch(()=>r.value,a=>{t.value&&!n.value&&(t.value.style.transform=`scale(${a})`)}),{handleZoom:o,canvasScale:r}}function Qe(t,s=16.66){let r;function n(){o(),r=window.setInterval(t,s)}function o(){window.clearInterval(r)}return{startTimedQuery:n,stopTimedQuery:o}}const Ge={class:"min-w-750px rounded"},Ye={class:"h-full rounded"},Xe=e.defineComponent({__name:"index",setup(t,{expose:s}){const r=M.pluginManager.getComponent("monacoEditor"),n=M.pluginManager.getComponent("modal"),o=e.ref(null),a=e.ref(!1),i=e.ref(!1),u=e.ref({}),p=e.inject("pageSchema"),P=e.ref(null),w=e.ref("");function l(){i.value=!1}function E(){a.value=!1}function m(){a.value=!0,w.value=J()}async function g(){try{let d=await P.value.validateAll();if(!Object.keys(d).length){alert("请添加表单组件后再尝试!");return}Object.keys(d).length===1&&(d=d.default),u.value=JSON.stringify(d,null,2),e.nextTick(()=>{var _;(_=o.value)==null||_.setValue(u.value)}),i.value=!0}catch(d){console.error(d)}}return s({handleOpen:m}),(d,_)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":_[1]||(_[1]=O=>a.value=O),title:"预览",class:"w-900px",width:"900px",onClose:E,onOk:g,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ge,[(e.openBlock(),e.createBlock(e.unref(se),{key:w.value,ref_key:"kb",ref:P,"page-schema":e.unref(p)},null,8,["page-schema"])),e.createVNode(e.unref(n),{modelValue:i.value,"onUpdate:modelValue":_[0]||(_[0]=O=>i.value=O),title:"表单数据",class:"w-860px",width:"860px",onClose:l,onOk:l},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(e.unref(r),{ref_key:"monacoEditorRef",ref:o,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":u.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:[]},updateSourceId:{}},emits:["ready","save","reset","toggleDeviceMode","saveSourceData","deleteSourceData","updateSourceData"],setup(t,{expose:s,emit:r}){const n=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-1afOcXnV.cjs"))),o=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BJlPL6eL.cjs"))),a=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-ChGNJr_v.cjs"))),i=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C6ceZM1C.cjs"))),u=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),p=G(),P=oe(),w=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(w.defaultSchema){l=w.defaultSchema;return}w.source&&M.pluginManager.setSourceData(w.source),w.formMode&&(l.schemas=M.pluginManager.formSchemas)}),p.setDesignMode(),p.setDefaultComponentIds(l.schemas);const E=r,m=e.ref(null),g=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),d=e.reactive({schemas:[],script:l.script}),{disabledZoom:_}=W();e.watchEffect(()=>{_.value=w.disabledZoom}),e.watchEffect(()=>{const S=d.script;S&&S!==""&&p.setMethods(S)}),e.provide("pageSchema",d),e.provide("revoke",P),e.provide("pageManager",p),e.provide("designerProps",e.computed(()=>w)),e.provide("designer",{setCheckedNode:v,setHoverNode:C,setDisableHover:b,handleToggleDeviceMode:x,reset:A,state:g}),M.EventBus.on("saveSourceData",S=>{E("saveSourceData",S)}),M.EventBus.on("deleteSourceData",S=>{E("deleteSourceData",S)}),M.EventBus.on("updateSourceData",S=>{E("updateSourceData",S)});function O(){d.schemas=F(l.schemas),v(d.schemas[0]),P.push(d.schemas,"初始化撤销功能")}async function v(S=d.schemas[0]){g.checkedNode=S,g.matched=ee(d.schemas,S.id)}async function C(S=null){var N;if(!S||g.disableHover)return g.hoverNode=null,!1;if((S==null?void 0:S.id)===((N=g.hoverNode)==null?void 0:N.id))return!1;g.hoverNode=S}function D(){e.nextTick(()=>{E("ready",{pageManager:p})})}async function b(S=!1){g.disableHover=S}function c(S){$(d,F(S))}function B(){return e.toRaw(d)}function A(){Q(d.schemas,l.schemas)&&d.script===l.script||($(d.schemas,l.schemas),d.script=l.script,v(d.schemas[0]),P.push(d.schemas,"重置操作"),E("reset",d))}function f(){E("save",e.toRaw(d))}function x(S){E("toggleDeviceMode",S)}function R(){m.value.handleOpen()}return O(),s({revoke:P,setData:c,getData:B,reset:A,preview:R}),(S,N)=>e.unref(M.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:D},{default:e.withCtx(()=>[e.createElementVNode("div",et,[e.createElementVNode("div",tt,[e.renderSlot(S.$slots,"header",{},()=>[w.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n),{key:0,onPreview:R,onSave:f},{header:e.withCtx(()=>[e.renderSlot(S.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(S.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(S.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(S.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(S.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(S.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":S.hiddenHeader}])},[e.createVNode(e.unref(o)),e.createVNode(e.unref(a)),e.createVNode(e.unref(i))],2),e.createVNode(Xe,{ref_key:"previewRef",ref:m},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",nt,[e.createVNode(e.unref(u))])]),_:3})):(e.openBlock(),e.createElementBlock("div",je))}}),rt={component:async()=>await Promise.resolve().then(()=>require("./index-B7Uy532l.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"},st={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 at(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-DpzLP1Zp.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-Dan8DnTn.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-9xlsE_Mf.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-DCoUYKRW.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-BBNxCX9U.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-F-tQsU_8.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-DU0OYNvy.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-CWoguTGM.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-BgoSZRkZ.cjs"))}),[rt,st].forEach(r=>{t.registerComponent(r)})}at(M.pluginManager);exports._sfc_main=re;exports._sfc_main$1=se;exports._sfc_main$2=ot;exports.capitalizeFirstLetter=j;exports.convertKFormData=Ce;exports.debounce=Ee;exports.deepClone=F;exports.deepCompareAndModify=$;exports.deepEqual=Q;exports.findSchemaById=we;exports.findSchemaInfoById=Se;exports.findSchemas=L;exports.generateNewSchema=he;exports.getDarkState=ce;exports.getFormFields=ye;exports.getFormSchemas=te;exports.getMatchedById=ee;exports.getUUID=J;exports.getValueByPath=ve;exports.initStore=ue;exports.mapSchemas=ne;exports.recursionConvertedNode=q;exports.setValueByPath=ge;exports.useDark=ie;exports.useElementDrag=Ke;exports.useElementSize=ze;exports.useElementZoom=Ze;exports.useKeyPress=de;exports.usePageManager=G;exports.useResizeObserver=le;exports.useRevoke=oe;exports.useStore=W;exports.useTheme=We;exports.useTimedQuery=Qe;exports.useVModel=Je;exports.watchOnce=Re;
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-Bj6zKw82.js";
2
- export {
3
- f as default
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./axios-CYGTE3lR.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={class:"btn"},j={class:"btns"},z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})},modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(x,{expose:b,emit:w}){const d=g.pluginManager.getComponent("button"),S=w,a=x;t.watch(()=>a.componentSchema,()=>{t.nextTick(()=>{v()})},{deep:!0,immediate:!0});const P=new ResizeObserver(o=>{for(const e of o)e.target&&e.target.clientWidth&&e.target.clientHeight&&v()}),l=t.ref(null),u=t.ref(null),n=t.ref(),V=t.ref("");function v(){var o,e;if(u.value&&((o=u.value)!=null&&o.clientHeight)&&((e=u.value)!=null&&e.clientWidth)){if(l.value.height=u.value.clientHeight,l.value.width=u.value.clientWidth,n.value=l.value.getContext("2d"),a.modelValue){let s=new Image;s.src=a.modelValue,s.setAttribute("crossOrigin","anonymous"),s.onload=()=>{n.value.fillStyle=n.value.createPattern(s,"repeat"),n.value.fillRect(0,0,1e3,550)}}n.value.lineWidth=a.componentSchema.componentProps.lineWidth||4,a.componentSchema&&a.componentSchema.componentProps&&a.componentSchema.componentProps.style&&a.componentSchema.componentProps.style.color&&(n.value.strokeStyle=a.componentSchema.componentProps.style.color),V.value=l.value.getBoundingClientRect()}}const i=t.ref(""),c=t.ref(""),_=t.ref(""),T=t.ref(""),r=t.ref([]),m=t.ref(!1);function k(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};i.value=e.x,c.value=e.y,n.value.beginPath(),n.value.moveTo(e.x,e.y),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),r.value.push(e),m.value=!0}function C(o){if(o=o||event,o.preventDefault(),m.value){let e={x:o.offsetX,y:o.offsetY};_.value=e.x,T.value=e.y,n.value.beginPath(),n.value.moveTo(i.value,c.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),i.value=e.x,c.value=e.y,r.value.push(e)}}function N(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};n.value.beginPath(),n.value.moveTo(i.value,c.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),r.value.push(e),r.value.push({x:-1,y:-1}),m.value=!1}function h(){n.value.clearRect(0,0,l.value.width,l.value.height),r.value=[]}async function f(){let o=await D(l.value.toDataURL("image/png"));S("update:modelValue",o)}async function D(o){let e=atob(o.split(",")[1]),s=new ArrayBuffer(e.length),M=new Uint8Array(s);for(let p=0;p<e.length;p++)M[p]=e.charCodeAt(p);let W=new Blob([s],{type:"image/png"}),y=new FormData;return y.append("file",W,Date.now()+"png"),(await g.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:y,headers:{"Content-Type":"multipart/form-data"}})).data.data.url}return t.onMounted(()=>{v(),P.observe(u.value)}),t.onUnmounted(()=>{}),b({surewrite:f}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:a.componentSchema.componentProps.style.height,width:a.componentSchema.componentProps.style.width||"100%"})},[t.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:u},[t.createElementVNode("canvas",{ref_key:"canvas",ref:l,onMousedown:k,onMousemove:C,onMouseup:N},null,544)],512),t.createElementVNode("div",E,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",j,[t.createVNode(t.unref(d),{type:"info",size:"mini",onClick:h,onTouch:h},{default:t.withCtx(()=>e[0]||(e[0]=[t.createTextVNode("重写")])),_:1}),t.createVNode(t.unref(d),{type:"primary",size:"mini",onClick:f,onTouch:f},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1})])])],4))}},O=B._export_sfc(z,[["__scopeId","data-v-e6820cdc"]]);exports.default=O;