epic-designer-gold 0.0.47 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attributeView-CA-6yB0k.cjs → attributeView-CMbZBZIS.cjs} +1 -1
- package/dist/{attributeView-C75ra3CN.js → attributeView-DvYRuXDB.js} +1 -1
- package/dist/{index-9VqDmCT_.cjs → index-2_PG24En.cjs} +1 -1
- package/dist/{index-Bdnc9TGH.cjs → index-3oFTJubt.cjs} +1 -1
- package/dist/{index-B-Uox2mn.cjs → index-BIfS14i1.cjs} +1 -1
- package/dist/{index-M3HldxkA.js → index-BizWKLWZ.js} +1 -1
- package/dist/{index-DwDY6KkH.js → index-Bjj1uygU.js} +1 -1
- package/dist/{index-BGT2-jZP.cjs → index-BsyFZeFI.cjs} +1 -1
- package/dist/{index-0RqJEjlH.cjs → index-C8eSqkwT.cjs} +1 -1
- package/dist/index-CqirvAEP.js +4 -0
- package/dist/index-CtK_8YxJ.cjs +10 -0
- package/dist/{index-CML-aVic.js → index-D0xByXxW.js} +1 -1
- package/dist/{index-CvIjQtJw.js → index-DiYy4kUz.js} +1 -1
- package/dist/{index-Bgvfahgd.js → index-Dy65ngnp.js} +223 -223
- package/dist/{index-baUE53XK.cjs → index-FUj4O0Wm.cjs} +1 -1
- package/dist/{index-C32P7cCc.js → index-SmoMBzHL.js} +1 -1
- package/dist/{index-BgTlZ9gW.js → index-WBW2xl-M.js} +1 -1
- package/dist/{index-BbCEtCJA.cjs → index-YV7i1gyI.cjs} +1 -1
- package/dist/{index-BHWJ1KwT.js → index-ijn3b5rF.js} +1 -1
- package/dist/{index-Bmo9n7ut.cjs → index-zyeRTxj7.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/sign-BJBURbHk.js +218 -0
- package/dist/sign-Cn6LXVcp.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-cuoX6XX4.js → styleView-BbQxI-Nr.js} +1 -1
- package/dist/{styleView-CXdgqy6O.cjs → styleView-CF34Ddn9.cjs} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +42 -44
- package/package.json +1 -1
- package/dist/index-BRZDZuxE.js +0 -4
- package/dist/index-ETJEJKM_.cjs +0 -10
- package/dist/sign-BRchUdJt.js +0 -156
- package/dist/sign-CnQtsTLr.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=Object.create;var i=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&&i(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?i(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"),P={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.clearable"},{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 中的文字"}]}},h={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:"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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},g={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"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},w={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"}],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"}]}},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"}]}},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-Cnp3LxNc.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:"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-_GXvcBNP.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:"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-Bjqm2Ob1.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:"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(r=>r.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(r=>r.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:"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:"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:"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:"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"}]}},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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-eWBMdZ9d.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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={component:()=>Promise.resolve().then(()=>require("../../uploadImage-BXcN2FA_.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:"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-CnQtsTLr.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:"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),[g,w,P,h,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 i=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 p of u(l))!b.call(e,p)&&p!==o&&i(e,p,{get:()=>l[p],enumerable:!(a=d(l,p))||a.enumerable});return e};var n=(e,l,o)=>(o=e!=null?s(m(e)):{},f(l||!e||!e.__esModule?i(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("epic-designer-gold"),t=require("element-plus"),P={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.clearable"},{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 中的文字"}]}},h={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:"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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},g={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"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},w={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"}],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"}]}},Y={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"}]}},x={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-Cnp3LxNc.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:"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-_GXvcBNP.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:"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-Bjqm2Ob1.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:"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(r=>r.field==="componentProps.max"),p=o.value[a];p.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(r=>r.field==="componentProps.min"),p=o.value[a];p.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:"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:"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:"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:"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"}]}},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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-eWBMdZ9d.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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},B={component:()=>Promise.resolve().then(()=>require("../../uploadImage-BXcN2FA_.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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={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-Cn6LXVcp.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:{}}},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:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}]}};function L(e=y.pluginManager){e.component("FormItem",t.ElFormItem),e.component("Form",t.ElForm),e.component("RadioGroup",t.ElRadioGroup),e.component("RadioButton",t.ElRadioButton),e.component("Tabs",t.ElTabs),e.component("TabPane",t.ElTabPane),e.component("Collapse",t.ElCollapse),e.component("CollapseItem",t.ElCollapseItem),e.component("Drawer",t.ElDrawer),e.component("Dialog",t.ElDialog),[g,w,P,h,v,C,k,R,V,I,D,z,T,q,B,E,S,Y,x,F,N,M,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,6 +1,6 @@
|
|
|
1
1
|
import { pluginManager as r } from "epic-designer-gold";
|
|
2
|
-
import { ElFormItem as i, ElForm as c, ElRadioGroup as s, ElRadioButton as d, ElTabs as u, ElTabPane as m, ElCollapse as b, ElCollapseItem as f, ElDrawer as y } from "element-plus";
|
|
3
|
-
const
|
|
2
|
+
import { ElFormItem as i, ElForm as c, ElRadioGroup as s, ElRadioButton as d, ElTabs as u, ElTabPane as m, ElCollapse as b, ElCollapseItem as f, ElDrawer as y, ElDialog as P } from "element-plus";
|
|
3
|
+
const h = {
|
|
4
4
|
component: async () => (await import("element-plus")).ElInput,
|
|
5
5
|
groupName: "表单",
|
|
6
6
|
icon: "icon--epic--border-color-outline-rounded",
|
|
@@ -174,7 +174,7 @@ const P = {
|
|
|
174
174
|
}
|
|
175
175
|
]
|
|
176
176
|
}
|
|
177
|
-
},
|
|
177
|
+
}, v = {
|
|
178
178
|
component: async () => (await import("element-plus")).ElInput,
|
|
179
179
|
icon: "icon--epic--edit-square-outline-rounded",
|
|
180
180
|
groupName: "表单",
|
|
@@ -325,7 +325,7 @@ const P = {
|
|
|
325
325
|
}
|
|
326
326
|
]
|
|
327
327
|
}
|
|
328
|
-
},
|
|
328
|
+
}, g = {
|
|
329
329
|
component: async () => (await import("element-plus")).ElInputNumber,
|
|
330
330
|
groupName: "表单",
|
|
331
331
|
icon: "icon--epic--123-rounded",
|
|
@@ -469,7 +469,7 @@ const P = {
|
|
|
469
469
|
}
|
|
470
470
|
]
|
|
471
471
|
}
|
|
472
|
-
},
|
|
472
|
+
}, w = {
|
|
473
473
|
component: () => import("../../form-6cUK-Ari.js"),
|
|
474
474
|
groupName: "表单",
|
|
475
475
|
icon: "icon--epic--list-alt-outline-rounded",
|
|
@@ -615,14 +615,14 @@ const P = {
|
|
|
615
615
|
}
|
|
616
616
|
]
|
|
617
617
|
}
|
|
618
|
-
},
|
|
618
|
+
}, E = {
|
|
619
619
|
component: () => import("../../formItem-D10Om12T.js"),
|
|
620
620
|
defaultSchema: {
|
|
621
621
|
label: "表单项",
|
|
622
622
|
type: "form-item"
|
|
623
623
|
},
|
|
624
624
|
config: {}
|
|
625
|
-
},
|
|
625
|
+
}, S = {
|
|
626
626
|
component: () => import("../../button-BvmCwtR3.js"),
|
|
627
627
|
groupName: "表单",
|
|
628
628
|
icon: "icon--epic--fit-screen-rounded",
|
|
@@ -797,7 +797,7 @@ const P = {
|
|
|
797
797
|
// },
|
|
798
798
|
]
|
|
799
799
|
}
|
|
800
|
-
},
|
|
800
|
+
}, Y = {
|
|
801
801
|
component: () => import("../../row-CkyJ9pQh.js"),
|
|
802
802
|
groupName: "布局",
|
|
803
803
|
icon: "icon--epic--width-normal-outline",
|
|
@@ -901,7 +901,7 @@ const P = {
|
|
|
901
901
|
// },
|
|
902
902
|
]
|
|
903
903
|
}
|
|
904
|
-
},
|
|
904
|
+
}, V = {
|
|
905
905
|
component: () => import("../../col-0rmM8on4.js"),
|
|
906
906
|
defaultSchema: {
|
|
907
907
|
label: "栅格布局-列",
|
|
@@ -920,7 +920,7 @@ const P = {
|
|
|
920
920
|
}
|
|
921
921
|
]
|
|
922
922
|
}
|
|
923
|
-
},
|
|
923
|
+
}, C = {
|
|
924
924
|
component: () => import("../../select-BCX_FOhw.js"),
|
|
925
925
|
groupName: "表单",
|
|
926
926
|
icon: "icon--epic--select",
|
|
@@ -1194,7 +1194,7 @@ const P = {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
]
|
|
1196
1196
|
}
|
|
1197
|
-
},
|
|
1197
|
+
}, k = {
|
|
1198
1198
|
component: () => import("../../radio-Ducbqo4d.js"),
|
|
1199
1199
|
groupName: "表单",
|
|
1200
1200
|
icon: "icon--epic--radio-button-checked-outline",
|
|
@@ -1317,7 +1317,7 @@ const P = {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
]
|
|
1319
1319
|
}
|
|
1320
|
-
},
|
|
1320
|
+
}, T = {
|
|
1321
1321
|
component: () => import("../../checkbox-BMXONqwy.js"),
|
|
1322
1322
|
groupName: "表单",
|
|
1323
1323
|
icon: "icon--epic--dialogs-outline-rounded",
|
|
@@ -1458,7 +1458,7 @@ const P = {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
]
|
|
1460
1460
|
}
|
|
1461
|
-
},
|
|
1461
|
+
}, D = {
|
|
1462
1462
|
component: async () => (await import("element-plus")).ElSlider,
|
|
1463
1463
|
groupName: "表单",
|
|
1464
1464
|
icon: "icon--epic--switches",
|
|
@@ -1788,7 +1788,7 @@ const P = {
|
|
|
1788
1788
|
],
|
|
1789
1789
|
action: []
|
|
1790
1790
|
}
|
|
1791
|
-
},
|
|
1791
|
+
}, z = {
|
|
1792
1792
|
component: async () => (await import("element-plus")).ElSwitch,
|
|
1793
1793
|
groupName: "表单",
|
|
1794
1794
|
icon: "icon--epic--toggle-off-outline",
|
|
@@ -1930,7 +1930,7 @@ function n(e) {
|
|
|
1930
1930
|
defaultValue: l
|
|
1931
1931
|
};
|
|
1932
1932
|
}
|
|
1933
|
-
const
|
|
1933
|
+
const F = {
|
|
1934
1934
|
component: async () => (await import("element-plus")).ElCascader,
|
|
1935
1935
|
groupName: "表单",
|
|
1936
1936
|
icon: "icon--epic--full-coverage-outline",
|
|
@@ -2146,7 +2146,7 @@ const z = {
|
|
|
2146
2146
|
}
|
|
2147
2147
|
]
|
|
2148
2148
|
}
|
|
2149
|
-
},
|
|
2149
|
+
}, N = {
|
|
2150
2150
|
component: () => import("../../collapse-I4H1VTFf.js"),
|
|
2151
2151
|
icon: "epic-icon-xiala",
|
|
2152
2152
|
defaultSchema: {
|
|
@@ -2185,7 +2185,7 @@ const z = {
|
|
|
2185
2185
|
// },
|
|
2186
2186
|
]
|
|
2187
2187
|
}
|
|
2188
|
-
},
|
|
2188
|
+
}, R = {
|
|
2189
2189
|
component: () => import("../../collapseItem-CW_HTWvE.js"),
|
|
2190
2190
|
defaultSchema: {
|
|
2191
2191
|
label: "折叠项",
|
|
@@ -2195,7 +2195,7 @@ const z = {
|
|
|
2195
2195
|
config: {
|
|
2196
2196
|
attribute: []
|
|
2197
2197
|
}
|
|
2198
|
-
},
|
|
2198
|
+
}, B = {
|
|
2199
2199
|
component: async () => (await import("element-plus")).ElDatePicker,
|
|
2200
2200
|
groupName: "表单",
|
|
2201
2201
|
icon: "icon--epic--calendar-month-outline-rounded",
|
|
@@ -2388,7 +2388,7 @@ const z = {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
]
|
|
2390
2390
|
}
|
|
2391
|
-
},
|
|
2391
|
+
}, M = {
|
|
2392
2392
|
component: () => import("../../uploadFile-CYDDVa_x.js"),
|
|
2393
2393
|
groupName: "表单",
|
|
2394
2394
|
icon: "icon--epic--upload-rounded",
|
|
@@ -2473,7 +2473,7 @@ const z = {
|
|
|
2473
2473
|
]
|
|
2474
2474
|
},
|
|
2475
2475
|
bindModel: "modelValue"
|
|
2476
|
-
},
|
|
2476
|
+
}, L = {
|
|
2477
2477
|
component: () => import("../../uploadImage-742IA7ei.js"),
|
|
2478
2478
|
groupName: "表单",
|
|
2479
2479
|
icon: "icon--epic--imagesmode-outline-rounded",
|
|
@@ -2558,7 +2558,7 @@ const z = {
|
|
|
2558
2558
|
]
|
|
2559
2559
|
},
|
|
2560
2560
|
bindModel: "modelValue"
|
|
2561
|
-
},
|
|
2561
|
+
}, O = {
|
|
2562
2562
|
component: () => import("../../modal-BPJM1Muh.js"),
|
|
2563
2563
|
defaultSchema: {
|
|
2564
2564
|
label: "模态框",
|
|
@@ -2574,9 +2574,9 @@ const z = {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
]
|
|
2576
2576
|
}
|
|
2577
|
-
},
|
|
2577
|
+
}, W = {
|
|
2578
2578
|
// component: async () => await import("../../../../packages/core/components/designer/src"),
|
|
2579
|
-
component: async () => await import("../../sign-
|
|
2579
|
+
component: async () => await import("../../sign-BJBURbHk.js"),
|
|
2580
2580
|
icon: "icon--epic--insert-text-outline-rounded",
|
|
2581
2581
|
groupName: "表单",
|
|
2582
2582
|
sort: 705,
|
|
@@ -2589,9 +2589,7 @@ const z = {
|
|
|
2589
2589
|
placeholder: "请输入",
|
|
2590
2590
|
lineWidth: 4,
|
|
2591
2591
|
type: "sign",
|
|
2592
|
-
style: {
|
|
2593
|
-
height: "300px"
|
|
2594
|
-
}
|
|
2592
|
+
style: {}
|
|
2595
2593
|
}
|
|
2596
2594
|
},
|
|
2597
2595
|
config: {
|
|
@@ -2681,41 +2679,41 @@ const z = {
|
|
|
2681
2679
|
// ],
|
|
2682
2680
|
}
|
|
2683
2681
|
};
|
|
2684
|
-
function
|
|
2685
|
-
e.component("FormItem", i), e.component("Form", c), e.component("RadioGroup", s), e.component("RadioButton", d), e.component("Tabs", u), e.component("TabPane", m), e.component("Collapse", b), e.component("CollapseItem", f), e.component("Drawer", y), [
|
|
2686
|
-
g,
|
|
2682
|
+
function j(e = r) {
|
|
2683
|
+
e.component("FormItem", i), e.component("Form", c), e.component("RadioGroup", s), e.component("RadioButton", d), e.component("Tabs", u), e.component("TabPane", m), e.component("Collapse", b), e.component("CollapseItem", f), e.component("Drawer", y), e.component("Dialog", P), [
|
|
2687
2684
|
w,
|
|
2688
|
-
|
|
2685
|
+
E,
|
|
2689
2686
|
h,
|
|
2690
2687
|
v,
|
|
2691
|
-
|
|
2688
|
+
g,
|
|
2692
2689
|
k,
|
|
2693
|
-
R,
|
|
2694
|
-
V,
|
|
2695
|
-
D,
|
|
2696
|
-
I,
|
|
2697
|
-
z,
|
|
2698
2690
|
T,
|
|
2699
2691
|
B,
|
|
2692
|
+
C,
|
|
2693
|
+
z,
|
|
2694
|
+
I,
|
|
2695
|
+
F,
|
|
2696
|
+
D,
|
|
2700
2697
|
M,
|
|
2701
|
-
|
|
2702
|
-
x,
|
|
2698
|
+
L,
|
|
2703
2699
|
S,
|
|
2700
|
+
x,
|
|
2704
2701
|
Y,
|
|
2705
|
-
|
|
2702
|
+
V,
|
|
2706
2703
|
N,
|
|
2707
|
-
|
|
2708
|
-
O
|
|
2704
|
+
R,
|
|
2705
|
+
O,
|
|
2706
|
+
W
|
|
2709
2707
|
].forEach((o) => {
|
|
2710
2708
|
e.registerComponent(o), e.addBaseComponentTypes(o.defaultSchema.type);
|
|
2711
2709
|
}), e.setInitialized(!0);
|
|
2712
2710
|
}
|
|
2713
|
-
function
|
|
2711
|
+
function q(e) {
|
|
2714
2712
|
import("element-plus").then(({ provideGlobalConfig: l }) => {
|
|
2715
2713
|
l(e);
|
|
2716
2714
|
});
|
|
2717
2715
|
}
|
|
2718
2716
|
export {
|
|
2719
|
-
|
|
2720
|
-
|
|
2717
|
+
q as provideGlobalConfig,
|
|
2718
|
+
j as setupElementPlus
|
|
2721
2719
|
};
|
package/package.json
CHANGED
package/dist/index-BRZDZuxE.js
DELETED
package/dist/index-ETJEJKM_.cjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),M=require("./js.cookie-BH1G_HRi.cjs");function H(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 ee(t){return t.charAt(0).toUpperCase()+t.slice(1)}function k(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=>k(o,s));return s.set(t,n),n}const r={};return s.set(t,r),Object.keys(t).forEach(n=>{r[n]=k(t[n],s)}),r}function ve(t){const[s]=oe([k(t)],r=>{var o,a;const n={...r,id:`${r.type}_${H(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 Y(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 c=Object.keys(a).sort(),d={};return c.forEach(p=>{r.includes(p)||(d[p]=o(a[p]))}),n.delete(a),d}else return a};return JSON.stringify(o(t))===JSON.stringify(o(s))}function te(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 c=0;c<a.children.length&&(o(a.children[c]),!n);c++);if(!n&&a.slots)for(let c in a.slots)for(let d=0;d<a.slots[c].length&&(o(a.slots[c][d]),!n);d++);n||r.pop()}return t.forEach(o),n||console.error(`没有查询到id为${s}的节点`),r}function ge(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 ye(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 c=n[a];o[c]==null&&(o[c]=isNaN(Number(n[a+1]))?{}:[]),o=o[c]}return o[n[n.length-1]]=r,t}function we(t,s="default"){return ne(t,s).map(n=>n.field)}function ne(t,s="default"){const r=J(t,o=>{var a;return o.type==="form"&&(((a=o.componentProps)==null?void 0:a.name)??o.name===s)},!0);return J((r==null?void 0:r.children)??[],o=>!!o.input,!1,o=>o.type!=="subform")}function J(t,s,r=!1,n){const o=[],a=[...t];for(;a.length;){const c=a.pop();if(c!=null&&c.children&&(!n||n(c))&&a.push(...c.children),c!=null&&c.slots&&(!n||n(c)))for(let d in c.slots)a.push(...c.slots[d]);if(s(c)&&(o.push(c),r))return c}return r?!1:o}function oe(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 Se(t,s){const r=J(t,n=>n.id===s,!0);if(!r)throw new Error(`没有查询到id为${s}的节点`);return r}function Ee(t,s){const r=[{type:"",children:t}];let n=0,o=null;if(J(r,a=>{if(o=a.children??null,!o){if(a!=null&&a.slots)for(let c in a.slots){o=a.slots[c];for(let d=0;d<o.length;d++)if(o[d].id===s)return n=d,!0}return!1}for(let c=0;c<o.length;c++)if(o[c].id===s)return n=c,!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_"+H()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return s.schemas[0].children[0].children=z(t.list),s}function z(t,s){return t.map(r=>{var p,x,w;let n=r.type??"";const o=r.options??{},a=(l,C)=>{n===l&&(n=C,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:C}=o;o.autoSize={minRows:l,maxRows:C},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=H());const c={label:r.label,type:n,icon:r.icon||"",field:r.model,componentProps:o,id:r.key};return(o.noFormItem||!o.showLabel)&&(c.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)&&(c.input=!0,((x=(p=r.rules)==null?void 0:p[0])==null?void 0:x.required)===!1&&r.rules.shift(),((w=r.rules)==null?void 0:w.length)>0&&(c.rules=r.rules)),r.list&&(c.children=z(r.list,r)),r.columns&&(c.children=z(r.columns,r)),r.trs&&(c.children=z(r.trs,r)),r.tds&&(c.children=z(r.tds,r)),c})}function De(t,s){let r=null;return(...n)=>{r&&clearTimeout(r),r=setTimeout(()=>{t(...n)},s)}}function X(){const t=e.ref({}),s=e.ref({}),r=e.ref(!1),n=e.ref([]),o=e.reactive({});function a(h){return t.value[h]}function c(h,E){t.value[h]=E}function d(h){delete t.value[h]}function p(h,E=!1){const A=Object.entries(M.pluginManager.publicMethods).reduce((V,[u,O])=>(V[u]=O.handler,V),{});try{new Function(`const epic = this;${h}`).bind({...A,getComponent:a,find:a,defineExpose:x,publicMethods:A,pluginManager:M.pluginManager})()}catch(V){E&&console.error("[epic:自定义函数]异常:",V)}}function x(h){h!=null&&(s.value=h)}function w(h,...E){if(!h||h.length===0){console.warn("未提供任何动作");return}h.forEach(A=>{const V=A.args?JSON.parse(A.args):E;switch(A.type){case"public":l(A,V);break;case"custom":C(A,V);break;case"component":m(A,V);break;default:console.warn(`未知的动作类型: ${A.type}`);break}})}function l(h,E){var A;try{(A=M.pluginManager.publicMethods[h.methodName])==null||A.handler(...E)}catch(V){console.error(`[Epic:公共函数(${h.methodName})]执行异常:`,V)}}function C(h,E){var A,V;try{(V=(A=s.value)[h.methodName])==null||V.call(A,...E)}catch(u){console.error(`[Epic:自定义函数(${h.methodName})]执行异常:`,u)}}function m(h,E){const A=h.componentId!=null&&a(h.componentId);if(!A){console.warn(`[Epic:组件${h.componentId}]未找到`);return}try{A[h.methodName](...E)}catch(V){console.error(`[Epic:组件${h.componentId}函数(${h.methodName})]执行异常:`,V)}}function v(h=!0){r.value=h}function f(h){const E=J(h,()=>!0);n.value=E.map(A=>A.id)}function B(h,E="default"){if(o[E]){const A=o[E];$(h,A)}o[E]=h}function N(h,E="default"){if(o[E]){$(o[E],h,!1);return}o[E]=h}return{componentInstances:t,funcs:s,isDesignMode:r,defaultComponentIds:n,forms:o,addFormData:B,setFormData:N,getComponentInstance:a,find:a,addComponentInstance:c,removeComponentInstance:d,setMethods:p,doActions:w,setDesignMode:v,setDefaultComponentIds:f}}function re(){const t=e.ref([]),s=e.ref([]),r=e.ref(null);let n=0;function o(p,x="插入组件"){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:x,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 c(){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 d(){t.value=[],s.value=[],r.value=null}return{recordList:t,undoList:s,currentRecord:r,push:o,undo:a,redo:c,reset:d}}const Ae=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(),c=()=>{o("updateFormItemRef",a.value)};return(d,p)=>n.hasFormItem?(e.openBlock(),e.createBlock(e.unref(r),e.mergeProps({key:0,ref_key:"formItemRef",ref:a,onVnodeMounted:c},n.formItemProps),{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(d.$slots,"default",{key:1})}}),se=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 c=e.inject("slots",{}),d=e.inject("pageManager",{}),p=e.inject("disabled",{value:!1}),x=e.inject("ruleFieldPrefix",null),w=e.inject("resetFormData",!1);let l=e.reactive(k(n.componentSchema));v();async function C(i){if(["cascader","checkbox","select","radio"].includes(i.type)&&i.componentProps.dynamicId&&n.sourceDateUrl){const y=(await M.axios({url:n.sourceDateUrl,method:"get",params:{id:i.componentProps.dynamicId},headers:{Authorization:"Bearer "+M.api.get("Admin-Token")}})).data.data;let _=await M.axios({url:y.url,method:y.method,data:JSON.parse(y.body),params:JSON.parse(y.params),headers:{...JSON.parse(y.headers),Authorization:"Bearer "+M.api.get("Admin-Token")}});if(y&&(y!=null&&y.dataPath)){const pe=y.dataPath.split(".").reduce((me,he)=>me[he],_.data);i.componentProps.options=m(pe,y.dataKey,y.dataValue)}else i.componentProps.options=m(_.data,y.dataKey,y.dataValue);return i}return i}function m(i,b,I){return i&&Object.prototype.toString.call(i)==="[object Array]"?i.map(y=>y.children&&y.children.length?{label:y[b],value:y[I]+"",children:m(y.children,b,I)}:{label:y[b],value:y[I]+""}):[]}e.watch(()=>n.componentSchema,i=>{Y(l,i,["children"])||($(l,k(i)),v())},{deep:!0});function v(){d.isDesignMode.value&&typeof l.field=="string"&&(l.field+="-design-mode")}(n.resetFormData||w)&&(a={});const f=s,B=e.ref(),N=e.ref(),h=i=>{N.value=i},E=e.useAttrs();Object.keys(E).length&&e.provide("nodeAttrs",E);const A=e.shallowRef(null),V=e.computed(()=>{var i,b;return(i=l.componentProps)!=null&&i.hidden?!1:typeof l.show=="boolean"?l.show:((b=l.show)==null?void 0:b.call(l,{values:a}))??!0}),u=e.computed(()=>{var y;const i=V.value&&((y=l.rules)==null?void 0:y.map(_=>({..._,validator:_.validator&&d.funcs.value[_.validator]})));let b=l.field;n.ruleField?b=n.ruleField:x&&l.field&&(b=k(x),b.push(l.field));const I={...l,rules:i,rule:i,field:b};return I.children&&delete I.children,I}),O=e.computed(()=>{var I,y;const i=((I=S.value)==null?void 0:I.bindModel)??"modelValue",b={};return l.on&&Object.keys(l.on).forEach(_=>{b[`on${ee(_)}`]=(...q)=>d.doActions(l.on[_],...q)}),{...n,...l.componentProps,disabled:(p==null?void 0:p.value)||((y=l.componentProps)==null?void 0:y.disabled),bindModel:i,...b}}),S=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??""])&&F(o.value)}),e.watch(()=>B.value,()=>{P()},{immediate:!0});function P(){var b;const i=B.value||r;l.id&&i&&(l.input&&(i.setValue=F,i.getValue=()=>a[l.field]||n.modelValue),i.setAttr=(I,y)=>(l.componentProps||(l.componentProps={}),l.componentProps[I]=y),i.getAttr=I=>l.componentProps[I],d.addComponentInstance(l.id,i),(b=S.value)!=null&&b.defaultSchema.input&&l.noFormItem!==!0&&N.value&&d.addComponentInstance(l.id+"formItem",N.value))}function g(){var i;l.id&&(d.removeComponentInstance(l.id),(i=S.value)!=null&&i.defaultSchema.input&&l.noFormItem!==!0&&d.removeComponentInstance(l.id+"formItem"))}async function R(){var b,I,y;if(l=await C(l),typeof((b=l.componentProps)==null?void 0:b.defaultValue)<"u"){const _=d.isDesignMode.value?(I=l.componentProps)==null?void 0:I.defaultValue:a[l.field]??((y=l.componentProps)==null?void 0:y.defaultValue);F(k(_))}if(l.type==="slot"){const _=l.slotName;if(!_)return;A.value=e.defineComponent({setup(){return()=>e.renderSlot(c,_,{componentSchema:l,model:a})}});return}const i=M.pluginManager.getComponent(l.type);if(!i){console.error(`组件${l.type}未注册`);return}if(typeof i=="function"){const _=await i();A.value=_.default??_}else A.value=i}function D(i){Object.prototype.toString.call(i),Object.prototype.toString.call(i)==="[object Array]"?i.forEach(b=>{a[b.value]=b.label}):a[i.value]=i.label,M.EventBus.emit("updateformData"+n.id,a)}function F(i){f("update:modelValue",i),f("change",i),l.field&&(a[l.field]=i),M.EventBus.emit("updateformData"+n.id,a)}function U(i){f("update:dynamicId",i)}let T=null;return e.watch(()=>l,async i=>{const b=JSON.stringify({...i,children:void 0,componentProps:{...i.componentProps,options:null}});if(b===T)return!1;T=b,R()},{immediate:!0,deep:!0}),e.onUnmounted(g),(i,b)=>{var y;const I=e.resolveComponent("ENode");return A.value&&V.value?(e.openBlock(),e.createBlock(Ae,{key:0,hasFormItem:e.unref(l).noFormItem!==!0&&((y=S.value)==null?void 0:y.defaultSchema.input),formItemProps:u.value,onUpdateFormItemRef:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A.value),e.mergeProps({ref_key:"componentInstance",ref:B,onVnodeMounted:P,model:e.unref(a)},{...O.value},{[O.value.bindModel]:o.value,["onUpdate:"+O.value.bindModel]:b[0]||(b[0]=_=>o.value=_),[`onUpdate:${O.value.bindModel}`||""]:F,"onUpdate:modelValueLabel":D,"onUpdate:dynamicId":U}),{node:e.withCtx(_=>[e.createVNode(I,e.mergeProps({id:n.id},_,{sourceDateUrl:n.sourceDateUrl}),null,16,["id","sourceDateUrl"])]),"edit-node":e.withCtx(()=>[e.renderSlot(i.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function xe(){const t=e.ref(!1),s=X(),r=e.ref({});function n(){return new Promise(m=>{if(t.value)m();else{const v=e.watch(t,()=>{v(),m()})}})}async function o(m="default"){var f;await n();const v=(f=r.value)==null?void 0:f[m];if(!v)throw new Error(`表单 [name=${m}] 不存在`);return v}async function a(m,v){const f=await o(m);return k(await v(f))}async function c(m="default"){return await a(m,v=>v.getData())}function d(m,v="default",f=void 0){var B,N;if(f&&Object.keys(f).length){let h=function(u){let O=[];return u.forEach(S=>{S.children&&(O=[...O,...h(S.children)]),O.push(S)}),O},A=function(u){var S;let O=h((S=f==null?void 0:f.schemas[0])==null?void 0:S.children);return Object.keys(u).forEach(P=>{var D,F,U,T,i,b,I;const g=O.find(y=>y.field===P),R=["datetimerange","daterange","monthrange","dates"];if((g&&(g==null?void 0:g.type)==="checkbox"||(g==null?void 0:g.type)==="select"&&((D=g==null?void 0:g.componentProps)!=null&&D.multiple)||(g==null?void 0:g.type)==="cascader"&&!((U=(F=g==null?void 0:g.componentProps)==null?void 0:F.props)!=null&&U.multiple)||(g==null?void 0:g.type)==="date"&&R.includes((T=g==null?void 0:g.componentProps)==null?void 0:T.type))&&typeof u[P]=="string")u[P]=(i=u[P])==null?void 0:i.split(",");else if((g==null?void 0:g.type)==="cascader"&&((I=(b=g==null?void 0:g.componentProps)==null?void 0:b.props)!=null&&I.multiple)&&typeof u[P]=="string")u[P].indexOf(";")>-1?u[P]=u[P].split(";").map(y=>y.split(",")):u[P]=u[P].split(","),u[P].indexOf(";")>-1?u[P]=u[P].split(";").map(y=>y.split(",")):u[P]=u[P].split(",");else if(((g==null?void 0:g.type)==="upload-image"||(g==null?void 0:g.type)==="upload-file")&&typeof u[P]=="string"){let y=[];Object.entries(u).forEach(([_,q])=>{u[P]===q&&_!==g.field&&(y=_.split("@")[1].split(","))}),u[P]=u[P].split(",").map((_,q)=>({url:_,name:y[q]}))}else(g==null?void 0:g.type)==="number"||(g==null?void 0:g.type)==="slider"?u[P]=Number(u[P]):(g==null?void 0:g.type)==="switch"&&(u[P]=typeof u[P]=="boolean"?u[P]:u[P].indexOf("true")>-1)}),u}(m);s.setFormData(A,v);const V=(B=r.value)==null?void 0:B[v];V==null||V.clearValidate()}else{s.setFormData(m,v);const h=(N=r.value)==null?void 0:N[v];h==null||h.clearValidate()}}async function p(m="default"){return await a(m,async v=>(await v.validate(),await v.getData()))}async function x(m){await n();const v={};for(const f in r.value){const B=r.value[f];B&&(v[f]=k(await m(B)))}return v}async function w(){return await x(m=>m.getData())}function l(m){for(const v in m)d(m[v],v)}async function C(){return await x(async m=>(await m.validate(),await m.getData()))}return{ready:t,pageManager:s,forms:r,getData:c,setData:d,validate:p,getForms:w,setForms:l,validateAll:C,getFormInstance:o}}const Pe={key:0,class:"epic-loading-box"},be={class:"epic-builder-main"},Ie={class:"epic-loading-box"},ae=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:c,forms:d,getData:p,setData:x,validate:w,getForms:l,setForms:C,validateAll:m,getFormInstance:v}=xe(),f=t,B=e.reactive({schemas:[]});e.watch(()=>f.pageSchema,u=>{$(B,u)},{immediate:!0,deep:!0}),e.watch(()=>f.formData,u=>{if(u){let O=h(u);x(O)}},{immediate:!0,deep:!0});function N(u){let O=[];return u.forEach(S=>{S.children&&(O=[...O,...N(S.children)]),O.push(S)}),O}function h(u){let O=N(f.pageSchema.schemas[0].children);return Object.keys(u).forEach(S=>{var P,g,R,D,F,U,T;if(S.indexOf("@")<0){const i=O.find(I=>I.field===S),b=["datetimerange","daterange","monthrange","dates"];if((i&&(i==null?void 0:i.type)==="checkbox"||(i==null?void 0:i.type)==="select"&&((P=i==null?void 0:i.componentProps)!=null&&P.multiple)||(i==null?void 0:i.type)==="cascader"&&!((R=(g=i==null?void 0:i.componentProps)==null?void 0:g.props)!=null&&R.multiple)||(i==null?void 0:i.type)==="date"&&b.includes((D=i==null?void 0:i.componentProps)==null?void 0:D.type))&&typeof u[S]=="string")u[S]=(F=u[S])==null?void 0:F.split(",");else if((i==null?void 0:i.type)==="cascader"&&((T=(U=i==null?void 0:i.componentProps)==null?void 0:U.props)!=null&&T.multiple)&&typeof u[S]=="string")u[S].indexOf(";")>-1?u[S]=u[S].split(";").map(I=>I.split(",")):u[S]=u[S].split(","),u[S].indexOf(";")>-1?u[S]=u[S].split(";").map(I=>I.split(",")):u[S]=u[S].split(",");else if(((i==null?void 0:i.type)==="upload-image"||(i==null?void 0:i.type)==="upload-file")&&typeof u[S]=="string"){let I=[];Object.entries(u).forEach(([y,_])=>{u[S]===_&&y!==i.field&&(I=y.split("@")[1].split(","))}),u[S]=u[S].split(",").map((y,_)=>({url:y,name:I[_]}))}else(i==null?void 0:i.type)==="number"||(i==null?void 0:i.type)==="slider"?u[S]=Number(u[S]):(i==null?void 0:i.type)==="switch"&&(u[S]=typeof u[S]=="boolean"?u[S]:u[S].indexOf("true")>-1)}}),u}e.watch(()=>B.script,u=>{u&&c.setMethods(u,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",c),e.provide("forms",d),e.provide("pageSchema",B),e.provide("disabled",e.computed(()=>f.disabled));const E=e.getCurrentInstance(),A=E==null?void 0:E.proxy;function V(){e.nextTick(()=>{a.value=!0,o("ready",c),A&&c.addComponentInstance("builder",A)})}return M.EventBus.on("updateformData"+f.id,u=>{o("change",u)}),s({ready:a,pageManager:c,getData:p,setData:x,validate:w,getForms:l,setForms:C,validateAll:m,getFormInstance:v}),(u,O)=>e.unref(M.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:V},{default:e.withCtx(()=>[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.schemas,(S,P)=>(e.openBlock(),e.createBlock(e.unref(se),{id:f.id,key:P,sourceDateUrl:f.sourceDateUrl,componentSchema:S},null,8,["id","sourceDateUrl","componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(e.unref(n))])]),_:1})):(e.openBlock(),e.createElementBlock("div",Pe))}});function j(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function Ve(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))),j(o),r)}function W(t){return typeof t=="function"?t():e.unref(t)}const _e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Me=t=>typeof t<"u",Be=Object.prototype.toString,Oe=t=>Be.call(t)==="[object Object]",Ne=()=>{};function Fe(t){return e.getCurrentInstance()}function ke(t,s=!0,r){Fe()?e.onMounted(t,r):s?t():e.nextTick(t)}function Re(t=!1,s={}){const{truthyValue:r=!0,falsyValue:n=!1}=s,o=e.isRef(t),a=e.ref(t);function c(d){if(arguments.length)return a.value=d,a.value;{const p=W(r);return a.value=a.value===p?W(n):p,a.value}}return o?c:[a,c]}function $e(t,s,r){const n=e.watch(t,(...o)=>(e.nextTick(()=>n()),s(...o)),r);return n}const Z=_e?window:void 0;function L(t){var s;const r=W(t);return(s=r==null?void 0:r.$el)!=null?s:r}function Te(...t){let s,r,n,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,o]=t,s=Z):[s,r,n,o]=t,!s)return Ne;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],c=()=>{a.forEach(w=>w()),a.length=0},d=(w,l,C,m)=>(w.addEventListener(l,C,m),()=>w.removeEventListener(l,C,m)),p=e.watch(()=>[L(s),W(o)],([w,l])=>{if(c(),!w)return;const C=Oe(l)?{...l}:l;a.push(...r.flatMap(m=>n.map(v=>d(w,m,v,C))))},{immediate:!0,flush:"post"}),x=()=>{p(),c()};return j(x),x}function Ue(t){return typeof t=="function"?t:typeof t=="string"?s=>s.key===t:Array.isArray(t)?s=>t.includes(s.key):()=>!0}function le(...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=Z,eventName:a="keydown",passive:c=!1,dedupe:d=!1}=n,p=Ue(s);return Te(o,a,w=>{w.repeat&&W(d)||p(w)&&r(w)},c)}function Q(t,s,r={}){return le(t,s,{...r,eventName:"keydown"})}function G(t,s,r={}){return le(t,s,{...r,eventName:"keyup"})}function Le(){const t=e.ref(!1),s=e.getCurrentInstance();return s&&e.onMounted(()=>{t.value=!0},s),t}function qe(t){const s=Le();return e.computed(()=>(s.value,!!t()))}function ze(t){return JSON.parse(JSON.stringify(t))}function ie(t,s,r={}){const{window:n=Z,...o}=r;let a;const c=qe(()=>n&&"ResizeObserver"in n),d=()=>{a&&(a.disconnect(),a=void 0)},p=e.computed(()=>{const l=W(t);return Array.isArray(l)?l.map(C=>L(C)):[L(l)]}),x=e.watch(p,l=>{if(d(),c.value&&n){a=new ResizeObserver(s);for(const C of l)C&&a.observe(C,o)}},{immediate:!0,flush:"post"}),w=()=>{d(),x()};return j(w),{isSupported:c,stop:w}}function Je(t,s={width:0,height:0},r={}){const{window:n=Z,box:o="content-box"}=r,a=e.computed(()=>{var l,C;return(C=(l=L(t))==null?void 0:l.namespaceURI)==null?void 0:C.includes("svg")}),c=e.ref(s.width),d=e.ref(s.height),{stop:p}=ie(t,([l])=>{const C=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(n&&a.value){const m=L(t);if(m){const v=m.getBoundingClientRect();c.value=v.width,d.value=v.height}}else if(C){const m=Array.isArray(C)?C:[C];c.value=m.reduce((v,{inlineSize:f})=>v+f,0),d.value=m.reduce((v,{blockSize:f})=>v+f,0)}else c.value=l.contentRect.width,d.value=l.contentRect.height},r);ke(()=>{const l=L(t);l&&(c.value="offsetWidth"in l?l.offsetWidth:s.width,d.value="offsetHeight"in l?l.offsetHeight:s.height)});const x=e.watch(()=>L(t),l=>{c.value=l?s.width:0,d.value=l?s.height:0});function w(){p(),x()}return{width:c,height:d,stop:w}}function We(t,s,r,n={}){var o,a,c;const{clone:d=!1,passive:p=!1,eventName:x,deep:w=!1,defaultValue:l,shouldEmit:C}=n,m=e.getCurrentInstance(),v=r||(m==null?void 0:m.emit)||((o=m==null?void 0:m.$emit)==null?void 0:o.bind(m))||((c=(a=m==null?void 0:m.proxy)==null?void 0:a.$emit)==null?void 0:c.bind(m==null?void 0:m.proxy));let f=x;s||(s="modelValue"),f=f||`update:${s.toString()}`;const B=E=>d?typeof d=="function"?d(E):ze(E):E,N=()=>Me(t[s])?B(t[s]):l,h=E=>{C?C(E)&&v(f,E):v(f,E)};if(p){const E=N(),A=e.ref(E);let V=!1;return e.watch(()=>t[s],u=>{V||(V=!0,A.value=B(u),e.nextTick(()=>V=!1))}),e.watch(A,u=>{!V&&(u!==t[s]||w)&&h(u)},{deep:w}),A}else return e.computed({get(){return N()},set(E){h(E)}})}function He(){const{isDark:t}=K(),s=Re(t);return{isDark:t,toggleDark:s}}function ce(){const t=e.ref(!1);return e.onMounted(()=>{ue(t),Ke(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function ue(t){var s=document.documentElement;s&&(s.classList.contains("dark")?t.value=!0:t.value=!1)}function Ke(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 de(){const t=e.ref(1),s=e.ref(!1),{isDark:r}=ce(),{pressSpace:n,pressShift:o,pressCtrl:a}=fe();return{canvasScale:t,pressSpace:n,pressShift:o,pressCtrl:a,disabledZoom:s,isDark:r}}const K=Ve(de);function fe(){const t=e.ref(!1),s=e.ref(!1),r=e.ref(!1);return Q(" ",()=>{t.value=!0}),G(" ",()=>{t.value=!1}),Q("Shift",n=>{n.preventDefault(),s.value=!0}),G("Shift",()=>{s.value=!1}),Q("Control",n=>{n.preventDefault(),r.value=!0}),G("Control",()=>{r.value=!1}),{pressSpace:t,pressShift:s,pressCtrl:r}}function Ze(t){const{pressSpace:s}=K(),r=new Image(1,1);r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let n=0,o=0;function a(p){var x;s.value&&(n=p.x,o=p.y,(x=p.dataTransfer)==null||x.setDragImage(document.createElement("div"),0,0))}function c(p){if(p.preventDefault(),!p.x||!p.y||!s.value)return;const x=p.x-n,w=p.y-o;n=p.x,o=p.y,t.value&&(t.value.scrollTop-=w,t.value.scrollLeft-=x)}function d(){s.value=!1}return{handleElementDragStart:a,handleElementDrag:c,handleElementDragEnd:d}}function Qe(t){const{pressCtrl:s,canvasScale:r,disabledZoom:n}=K();function o(a){if(!s.value||n.value)return;a.preventDefault();let c=0;a.deltaY<0?c=r.value+.05:c=r.value-.05,!(c>150||c<.5)&&(r.value=c)}return e.watch(()=>r.value,a=>{t.value&&!n.value&&(t.value.style.transform=`scale(${a})`)}),{handleZoom:o,canvasScale:r}}function Ge(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 Ye={class:"min-w-750px rounded"},Xe={class:"h-full rounded"},je=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),c=e.ref(!1),d=e.ref({}),p=e.inject("pageSchema"),x=e.ref(null),w=e.ref("");function l(){c.value=!1}function C(){a.value=!1}function m(){a.value=!0,w.value=H()}async function v(){try{let f=await x.value.validateAll();if(!Object.keys(f).length){alert("请添加表单组件后再尝试!");return}Object.keys(f).length===1&&(f=f.default),d.value=JSON.stringify(f,null,2),e.nextTick(()=>{var B;(B=o.value)==null||B.setValue(d.value)}),c.value=!0}catch(f){console.error(f)}}return s({handleOpen:m}),(f,B)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:a.value,"onUpdate:modelValue":B[1]||(B[1]=N=>a.value=N),title:"预览",class:"w-900px",width:"900px",onClose:C,onOk:v,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[(e.openBlock(),e.createBlock(e.unref(ae),{key:w.value,ref_key:"kb",ref:x,"page-schema":e.unref(p)},null,8,["page-schema"])),e.createVNode(e.unref(n),{modelValue:c.value,"onUpdate:modelValue":B[0]||(B[0]=N=>c.value=N),title:"表单数据",class:"w-860px",width:"860px",onClose:l,onOk:l},{default:e.withCtx(()=>[e.createElementVNode("div",Xe,[e.createVNode(e.unref(r),{ref_key:"monacoEditorRef",ref:o,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":d.value},null,8,["model-value"])])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]))}}),et={key:0,class:"epic-loading-box"},tt={class:"epic-designer-main"},nt={class:"epic-header-container"},ot={class:"epic-loading-box"},rt=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-sKJ91s0r.cjs"))),o=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BSLudrcT.cjs"))),a=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Bmo9n7ut.cjs"))),c=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-HNPgHrkl.cjs"))),d=M.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),p=X(),x=re(),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 C=r,m=e.ref(null),v=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),f=e.reactive({schemas:[],script:l.script}),{disabledZoom:B}=K();e.watchEffect(()=>{B.value=w.disabledZoom}),e.watchEffect(()=>{const D=f.script;D&&D!==""&&p.setMethods(D)}),e.provide("pageSchema",f),e.provide("revoke",x),e.provide("pageManager",p),e.provide("designerProps",e.computed(()=>w)),e.provide("designer",{setCheckedNode:h,setHoverNode:E,setDisableHover:V,handleToggleDeviceMode:g,reset:S,state:v}),M.EventBus.on("saveSourceData",D=>{C("saveSourceData",D)}),M.EventBus.on("deleteSourceData",D=>{C("deleteSourceData",D)}),M.EventBus.on("updateSourceData",D=>{C("updateSourceData",D)});function N(){f.schemas=k(l.schemas),h(f.schemas[0]),x.push(f.schemas,"初始化撤销功能")}async function h(D=f.schemas[0]){v.checkedNode=D,v.matched=te(f.schemas,D.id)}async function E(D=null){var F;if(!D||v.disableHover)return v.hoverNode=null,!1;if((D==null?void 0:D.id)===((F=v.hoverNode)==null?void 0:F.id))return!1;v.hoverNode=D}function A(){e.nextTick(()=>{C("ready",{pageManager:p})})}async function V(D=!1){v.disableHover=D}function u(D){$(f,k(D))}function O(){return e.toRaw(f)}function S(){Y(f.schemas,l.schemas)&&f.script===l.script||($(f.schemas,l.schemas),f.script=l.script,h(f.schemas[0]),x.push(f.schemas,"重置操作"),C("reset",f))}function P(){C("save",e.toRaw(f))}function g(D){C("toggleDeviceMode",D)}function R(){m.value.handleOpen()}return N(),s({revoke:x,setData:u,getData:O,reset:S,preview:R}),(D,F)=>e.unref(M.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:A},{default:e.withCtx(()=>[e.createElementVNode("div",tt,[e.createElementVNode("div",nt,[e.renderSlot(D.$slots,"header",{},()=>[w.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n),{key:0,onPreview:R,onSave:P},{header:e.withCtx(()=>[e.renderSlot(D.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(D.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(D.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(D.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(D.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(D.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":D.hiddenHeader}])},[e.createVNode(e.unref(o)),e.createVNode(e.unref(a)),e.createVNode(e.unref(c))],2),e.createVNode(je,{ref_key:"previewRef",ref:m},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",ot,[e.createVNode(e.unref(d))])]),_:3})):(e.openBlock(),e.createElementBlock("div",et))}}),st={component:async()=>await Promise.resolve().then(()=>require("./index-Bdnc9TGH.cjs")),defaultSchema:{label:"代码编辑器",type:"monacoEditor",field:"monacoEditor",icon:"epic-icon-write",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"monacoEditor",field:"componentProps.defaultValue"}]},bindModel:"model-value"},at={component:async()=>await Promise.resolve().then(()=>require("./index-Ch9jeYmj.cjs")),defaultSchema:{label:"页面",type:"page",componentProps:{},children:[]},config:{attribute:[{label:"页面名称",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.name"}]}};function lt(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-CucdgcqX.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-baUE53XK.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-B-Uox2mn.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-9VqDmCT_.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-BbCEtCJA.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-0RqJEjlH.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-DEPx91yu.cjs"))),t.registerActivitybar({id:"component_view",title:"组件",icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-BGT2-jZP.cjs"))}),t.registerActivitybar({id:"outline_view",title:"大纲",icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-6Qt3qlWm.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:"属性",component:async()=>await Promise.resolve().then(()=>require("./attributeView-CA-6yB0k.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-CXdgqy6O.cjs"))}),[st,at].forEach(r=>{t.registerComponent(r)})}lt(M.pluginManager);exports._sfc_main=se;exports._sfc_main$1=ae;exports._sfc_main$2=rt;exports.capitalizeFirstLetter=ee;exports.convertKFormData=Ce;exports.debounce=De;exports.deepClone=k;exports.deepCompareAndModify=$;exports.deepEqual=Y;exports.findSchemaById=Se;exports.findSchemaInfoById=Ee;exports.findSchemas=J;exports.generateNewSchema=ve;exports.getDarkState=ue;exports.getFormFields=we;exports.getFormSchemas=ne;exports.getMatchedById=te;exports.getUUID=H;exports.getValueByPath=ge;exports.initStore=de;exports.mapSchemas=oe;exports.recursionConvertedNode=z;exports.setValueByPath=ye;exports.useDark=ce;exports.useElementDrag=Ze;exports.useElementSize=Je;exports.useElementZoom=Qe;exports.useKeyPress=fe;exports.usePageManager=X;exports.useResizeObserver=ie;exports.useRevoke=re;exports.useStore=K;exports.useTheme=He;exports.useTimedQuery=Ge;exports.useVModel=We;exports.watchOnce=$e;
|