epic-designer-gold 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{attributeView-DVqMH1xY.js → attributeView-CbSIfYvE.js} +1 -1
  2. package/dist/{attributeView-CkX6fubE.cjs → attributeView-D3Qsq4Rp.cjs} +1 -1
  3. package/dist/{index-DWA3Pa6_.cjs → index-B-S6G7Gm.cjs} +1 -1
  4. package/dist/{index-B07zwTz2.js → index-BB9BbwOP.js} +1 -1
  5. package/dist/{index-QcfCoknU.js → index-BM1LEAru.js} +488 -470
  6. package/dist/index-BOvRFBhF.js +4 -0
  7. package/dist/{index-i26diW3P.cjs → index-BUnjVAci.cjs} +1 -1
  8. package/dist/{index-BqPBE6Y2.cjs → index-BmpuQvz8.cjs} +1 -1
  9. package/dist/{index-BGKInHWa.js → index-C0duQEvM.js} +1 -1
  10. package/dist/{index-CY8bzSIr.js → index-C1u693vR.js} +1 -1
  11. package/dist/{index-BvRS3i9N.cjs → index-C8_KPCGF.cjs} +1 -1
  12. package/dist/{index-C8_p36X3.js → index-CIH4lXfN.js} +1 -1
  13. package/dist/{index-bup0iSFb.js → index-CvItX-Z6.js} +1 -1
  14. package/dist/{index-CYyckZuN.js → index-DFKDDX_i.js} +1 -1
  15. package/dist/{index-C7Rkr11-.cjs → index-DIq67rZG.cjs} +1 -1
  16. package/dist/{index-DQBowkLQ.js → index-Dtw63_EC.js} +1 -1
  17. package/dist/{index-BffcOK9E.cjs → index-DuajNE8y.cjs} +1 -1
  18. package/dist/index-KtgsmKhr.cjs +10 -0
  19. package/dist/{index-CKl_FM23.cjs → index-ZvngKPSa.cjs} +1 -1
  20. package/dist/{index-Bl9bHpGb.cjs → index-qZR6iV6F.cjs} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/{radio-ChBAvqeY.js → radio-B_7sUIiA.js} +1 -3
  24. package/dist/sign-BCmA2v-3.cjs +1 -0
  25. package/dist/sign-CSv8hClp.js +149 -0
  26. package/dist/style.css +1 -1
  27. package/dist/{styleView-DNbMFObZ.js → styleView-CW7dFXBf.js} +1 -1
  28. package/dist/{styleView-D_DJWtjt.cjs → styleView-CWElODVj.cjs} +1 -1
  29. package/dist/ui/elementPlus/index.cjs +1 -1
  30. package/dist/ui/elementPlus/index.js +2 -2
  31. package/package.json +1 -1
  32. package/dist/index-rlyOYH5_.cjs +0 -10
  33. package/dist/index-zlm7L3aS.js +0 -4
  34. package/dist/sign-BDZCr3wJ.js +0 -137
  35. package/dist/sign-Gwu2PIRy.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";var s=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var f=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of u(l))!b.call(e,t)&&t!==o&&r(e,t,{get:()=>l[t],enumerable:!(a=d(l,t))||a.enumerable});return e};var p=(e,l,o)=>(o=e!=null?s(m(e)):{},f(l||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("epic-designer-gold"),n=require("element-plus"),h={component:async()=>(await import("element-plus")).ElInput,groupName:"表单",icon:"icon--epic--border-color-outline-rounded",sort:700,defaultSchema:{label:"输入框",type:"input",field:"input",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"input",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"输入类型",type:"select",defaultValue:"text",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"text",value:"text"},{label:"number",value:"number"},{label:"password",value:"password"}]},field:"componentProps.type"},{label:"显示切换图标",type:"switch",field:"componentProps.showPassword",show:({values:e})=>e.componentProps.type==="password"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值时"},{type:"change",describe:"值修改时"},{type:"focus",describe:"获取焦点时"},{type:"blur",describe:"失去焦点时"},{type:"clear",describe:"点击清空按钮时"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},P={component:async()=>(await import("element-plus")).ElInput,icon:"icon--epic--edit-square-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"文本域",type:"textarea",field:"textarea",input:!0,componentProps:{placeholder:"请输入",type:"textarea"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"textarea",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"最小行数",type:"number",field:"componentProps.autosize.minRows",componentProps:{placeholder:"请输入"}},{label:"最大行数",type:"number",field:"componentProps.autosize.maxRows",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值"},{type:"change",describe:"值修改"},{type:"focus",describe:"获取焦点"},{type:"blur",describe:"失去焦点"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},v={component:async()=>(await import("element-plus")).ElInputNumber,groupName:"表单",icon:"icon--epic--123-rounded",sort:710,defaultSchema:{label:"数字输入框",type:"number",field:"number",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"number",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"控制按钮位置",type:"select",defaultValue:"",componentProps:{options:[{label:"default",value:""},{label:"right",value:"right"}],placeholder:"请选择",clearable:!0},field:"componentProps.controlsPosition"},{label:"精度",type:"number",field:"componentProps.precision",componentProps:{placeholder:"请输入"}},{label:"输入控制为步长的倍数",type:"switch",field:"componentProps.stepStrictly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},w={component:()=>Promise.resolve().then(()=>require("../../form-CthzLIgs.cjs")),groupName:"表单",icon:"icon--epic--list-alt-outline-rounded",sort:600,defaultSchema:{label:"表单",type:"form",componentProps:{name:"default",labelWidth:"100px","label-position":"left"},children:[]},config:{attribute:[{label:"Name",type:"input",field:"componentProps.name"},{label:"标签位置",type:"radio",field:"componentProps.label-position",componentProps:{clearable:!0,radioButton:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"},{label:"顶部",value:"top"}]}},{label:"标签宽度",type:"EInputSize",field:"componentProps.labelWidth"},{label:"标签后缀",type:"input",field:"componentProps.labelSuffix",componentProps:{placeholder:"请输入"}},{label:"表单尺寸",type:"select",field:"componentProps.size",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]}},{label:"星号位置",type:"select",field:"componentProps.require-asterisk-position",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"}]}},{label:"行内展示校验信息",type:"switch",field:"componentProps.inline-message"},{label:"校验反馈图标",type:"switch",field:"componentProps.status-icon"},{label:"滚动校验错误处",type:"switch",field:"componentProps.scroll-to-error"},{label:"行内模式",type:"switch",field:"componentProps.inline"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},g={component:()=>Promise.resolve().then(()=>require("../../formItem-BVnNs1Q9.cjs")),defaultSchema:{label:"表单项",type:"form-item"},config:{}},E={component:()=>Promise.resolve().then(()=>require("../../button-Cc4KYk3v.cjs")),groupName:"表单",icon:"icon--epic--fit-screen-rounded",sort:1200,defaultSchema:{label:"按钮",type:"button",field:"input",input:!1},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},field:"componentProps.type"},{label:"操作类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"button",value:"button"},{label:"submit",value:"submit"},{label:"reset",value:"reset"}]},field:"componentProps.native-type"},{label:"自定义颜色",type:"color-picker",field:"componentProps.color",componentProps:{type:"color"}},{label:"朴素按钮",type:"switch",field:"componentProps.plain"},{label:"圆角按钮",type:"switch",field:"componentProps.round"},{label:"圆形按钮",type:"switch",field:"componentProps.circle"},{label:"文字按钮",type:"switch",field:"componentProps.text"},{label:"加载状态",type:"switch",field:"componentProps.loading"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],event:[{type:"click",describe:"点击按钮时"},{type:"dblclick",describe:"双击按钮时"}]}},S={component:()=>Promise.resolve().then(()=>require("../../card-BowzD9vN.cjs")),groupName:"布局",icon:"icon--epic--wysiwyg-rounded",sort:700,defaultSchema:{label:"卡片布局",type:"card",children:[],componentProps:{}},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"阴影时机",type:"select",componentProps:{options:[{label:"always",value:"always"},{label:"hover",value:"hover"},{label:"never",value:"never"}],placeholder:"请选择",clearable:!0},field:"componentProps.shadow"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},x={component:()=>Promise.resolve().then(()=>require("../../row-NNlPGZRG.cjs")),groupName:"布局",icon:"icon--epic--width-normal-outline",sort:800,defaultSchema:{label:"栅格布局",type:"row",children:[{type:"col",children:[],componentProps:{span:12}},{type:"col",children:[],componentProps:{span:12}}]},editConstraints:{childImmovable:!0},config:{attribute:[{label:"垂直对齐方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}],placeholder:"请选择"},field:"componentProps.align"},{label:"水平排列方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}],placeholder:"请选择"},field:"componentProps.justify"},{label:"栅格间距",type:"number",field:"componentProps.gutter",componentProps:{placeholder:"请输入"}},{label:"列编辑",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},Y={component:()=>Promise.resolve().then(()=>require("../../col-B1GUMkMK.cjs")),defaultSchema:{label:"栅格布局-列",type:"col",children:[],componentProps:{span:6}},config:{attribute:[{label:"占位格数",type:"number",field:"componentProps.span"}]}},V={component:()=>Promise.resolve().then(()=>require("../../select-D6bRz5G2.cjs")),groupName:"表单",icon:"icon--epic--select",sort:900,defaultSchema:{label:"选择框",type:"select",field:"select",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],dynamicId:"",placeholder:"请选择",size:"default",effect:"light",placement:"bottom-start"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"select",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可多选",type:"switch",field:"componentProps.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"多选隐藏",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.multiple},{label:"隐藏提示",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.multiple&&e.componentProps.collapseTags},{label:"保留搜索关键字",type:"switch",field:"componentProps.reserveKeyword",show:({values:e})=>e.componentProps.multiple},{label:"标签类型",type:"select",defaultValue:"info",componentProps:{options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},show:({values:e})=>e.componentProps.multiple,field:"componentProps.tagType"},{label:"多选限制",type:"number",field:"componentProps.multipleLimit",show:({values:e})=>e.componentProps.multiple},{label:"提示主题",type:"select",componentProps:{options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]},field:"componentProps.effect"},{label:"可筛选",type:"switch",field:"componentProps.filterable"},{label:"允许创建条目",type:"switch",field:"componentProps.allowCreate"},{label:"下拉框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"下拉框宽度与输入框相同",type:"switch",field:"componentProps.fitInputWidth"},{label:"无数据时文本",type:"input",field:"componentProps.noDataText",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},C={component:()=>Promise.resolve().then(()=>require("../../radio-D3AHEMXb.cjs")),groupName:"表单",icon:"icon--epic--radio-button-checked-outline",sort:850,defaultSchema:{label:"单选框",type:"radio",field:"radio",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],size:"default"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"radio",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},k={component:()=>Promise.resolve().then(()=>require("../../checkbox-CMr5pERY.cjs")),groupName:"表单",icon:"icon--epic--dialogs-outline-rounded",sort:860,defaultSchema:{label:"复选框",type:"checkbox",field:"checkbox",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}]}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"checkbox",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大选中数",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小选中数",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},T={component:async()=>(await import("element-plus")).ElSlider,groupName:"表单",icon:"icon--epic--switches",sort:930,defaultSchema:{label:"滑块",type:"slider",field:"slider",input:!0,componentProps:{placement:"top-start",showTooltip:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"slider",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.max"),t=o.value[a];t.componentProps={min:e},(l.componentProps.max??0)<e&&(l.componentProps.max=e)}},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.min"),t=o.value[a];t.componentProps={max:e},(l.componentProps.min??0)>e&&(l.componentProps.min=e)}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"显示间断点",type:"switch",field:"componentProps.showStops"},{label:"提示信息",type:"switch",field:"componentProps.showTooltip"},{label:"开启选择范围",type:"switch",field:"componentProps.range"},{label:"垂直模式",type:"switch",field:"componentProps.vertical"},{label:"高度",type:"EInputSize",field:"componentProps.height",show:({values:e})=>e.componentProps.vertical},{label:"显示数字框",type:"switch",field:"componentProps.showInput",onChange:({value:e,values:l})=>{e&&(l.componentProps.showInputControls=!0)}},{label:"控制按钮",type:"switch",field:"componentProps.showInputControls",show:({values:e})=>e.componentProps.showInput},{label:"提示框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"input",describe:"拖拽实时触发"},{type:"change",describe:"拖拽结束改变值时"}]}},D={component:async()=>(await import("element-plus")).ElColorPicker,groupName:"表单",icon:"icon--epic--palette-outline",sort:950,defaultSchema:{label:"颜色选择器",type:"color-picker",field:"color-picker",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"color-picker",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"格式",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},field:"componentProps.colorFormat"},{label:"透明度选择",type:"switch",field:"componentProps.showAlpha"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}],action:[]}},I={component:async()=>(await import("element-plus")).ElSwitch,groupName:"表单",icon:"icon--epic--toggle-off-outline",sort:930,defaultSchema:{label:"开关",type:"switch",field:"switch",input:!0,componentProps:{defaultValue:!1}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"switch",field:"componentProps.defaultValue"},{label:"ON状态值",type:"input",field:"componentProps.activeValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"OFF状态值",type:"input",field:"componentProps.inactiveValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"ON状态描述",type:"input",field:"componentProps.activeText",componentProps:{placeholder:"请输入"}},{label:"OFF状态描述",type:"input",field:"componentProps.inactiveText",componentProps:{placeholder:"请输入"}},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"宽度",type:"number",field:"componentProps.width",componentProps:{min:50,placeholder:"请输入"}},{label:"文本点内显示",type:"switch",field:"componentProps.inlinePrompt"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"boolean"}}],event:[{type:"change",describe:"状态发生变化时"}]}};function c(e){var o;let l=((o=e.values.componentProps)==null?void 0:o.inactiveValue)||!1;e.values.componentProps.unCheckedValue===""&&delete e.values.componentProps.unCheckedValue,e.values.componentProps.activeValue===""&&delete e.values.componentProps.activeValue,e.values.componentProps?e.values.componentProps.defaultValue=l:e.values.componentProps={defaultValue:l}}const z={component:async()=>(await import("element-plus")).ElCascader,groupName:"表单",icon:"icon--epic--full-coverage-outline",sort:900,defaultSchema:{label:"级联选择器",type:"cascader",field:"cascader",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],placeholder:"请选择",props:{expandTrigger:"click"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"cascader",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"分割符",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.separator"},{label:"次级菜单展开方式",type:"select",field:"componentProps.props.expandTrigger",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"click",value:"click"},{label:"hover",value:"hover"}]}},{label:"可搜索",type:"switch",field:"componentProps.filterable"},{label:"可多选",type:"switch",field:"componentProps.props.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"折叠Tag",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.props.multiple},{label:"显示被折叠标签",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.props.multiple&&e.componentProps.collapseTags},{label:"不显示路径",type:"switch",componentProps:{activeValue:!1,inactiveValue:!0},field:"componentProps.showAllLevels"},{label:"父级可选",type:"switch",field:"componentProps.props.checkStrictly",describe:"父子节点不互相关联"},{label:"只获取选中节点",type:"switch",field:"componentProps.props.emitPath",componentProps:{activeValue:!1,inactiveValue:!0}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",componentProps:{tree:!0},describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"选中节点变化时"},{type:"blur",describe:" 当失去焦点时触发"},{type:"focus",describe:"当获得焦点时触发"}],action:[{type:"getCheckedNodes",describe:"获取当前选中节点"},{type:"togglePopperVisible",describe:"切换 popper 可见状态"}]}},F={component:()=>Promise.resolve().then(()=>require("../../collapse-B2AXU6Jz.cjs")),icon:"epic-icon-xiala",defaultSchema:{label:"折叠面板",type:"collapse",children:[{type:"collapse-item",children:[],componentProps:{span:12},id:"g062zikd2jk001"},{type:"collapse-item",children:[],componentProps:{span:12},id:"gy5z9jtfb3s001"}]},config:{attribute:[{label:"折叠项管理",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},N={component:()=>Promise.resolve().then(()=>require("../../collapseItem-CAGqWjGg.cjs")),defaultSchema:{label:"折叠项",type:"collapse-item",children:[]},config:{attribute:[]}},R={component:async()=>(await import("element-plus")).ElDatePicker,groupName:"表单",icon:"icon--epic--calendar-month-outline-rounded",sort:910,defaultSchema:{label:"日期选择器",type:"date",field:"date",input:!0,componentProps:{type:"date",valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:"请选择",startPlaceholder:"请选择",endPlaceholder:"请选择"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"date",field:"componentProps.defaultValue"},{label:"日期类型",type:"select",field:"componentProps.type",componentProps:{options:[{label:"日期",value:"date"},{label:"周",value:"week"},{label:"月份",value:"month"},{label:"年份",value:"year"},{label:"时间",value:"datetime"},{label:"时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"多个日期",value:"dates"}]},onChange({values:e,value:l}){e.componentProps.defaultValue=null,["date","daterange","dates"].includes(l)?(e.componentProps.format="YYYY-MM-DD",e.componentProps.valueFormat="YYYY-MM-DD"):["week"].includes(l)?(e.componentProps.format="ww [周]",e.componentProps.valueFormat="YYYY-MM-DD"):["month","monthrange"].includes(l)?(e.componentProps.format="YYYY-MM",e.componentProps.valueFormat="YYYY-MM"):["datetime","datetimerange"].includes(l)?(e.componentProps.format="YYYY-MM-DD HH:mm:ss",e.componentProps.valueFormat="YYYY-MM-DD HH:mm:ss"):["year"].includes(l)&&(e.componentProps.format="YYYY",e.componentProps.valueFormat="YYYY")}},{label:"开始占位符",type:"input",field:"componentProps.startPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"结束占位符",type:"input",field:"componentProps.endPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"占位内容",type:"input",field:"componentProps.placeholder",show({values:e}){return!["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可输入",type:"switch",field:"componentProps.editable"},{label:"显示格式",type:"input",field:"componentProps.format"},{label:"数据格式",type:"input",field:"componentProps.valueFormat"},{label:"分割符",type:"input",field:"componentProps.rangeSeparator",componentProps:{placeholder:"请输入"},show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-z7Ko58XG.cjs")),groupName:"表单",icon:"icon--epic--upload-rounded",sort:920,defaultSchema:{label:"上传文件",type:"upload-file",field:"uploadFile",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={component:()=>Promise.resolve().then(()=>require("../../uploadImage-xU0He_aO.cjs")),groupName:"表单",icon:"icon--epic--imagesmode-outline-rounded",sort:920,defaultSchema:{label:"上传图片",type:"upload-image",field:"uploadImage",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},B={component:()=>Promise.resolve().then(()=>require("../../modal-_fid8E1T.cjs")),defaultSchema:{label:"模态框",type:"modal",children:[]},config:{attribute:[{label:"标题",type:"input",field:"title"}]}},O={component:async()=>await Promise.resolve().then(()=>require("../../sign-Gwu2PIRy.cjs")),icon:"icon--epic--insert-text-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"签名板",type:"sign",field:"sign",input:!0,componentProps:{placeholder:"请输入",lineWidth:4,type:"sign",style:{height:"300px"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"线条宽度(px)",type:"input",componentProps:{placeholder:"请选择",clearable:!0},field:"componentProps.lineWidth"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}]}};function j(e=y.pluginManager){e.component("FormItem",n.ElFormItem),e.component("Form",n.ElForm),e.component("RadioGroup",n.ElRadioGroup),e.component("RadioButton",n.ElRadioButton),e.component("Tabs",n.ElTabs),e.component("TabPane",n.ElTabPane),e.component("Collapse",n.ElCollapse),e.component("CollapseItem",n.ElCollapseItem),e.component("Drawer",n.ElDrawer),[w,g,h,P,v,C,k,R,V,I,D,z,T,q,M,E,S,x,Y,F,N,B,O].forEach(o=>{e.registerComponent(o),e.addBaseComponentTypes(o.defaultSchema.type)}),e.setInitialized(!0)}function L(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=L;exports.setupElementPlus=j;
1
+ "use strict";var s=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var f=(e,l,o,a)=>{if(l&&typeof l=="object"||typeof l=="function")for(let t of u(l))!b.call(e,t)&&t!==o&&r(e,t,{get:()=>l[t],enumerable:!(a=d(l,t))||a.enumerable});return e};var p=(e,l,o)=>(o=e!=null?s(m(e)):{},f(l||!e||!e.__esModule?r(o,"default",{value:e,enumerable:!0}):o,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("epic-designer-gold"),n=require("element-plus"),h={component:async()=>(await import("element-plus")).ElInput,groupName:"表单",icon:"icon--epic--border-color-outline-rounded",sort:700,defaultSchema:{label:"输入框",type:"input",field:"input",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"input",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"输入类型",type:"select",defaultValue:"text",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"text",value:"text"},{label:"number",value:"number"},{label:"password",value:"password"}]},field:"componentProps.type"},{label:"显示切换图标",type:"switch",field:"componentProps.showPassword",show:({values:e})=>e.componentProps.type==="password"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值时"},{type:"change",describe:"值修改时"},{type:"focus",describe:"获取焦点时"},{type:"blur",describe:"失去焦点时"},{type:"clear",describe:"点击清空按钮时"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},P={component:async()=>(await import("element-plus")).ElInput,icon:"icon--epic--edit-square-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"文本域",type:"textarea",field:"textarea",input:!0,componentProps:{placeholder:"请输入",type:"textarea"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"textarea",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大输入长度",type:"number",field:"componentProps.maxlength",componentProps:{placeholder:"请输入",min:0}},{label:"统计字数",type:"switch",field:"componentProps.showWordLimit",show:({values:e})=>e.componentProps.maxlength},{label:"最小行数",type:"number",field:"componentProps.autosize.minRows",componentProps:{placeholder:"请输入"}},{label:"最大行数",type:"number",field:"componentProps.autosize.maxRows",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"input",describe:"输入值"},{type:"change",describe:"值修改"},{type:"focus",describe:"获取焦点"},{type:"blur",describe:"失去焦点"}],action:[{type:"focus",describe:"使 input 获取焦点"},{type:"blur",describe:"使 input 失去焦点"},{type:"clear",describe:"清除 input 值"},{type:"select",describe:"选中 input 中的文字"}]}},v={component:async()=>(await import("element-plus")).ElInputNumber,groupName:"表单",icon:"icon--epic--123-rounded",sort:710,defaultSchema:{label:"数字输入框",type:"number",field:"number",input:!0,componentProps:{placeholder:"请输入"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"number",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"控制按钮位置",type:"select",defaultValue:"",componentProps:{options:[{label:"default",value:""},{label:"right",value:"right"}],placeholder:"请选择",clearable:!0},field:"componentProps.controlsPosition"},{label:"精度",type:"number",field:"componentProps.precision",componentProps:{placeholder:"请输入"}},{label:"输入控制为步长的倍数",type:"switch",field:"componentProps.stepStrictly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"change",describe:"值变化时"}]}},w={component:()=>Promise.resolve().then(()=>require("../../form-CthzLIgs.cjs")),groupName:"表单",icon:"icon--epic--list-alt-outline-rounded",sort:600,defaultSchema:{label:"表单",type:"form",componentProps:{name:"default",labelWidth:"100px","label-position":"left"},children:[]},config:{attribute:[{label:"Name",type:"input",field:"componentProps.name"},{label:"标签位置",type:"radio",field:"componentProps.label-position",componentProps:{clearable:!0,radioButton:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"},{label:"顶部",value:"top"}]}},{label:"标签宽度",type:"EInputSize",field:"componentProps.labelWidth"},{label:"标签后缀",type:"input",field:"componentProps.labelSuffix",componentProps:{placeholder:"请输入"}},{label:"表单尺寸",type:"select",field:"componentProps.size",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]}},{label:"星号位置",type:"select",field:"componentProps.require-asterisk-position",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"左边",value:"left"},{label:"右边",value:"right"}]}},{label:"行内展示校验信息",type:"switch",field:"componentProps.inline-message"},{label:"校验反馈图标",type:"switch",field:"componentProps.status-icon"},{label:"滚动校验错误处",type:"switch",field:"componentProps.scroll-to-error"},{label:"行内模式",type:"switch",field:"componentProps.inline"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],action:[{type:"getData",describe:"获取表单数据"},{type:"setData",describe:"设置表单数据"},{type:"validate",describe:"校验表单"}]}},g={component:()=>Promise.resolve().then(()=>require("../../formItem-BVnNs1Q9.cjs")),defaultSchema:{label:"表单项",type:"form-item"},config:{}},E={component:()=>Promise.resolve().then(()=>require("../../button-Cc4KYk3v.cjs")),groupName:"表单",icon:"icon--epic--fit-screen-rounded",sort:1200,defaultSchema:{label:"按钮",type:"button",field:"input",input:!1},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},field:"componentProps.type"},{label:"操作类型",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"button",value:"button"},{label:"submit",value:"submit"},{label:"reset",value:"reset"}]},field:"componentProps.native-type"},{label:"自定义颜色",type:"color-picker",field:"componentProps.color",componentProps:{type:"color"}},{label:"朴素按钮",type:"switch",field:"componentProps.plain"},{label:"圆角按钮",type:"switch",field:"componentProps.round"},{label:"圆形按钮",type:"switch",field:"componentProps.circle"},{label:"文字按钮",type:"switch",field:"componentProps.text"},{label:"加载状态",type:"switch",field:"componentProps.loading"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}],event:[{type:"click",describe:"点击按钮时"},{type:"dblclick",describe:"双击按钮时"}]}},S={component:()=>Promise.resolve().then(()=>require("../../card-BowzD9vN.cjs")),groupName:"布局",icon:"icon--epic--wysiwyg-rounded",sort:700,defaultSchema:{label:"卡片布局",type:"card",children:[],componentProps:{}},config:{attribute:[{label:"标题",type:"input",field:"label"},{label:"阴影时机",type:"select",componentProps:{options:[{label:"always",value:"always"},{label:"hover",value:"hover"},{label:"never",value:"never"}],placeholder:"请选择",clearable:!0},field:"componentProps.shadow"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},x={component:()=>Promise.resolve().then(()=>require("../../row-NNlPGZRG.cjs")),groupName:"布局",icon:"icon--epic--width-normal-outline",sort:800,defaultSchema:{label:"栅格布局",type:"row",children:[{type:"col",children:[],componentProps:{span:12}},{type:"col",children:[],componentProps:{span:12}}]},editConstraints:{childImmovable:!0},config:{attribute:[{label:"垂直对齐方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"top",value:"top"},{label:"middle",value:"middle"},{label:"bottom",value:"bottom"}],placeholder:"请选择"},field:"componentProps.align"},{label:"水平排列方式",type:"select",componentProps:{style:{width:"100%"},options:[{label:"start",value:"start"},{label:"end",value:"end"},{label:"center",value:"center"},{label:"space-around",value:"space-around"},{label:"space-between",value:"space-between"}],placeholder:"请选择"},field:"componentProps.justify"},{label:"栅格间距",type:"number",field:"componentProps.gutter",componentProps:{placeholder:"请输入"}},{label:"列编辑",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},Y={component:()=>Promise.resolve().then(()=>require("../../col-B1GUMkMK.cjs")),defaultSchema:{label:"栅格布局-列",type:"col",children:[],componentProps:{span:6}},config:{attribute:[{label:"占位格数",type:"number",field:"componentProps.span"}]}},V={component:()=>Promise.resolve().then(()=>require("../../select-D6bRz5G2.cjs")),groupName:"表单",icon:"icon--epic--select",sort:900,defaultSchema:{label:"选择框",type:"select",field:"select",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],dynamicId:"",placeholder:"请选择",size:"default",effect:"light",placement:"bottom-start"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"select",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可多选",type:"switch",field:"componentProps.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"多选隐藏",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.multiple},{label:"隐藏提示",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.multiple&&e.componentProps.collapseTags},{label:"保留搜索关键字",type:"switch",field:"componentProps.reserveKeyword",show:({values:e})=>e.componentProps.multiple},{label:"标签类型",type:"select",defaultValue:"info",componentProps:{options:[{label:"success",value:"success"},{label:"info",value:"info"},{label:"warning",value:"warning"},{label:"danger",value:"danger"}]},show:({values:e})=>e.componentProps.multiple,field:"componentProps.tagType"},{label:"多选限制",type:"number",field:"componentProps.multipleLimit",show:({values:e})=>e.componentProps.multiple},{label:"提示主题",type:"select",componentProps:{options:[{label:"light",value:"light"},{label:"dark",value:"dark"}]},field:"componentProps.effect"},{label:"可筛选",type:"switch",field:"componentProps.filterable"},{label:"允许创建条目",type:"switch",field:"componentProps.allowCreate"},{label:"下拉框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"下拉框宽度与输入框相同",type:"switch",field:"componentProps.fitInputWidth"},{label:"无数据时文本",type:"input",field:"componentProps.noDataText",componentProps:{placeholder:"请输入"}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},C={component:()=>Promise.resolve().then(()=>require("../../radio-D3AHEMXb.cjs")),groupName:"表单",icon:"icon--epic--radio-button-checked-outline",sort:850,defaultSchema:{label:"单选框",type:"radio",field:"radio",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],size:"default"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"radio",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},k={component:()=>Promise.resolve().then(()=>require("../../checkbox-CMr5pERY.cjs")),groupName:"表单",icon:"icon--epic--dialogs-outline-rounded",sort:860,defaultSchema:{label:"复选框",type:"checkbox",field:"checkbox",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}]}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"checkbox",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最大选中数",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"}},{label:"最小选中数",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"}},{label:"按钮模式",type:"switch",field:"componentProps.radioButton"},{label:"选项文本颜色",type:"color-picker",layout:"horizontal",field:"componentProps.textColor",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"选项按钮颜色",type:"color-picker",layout:"horizontal",field:"componentProps.fill",show:({values:e})=>e.componentProps.radioButton,describe:"按钮模式下生效"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"值变化时"}]}},T={component:async()=>(await import("element-plus")).ElSlider,groupName:"表单",icon:"icon--epic--switches",sort:930,defaultSchema:{label:"滑块",type:"slider",field:"slider",input:!0,componentProps:{placement:"top-start",showTooltip:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"slider",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"最小值",type:"number",field:"componentProps.min",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.max"),t=o.value[a];t.componentProps={min:e},(l.componentProps.max??0)<e&&(l.componentProps.max=e)}},{label:"最大值",type:"number",field:"componentProps.max",componentProps:{placeholder:"请输入"},onChange:({value:e,values:l,componentAttributes:o})=>{const a=o.value.findIndex(i=>i.field==="componentProps.min"),t=o.value[a];t.componentProps={max:e},(l.componentProps.min??0)>e&&(l.componentProps.min=e)}},{label:"步长",type:"number",field:"componentProps.step",componentProps:{placeholder:"请输入"}},{label:"显示间断点",type:"switch",field:"componentProps.showStops"},{label:"提示信息",type:"switch",field:"componentProps.showTooltip"},{label:"开启选择范围",type:"switch",field:"componentProps.range"},{label:"垂直模式",type:"switch",field:"componentProps.vertical"},{label:"高度",type:"EInputSize",field:"componentProps.height",show:({values:e})=>e.componentProps.vertical},{label:"显示数字框",type:"switch",field:"componentProps.showInput",onChange:({value:e,values:l})=>{e&&(l.componentProps.showInputControls=!0)}},{label:"控制按钮",type:"switch",field:"componentProps.showInputControls",show:({values:e})=>e.componentProps.showInput},{label:"提示框位置",type:"select",defaultValue:"bottom-start",componentProps:{options:[{label:"top",value:"top"},{label:"top-start",value:"top-start"},{label:"top-end",value:"top-end"},{label:"bottom",value:"bottom"},{label:"bottom-start",value:"bottom-start"},{label:"bottom-end",value:"bottom-end"},{label:"left",value:"left"},{label:"left-start",value:"left-start"},{label:"left-end",value:"left-end"},{label:"right",value:"right"},{label:"right-start",value:"right-start"},{label:"right-end",value:"right-end"}]},field:"componentProps.placement"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"number"}}],event:[{type:"input",describe:"拖拽实时触发"},{type:"change",describe:"拖拽结束改变值时"}]}},D={component:async()=>(await import("element-plus")).ElColorPicker,groupName:"表单",icon:"icon--epic--palette-outline",sort:950,defaultSchema:{label:"颜色选择器",type:"color-picker",field:"color-picker",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"color-picker",field:"componentProps.defaultValue"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"格式",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"hsl",value:"hsl"},{label:"hsv",value:"hsv"},{label:"hex",value:"hex"},{label:"rgb",value:"rgb"}]},field:"componentProps.colorFormat"},{label:"透明度选择",type:"switch",field:"componentProps.showAlpha"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}],action:[]}},I={component:async()=>(await import("element-plus")).ElSwitch,groupName:"表单",icon:"icon--epic--toggle-off-outline",sort:930,defaultSchema:{label:"开关",type:"switch",field:"switch",input:!0,componentProps:{defaultValue:!1}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"switch",field:"componentProps.defaultValue"},{label:"ON状态值",type:"input",field:"componentProps.activeValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"OFF状态值",type:"input",field:"componentProps.inactiveValue",componentProps:{placeholder:"请输入"},onChange(e){setTimeout(()=>c(e))}},{label:"ON状态描述",type:"input",field:"componentProps.activeText",componentProps:{placeholder:"请输入"}},{label:"OFF状态描述",type:"input",field:"componentProps.inactiveText",componentProps:{placeholder:"请输入"}},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"宽度",type:"number",field:"componentProps.width",componentProps:{min:50,placeholder:"请输入"}},{label:"文本点内显示",type:"switch",field:"componentProps.inlinePrompt"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"boolean"}}],event:[{type:"change",describe:"状态发生变化时"}]}};function c(e){var o;let l=((o=e.values.componentProps)==null?void 0:o.inactiveValue)||!1;e.values.componentProps.unCheckedValue===""&&delete e.values.componentProps.unCheckedValue,e.values.componentProps.activeValue===""&&delete e.values.componentProps.activeValue,e.values.componentProps?e.values.componentProps.defaultValue=l:e.values.componentProps={defaultValue:l}}const z={component:async()=>(await import("element-plus")).ElCascader,groupName:"表单",icon:"icon--epic--full-coverage-outline",sort:900,defaultSchema:{label:"级联选择器",type:"cascader",field:"cascader",input:!0,componentProps:{options:[{label:"选项1",value:"选项1"},{label:"选项2",value:"选项2"}],placeholder:"请选择",props:{expandTrigger:"click"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"cascader",field:"componentProps.defaultValue"},{label:"占位内容",type:"input",field:"componentProps.placeholder"},{label:"尺寸",type:"select",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"分割符",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.separator"},{label:"次级菜单展开方式",type:"select",field:"componentProps.props.expandTrigger",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"click",value:"click"},{label:"hover",value:"hover"}]}},{label:"可搜索",type:"switch",field:"componentProps.filterable"},{label:"可多选",type:"switch",field:"componentProps.props.multiple",onChange:({value:e,values:l})=>{e?l.componentProps.defaultValue=[]:l.componentProps.defaultValue=null}},{label:"折叠Tag",type:"switch",field:"componentProps.collapseTags",show:({values:e})=>e.componentProps.props.multiple},{label:"显示被折叠标签",type:"switch",field:"componentProps.collapseTagsTooltip",show:({values:e})=>e.componentProps.props.multiple&&e.componentProps.collapseTags},{label:"不显示路径",type:"switch",componentProps:{activeValue:!1,inactiveValue:!0},field:"componentProps.showAllLevels"},{label:"父级可选",type:"switch",field:"componentProps.props.checkStrictly",describe:"父子节点不互相关联"},{label:"只获取选中节点",type:"switch",field:"componentProps.props.emitPath",componentProps:{activeValue:!1,inactiveValue:!0}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"选项管理",type:"EOptionsEditor",layout:"vertical",field:"componentProps.options",componentProps:{tree:!0},describe:"配置选项"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}},{label:"数据源",type:"EDataSource",layout:"vertical",field:"componentProps.dataSource",describe:"数据源配置"}],event:[{type:"change",describe:"选中节点变化时"},{type:"blur",describe:" 当失去焦点时触发"},{type:"focus",describe:"当获得焦点时触发"}],action:[{type:"getCheckedNodes",describe:"获取当前选中节点"},{type:"togglePopperVisible",describe:"切换 popper 可见状态"}]}},F={component:()=>Promise.resolve().then(()=>require("../../collapse-B2AXU6Jz.cjs")),icon:"epic-icon-xiala",defaultSchema:{label:"折叠面板",type:"collapse",children:[{type:"collapse-item",children:[],componentProps:{span:12},id:"g062zikd2jk001"},{type:"collapse-item",children:[],componentProps:{span:12},id:"gy5z9jtfb3s001"}]},config:{attribute:[{label:"折叠项管理",type:"EColEditor",field:"children"},{label:"隐藏",type:"switch",field:"componentProps.hidden"}]}},N={component:()=>Promise.resolve().then(()=>require("../../collapseItem-CAGqWjGg.cjs")),defaultSchema:{label:"折叠项",type:"collapse-item",children:[]},config:{attribute:[]}},R={component:async()=>(await import("element-plus")).ElDatePicker,groupName:"表单",icon:"icon--epic--calendar-month-outline-rounded",sort:910,defaultSchema:{label:"日期选择器",type:"date",field:"date",input:!0,componentProps:{type:"date",valueFormat:"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:"请选择",startPlaceholder:"请选择",endPlaceholder:"请选择"}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"date",field:"componentProps.defaultValue"},{label:"日期类型",type:"select",field:"componentProps.type",componentProps:{options:[{label:"日期",value:"date"},{label:"周",value:"week"},{label:"月份",value:"month"},{label:"年份",value:"year"},{label:"时间",value:"datetime"},{label:"时间范围",value:"datetimerange"},{label:"日期范围",value:"daterange"},{label:"月份范围",value:"monthrange"},{label:"多个日期",value:"dates"}]},onChange({values:e,value:l}){e.componentProps.defaultValue=null,["date","daterange","dates"].includes(l)?(e.componentProps.format="YYYY-MM-DD",e.componentProps.valueFormat="YYYY-MM-DD"):["week"].includes(l)?(e.componentProps.format="ww [周]",e.componentProps.valueFormat="YYYY-MM-DD"):["month","monthrange"].includes(l)?(e.componentProps.format="YYYY-MM",e.componentProps.valueFormat="YYYY-MM"):["datetime","datetimerange"].includes(l)?(e.componentProps.format="YYYY-MM-DD HH:mm:ss",e.componentProps.valueFormat="YYYY-MM-DD HH:mm:ss"):["year"].includes(l)&&(e.componentProps.format="YYYY",e.componentProps.valueFormat="YYYY")}},{label:"开始占位符",type:"input",field:"componentProps.startPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"结束占位符",type:"input",field:"componentProps.endPlaceholder",show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"占位内容",type:"input",field:"componentProps.placeholder",show({values:e}){return!["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"尺寸",type:"select",defaultValue:"default",componentProps:{placeholder:"请选择",clearable:!0,options:[{label:"大号",value:"large"},{label:"中等",value:"default"},{label:"小型",value:"small"}]},field:"componentProps.size"},{label:"可输入",type:"switch",field:"componentProps.editable"},{label:"显示格式",type:"input",field:"componentProps.format"},{label:"数据格式",type:"input",field:"componentProps.valueFormat"},{label:"分割符",type:"input",field:"componentProps.rangeSeparator",componentProps:{placeholder:"请输入"},show({values:e}){return["datetimerange","daterange","monthrange"].includes(e.componentProps.type)}},{label:"可清空",type:"switch",field:"componentProps.clearable"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}],event:[{type:"change",describe:"值变化时"}]}},q={component:()=>Promise.resolve().then(()=>require("../../uploadFile-z7Ko58XG.cjs")),groupName:"表单",icon:"icon--epic--upload-rounded",sort:920,defaultSchema:{label:"上传文件",type:"upload-file",field:"uploadFile",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},M={component:()=>Promise.resolve().then(()=>require("../../uploadImage-xU0He_aO.cjs")),groupName:"表单",icon:"icon--epic--imagesmode-outline-rounded",sort:920,defaultSchema:{label:"上传图片",type:"upload-image",field:"uploadImage",input:!0,componentProps:{action:"https://examples.epicjs.cn/static/upload-img.json",name:"file",showFileList:!0}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"请求地址",type:"input",field:"componentProps.action"},{label:"上传文件字段",type:"input",field:"componentProps.name"},{label:"多选",type:"switch",field:"componentProps.multiple"},{label:"展示文件列表",type:"switch",field:"componentProps.showFileList"},{label:"拖拽上传",type:"switch",field:"componentProps.drag"},{label:"允许上传最大数量",type:"number",field:"componentProps.limit",componentProps:{min:0,placeholder:"请输入"}},{label:"禁用",type:"switch",field:"componentProps.disabled"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用",componentProps:{ruleType:"array"}}]},bindModel:"modelValue"},B={component:()=>Promise.resolve().then(()=>require("../../modal-_fid8E1T.cjs")),defaultSchema:{label:"模态框",type:"modal",children:[]},config:{attribute:[{label:"标题",type:"input",field:"title"}]}},O={component:async()=>await Promise.resolve().then(()=>require("../../sign-BCmA2v-3.cjs")),icon:"icon--epic--insert-text-outline-rounded",groupName:"表单",sort:705,defaultSchema:{label:"签名板",type:"sign",field:"sign",input:!0,componentProps:{placeholder:"请输入",lineWidth:4,type:"sign",style:{height:"300px"}}},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"线条宽度(px)",type:"input",componentProps:{placeholder:"请选择",clearable:!0},field:"componentProps.lineWidth"},{label:"只读",type:"switch",field:"componentProps.readonly"},{label:"隐藏",type:"switch",field:"componentProps.hidden"},{label:"表单校验",type:"ERuleEditor",layout:"vertical",field:"rules",describe:"校验规则需要配合表单使用"}]}};function j(e=y.pluginManager){e.component("FormItem",n.ElFormItem),e.component("Form",n.ElForm),e.component("RadioGroup",n.ElRadioGroup),e.component("RadioButton",n.ElRadioButton),e.component("Tabs",n.ElTabs),e.component("TabPane",n.ElTabPane),e.component("Collapse",n.ElCollapse),e.component("CollapseItem",n.ElCollapseItem),e.component("Drawer",n.ElDrawer),[w,g,h,P,v,C,k,R,V,I,D,z,T,q,M,E,S,x,Y,F,N,B,O].forEach(o=>{e.registerComponent(o),e.addBaseComponentTypes(o.defaultSchema.type)}),e.setInitialized(!0)}function L(e){import("element-plus").then(({provideGlobalConfig:l})=>{l(e)})}exports.provideGlobalConfig=L;exports.setupElementPlus=j;
@@ -1195,7 +1195,7 @@ const h = {
1195
1195
  ]
1196
1196
  }
1197
1197
  }, C = {
1198
- component: () => import("../../radio-ChBAvqeY.js"),
1198
+ component: () => import("../../radio-B_7sUIiA.js"),
1199
1199
  groupName: "表单",
1200
1200
  icon: "icon--epic--radio-button-checked-outline",
1201
1201
  sort: 850,
@@ -2588,7 +2588,7 @@ const z = {
2588
2588
  }
2589
2589
  }, O = {
2590
2590
  // component: async () => await import("../../../../packages/core/components/designer/src"),
2591
- component: async () => await import("../../sign-BDZCr3wJ.js"),
2591
+ component: async () => await import("../../sign-CSv8hClp.js"),
2592
2592
  icon: "icon--epic--insert-text-outline-rounded",
2593
2593
  groupName: "表单",
2594
2594
  sort: 705,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "epic-designer-gold",
3
3
  "private": false,
4
- "version": "0.0.32",
4
+ "version": "0.0.34",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -1,10 +0,0 @@
1
- "use strict";const e=require("vue"),D=require("./axios-CYGTE3lR.cjs");function U(t=10){const a="abcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<t;n++){const o=Math.floor(Math.random()*a.length);r+=a[o]}return r}function j(t){return t.charAt(0).toUpperCase()+t.slice(1)}function V(t,a=new WeakMap){if(typeof t!="object"||t===null)return t;if(a.has(t))return a.get(t);if(Array.isArray(t)){const n=t.map(o=>V(o,a));return a.set(t,n),n}const r={};return a.set(t,r),Object.keys(t).forEach(n=>{r[n]=V(t[n],a)}),r}function he(t){const[a]=ne([V(t)],r=>{var o,s;const n={...r,id:`${r.type}_${U(8)}`};return(n.field||n.input)&&!((s=(o=D.pluginManager.getComponentConfingByType(n.type))==null?void 0:o.editConstraints)!=null&&s.fixedField)&&(n.field=n.id),n});return a}function B(t,a,r=!0){for(const[n,o]of Object.entries(a)){let s=t==null?void 0:t[n];s&&o&&typeof s=="object"&&typeof o=="object"?(Array.isArray(s)&&!Array.isArray(o)?s=t[n]={}:!Array.isArray(s)&&Array.isArray(o)&&(s=t[n]=[]),B(s,o,r)):t[n]=o}r&&Object.keys(t).reverse().forEach(n=>{a.hasOwnProperty(n)||(Array.isArray(t)?t.splice(Number(n),1):delete t[n])})}function Z(t,a,r=[],n=new WeakMap){const o=s=>{if(Array.isArray(s))return s.map(o);if(typeof s=="object"&&s!==null){if(n.has(s))return"[Circular]";n.set(s,!0);const i=Object.keys(s).sort(),c={};return i.forEach(d=>{r.includes(d)||(c[d]=o(s[d]))}),n.delete(s),c}else return s};return JSON.stringify(o(t))===JSON.stringify(o(a))}function ee(t,a){const r=[];let n=!1;function o(s){if(r.push(s),s.id===a&&(n=!0),!n&&s.children!=null&&s.children.length>0)for(let i=0;i<s.children.length&&(o(s.children[i]),!n);i++);if(!n&&s.slots)for(let i in s.slots)for(let c=0;c<s.slots[i].length&&(o(s.slots[i][c]),!n);c++);n||r.pop()}return t.forEach(o),n||console.error(`没有查询到id为${a}的节点`),r}function ve(t,a,r){const n=a.split(".");let o=t;for(let s=0;s<n.length;s++){if(o==null)return r;o=o[n[s]]}return o===void 0?r:o}function ge(t,a,r){const n=a.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean);let o=t;for(let s=0;s<n.length-1;s++){const i=n[s];o[i]==null&&(o[i]=isNaN(Number(n[s+1]))?{}:[]),o=o[i]}return o[n[n.length-1]]=r,t}function ye(t,a="default"){return te(t,a).map(n=>n.field)}function te(t,a="default"){const r=R(t,o=>{var s;return o.type==="form"&&(((s=o.componentProps)==null?void 0:s.name)??o.name===a)},!0);return R((r==null?void 0:r.children)??[],o=>!!o.input,!1,o=>o.type!=="subform")}function R(t,a,r=!1,n){const o=[],s=[...t];for(;s.length;){const i=s.pop();if(i!=null&&i.children&&(!n||n(i))&&s.push(...i.children),i!=null&&i.slots&&(!n||n(i)))for(let c in i.slots)s.push(...i.slots[c]);if(a(i)&&(o.push(i),r))return i}return r?!1:o}function ne(t,a,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 s in o.slots)n.push(...o.slots[s]);B(o,a(o))}return t}function we(t,a){const r=R(t,n=>n.id===a,!0);if(!r)throw new Error(`没有查询到id为${a}的节点`);return r}function Se(t,a){const r=[{type:"",children:t}];let n=0,o=null;if(R(r,s=>{if(o=s.children??null,!o){if(s!=null&&s.slots)for(let i in s.slots){o=s.slots[i];for(let c=0;c<o.length;c++)if(o[c].id===a)return n=c,!0}return!1}for(let i=0;i<o.length;i++)if(o[i].id===a)return n=i,!0;return!1},!0),!o)throw new Error(`没有查询到id为${a}的节点`);return{list:o,schema:o[n],index:n}}function be(t){const a={schemas:[{type:"page",id:"root",label:"页面",children:[{label:"表单",type:"form",icon:"epic-icon-daibanshixiang",labelWidth:t.config.labelWidth||100,name:"default",componentProps:{layout:t.config.layout||"horizontal",labelWidth:t.config.labelWidth||100,labelLayout:t.config.labelLayout==="flex"?"fixed":"flex",labelCol:t.config.labelCol||{span:5},wrapperCol:t.config.wrapperCol||{span:19},hideRequiredMark:t.config.hideRequiredMark||!1,colon:t.config.colon||!0,labelAlign:t.config.labelAlign||"right",size:t.config.size||"middle"},children:[],id:"form_"+U()}],componentProps:{style:{padding:"16px"}}}],script:t.script||""};return a.schemas[0].children[0].children=O(t.list),a}function O(t,a){return t.map(r=>{var d,S,v;let n=r.type??"";const o=r.options??{},s=(l,y)=>{n===l&&(n=y,o.defaultValue&&(o.defaultValue=JSON.parse(o.defaultValue)))};if(s("uploadImg","upload-image"),s("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:y}=o;o.autoSize={minRows:l,maxRows:y},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"),a&&a.type==="grid"&&(n="col",o.span=r.span,r.key=U());const i={label:r.label,type:n,icon:r.icon||"",field:r.model,componentProps:o,id:r.key};return(o.noFormItem||!o.showLabel)&&(i.noFormItem=!0,delete o.noFormItem,delete o.showLabel),o.clearable&&(o.allowClear=!0,delete o.clearable),["input","textarea","number","password","select","cascader","checkbox","radio","date","time","slider","switch","color-picker","upload-file","upload-image"].includes(n)&&(i.input=!0,((S=(d=r.rules)==null?void 0:d[0])==null?void 0:S.required)===!1&&r.rules.shift(),((v=r.rules)==null?void 0:v.length)>0&&(i.rules=r.rules)),r.list&&(i.children=O(r.list,r)),r.columns&&(i.children=O(r.columns,r)),r.trs&&(i.children=O(r.trs,r)),r.tds&&(i.children=O(r.tds,r)),i})}function Ce(t,a){let r=null;return(...n)=>{r&&clearTimeout(r),r=setTimeout(()=>{t(...n)},a)}}function Q(){const t=e.ref({}),a=e.ref({}),r=e.ref(!1),n=e.ref([]),o=e.reactive({});function s(h){return t.value[h]}function i(h,w){t.value[h]=w}function c(h){delete t.value[h]}function d(h,w=!1){const g=Object.entries(D.pluginManager.publicMethods).reduce((A,[_,M])=>(A[_]=M.handler,A),{});try{new Function(`const epic = this;${h}`).bind({...g,getComponent:s,find:s,defineExpose:S,publicMethods:g,pluginManager:D.pluginManager})()}catch(A){w&&console.error("[epic:自定义函数]异常:",A)}}function S(h){h!=null&&(a.value=h)}function v(h,...w){if(!h||h.length===0){console.warn("未提供任何动作");return}h.forEach(g=>{const A=g.args?JSON.parse(g.args):w;switch(g.type){case"public":l(g,A);break;case"custom":y(g,A);break;case"component":f(g,A);break;default:console.warn(`未知的动作类型: ${g.type}`);break}})}function l(h,w){var g;try{(g=D.pluginManager.publicMethods[h.methodName])==null||g.handler(...w)}catch(A){console.error(`[Epic:公共函数(${h.methodName})]执行异常:`,A)}}function y(h,w){var g,A;try{(A=(g=a.value)[h.methodName])==null||A.call(g,...w)}catch(_){console.error(`[Epic:自定义函数(${h.methodName})]执行异常:`,_)}}function f(h,w){const g=h.componentId!=null&&s(h.componentId);if(!g){console.warn(`[Epic:组件${h.componentId}]未找到`);return}try{g[h.methodName](...w)}catch(A){console.error(`[Epic:组件${h.componentId}函数(${h.methodName})]执行异常:`,A)}}function p(h=!0){r.value=h}function u(h){const w=R(h,()=>!0);n.value=w.map(g=>g.id)}function E(h,w="default"){if(o[w]){const g=o[w];B(h,g)}o[w]=h}function P(h,w="default"){if(o[w]){B(o[w],h,!1);return}o[w]=h}return{componentInstances:t,funcs:a,isDesignMode:r,defaultComponentIds:n,forms:o,addFormData:E,setFormData:P,getComponentInstance:s,find:s,addComponentInstance:i,removeComponentInstance:c,setMethods:d,doActions:v,setDesignMode:p,setDefaultComponentIds:u}}function oe(){const t=e.ref([]),a=e.ref([]),r=e.ref(null);let n=0;function o(d,S="插入组件"){const v=Date.now();n+150>v||(n=v,r.value!=null&&(t.value.push(r.value),a.value.splice(0,a.value.length)),r.value={type:S,componentSchema:JSON.stringify(d)},t.value.length>60&&t.value.unshift())}function s(){if(t.value.length===0)return!1;const d=t.value.pop();return r.value!=null&&a.value.push(r.value),r.value=d,JSON.parse(d.componentSchema)}function i(){if(a.value.length===0)return!1;const d=a.value.pop();return r.value!=null&&t.value.push(r.value),r.value=d,JSON.parse(d.componentSchema)}function c(){t.value=[],a.value=[],r.value=null}return{recordList:t,undoList:a,currentRecord:r,push:o,undo:s,redo:i,reset:c}}const Ee=e.defineComponent({__name:"dynamicFormItem",props:{hasFormItem:{type:Boolean},formItemProps:{}},emits:["updateFormItemRef"],setup(t,{emit:a}){const r=D.pluginManager.getComponent("form-item"),n=t,o=a,s=e.ref(),i=()=>{o("updateFormItemRef",s.value)};return(c,d)=>n.hasFormItem?(e.openBlock(),e.createBlock(e.unref(r),e.mergeProps({key:0,ref_key:"formItemRef",ref:s,onVnodeMounted:i},n.formItemProps),{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},16,["onVnodeMounted"])):e.renderSlot(c.$slots,"default",{key:1})}}),re=e.defineComponent({name:"ENode",__name:"node",props:{componentSchema:{},modelValue:{},ruleField:{},resetFormData:{type:Boolean},name:{},dynamicId:{},sourceDateUrl:{},id:{}},emits:["update:modelValue","change","update:dynamicId"],setup(t,{emit:a}){const{proxy:r}=e.getCurrentInstance(),n=t,o=e.ref(null);let s=e.inject("formData",e.reactive({}));const i=e.inject("slots",{}),c=e.inject("pageManager",{}),d=e.inject("disabled",{value:!1}),S=e.inject("ruleFieldPrefix",null),v=e.inject("resetFormData",!1);let l=e.reactive(V(n.componentSchema));p();async function y(m){if(["cascader","checkbox","select","radio"].includes(m.type)&&m.componentProps.dynamicId&&n.sourceDateUrl){const C=(await D.axios({url:n.sourceDateUrl,method:"get",params:{id:m.componentProps.dynamicId}})).data.data;let x=await D.axios({url:C.url,method:C.method,data:JSON.parse(C.body),params:JSON.parse(C.params),headers:JSON.parse(C.headers)});if(C&&(C!=null&&C.dataPath)){const fe=C.dataPath.split(".").reduce((pe,me)=>pe[me],x.data);m.componentProps.options=f(fe,C.dataKey,C.dataValue)}else m.componentProps.options=f(x.data,C.dataKey,C.dataValue);return m}return m}function f(m,k,I){return m&&Object.prototype.toString.call(m)==="[object Array]"?m.map(C=>C.children&&C.children.length?{label:C[k],value:C[I]+"",children:f(C.children,k,I)}:{label:C[k],value:C[I]+""}):[]}e.watch(()=>n.componentSchema,m=>{Z(l,m,["children"])||(B(l,V(m)),p())},{deep:!0});function p(){c.isDesignMode.value&&typeof l.field=="string"&&(l.field+="-design-mode")}(n.resetFormData||v)&&(s={});const u=a,E=e.ref(),P=e.ref(),h=m=>{P.value=m},w=e.useAttrs();Object.keys(w).length&&e.provide("nodeAttrs",w);const g=e.shallowRef(null),A=e.computed(()=>{var m,k;return(m=l.componentProps)!=null&&m.hidden?!1:typeof l.show=="boolean"?l.show:((k=l.show)==null?void 0:k.call(l,{values:s}))??!0}),_=e.computed(()=>{var C;const m=A.value&&((C=l.rules)==null?void 0:C.map(x=>({...x,validator:x.validator&&c.funcs.value[x.validator]})));let k=l.field;n.ruleField?k=n.ruleField:S&&l.field&&(k=V(S),k.push(l.field));const I={...l,rules:m,rule:m,field:k};return I.children&&delete I.children,I}),M=e.computed(()=>{var I,C;const m=((I=N.value)==null?void 0:I.bindModel)??"modelValue",k={};return l.on&&Object.keys(l.on).forEach(x=>{k[`on${j(x)}`]=(...X)=>c.doActions(l.on[x],...X)}),{...n,...l.componentProps,disabled:(d==null?void 0:d.value)||((C=l.componentProps)==null?void 0:C.disabled),bindModel:m,...k}}),N=e.computed(()=>D.pluginManager.getComponentConfingByType(l.type)??null);e.watchEffect(()=>{o.value=n.modelValue??s[l.field??""]}),e.watch(()=>o.value,()=>{o.value!==(n.modelValue??s[l.field??""])&&b(o.value)}),e.watch(()=>E.value,()=>{L()},{immediate:!0});function L(){var k;const m=E.value||r;l.id&&m&&(l.input&&(m.setValue=b,m.getValue=()=>s[l.field]||n.modelValue),m.setAttr=(I,C)=>(l.componentProps||(l.componentProps={}),l.componentProps[I]=C),m.getAttr=I=>l.componentProps[I],c.addComponentInstance(l.id,m),(k=N.value)!=null&&k.defaultSchema.input&&l.noFormItem!==!0&&P.value&&c.addComponentInstance(l.id+"formItem",P.value))}function W(){var m;l.id&&(c.removeComponentInstance(l.id),(m=N.value)!=null&&m.defaultSchema.input&&l.noFormItem!==!0&&c.removeComponentInstance(l.id+"formItem"))}async function z(){var k,I,C;if(l=await y(l),typeof((k=l.componentProps)==null?void 0:k.defaultValue)<"u"){const x=c.isDesignMode.value?(I=l.componentProps)==null?void 0:I.defaultValue:s[l.field]??((C=l.componentProps)==null?void 0:C.defaultValue);b(V(x))}if(l.type==="slot"){const x=l.slotName;if(!x)return;g.value=e.defineComponent({setup(){return()=>e.renderSlot(i,x,{componentSchema:l,model:s})}});return}const m=D.pluginManager.getComponent(l.type);if(!m){console.error(`组件${l.type}未注册`);return}if(typeof m=="function"){const x=await m();g.value=x.default??x}else g.value=m}function b(m){u("update:modelValue",m),u("change",m),l.field&&(s[l.field]=m),D.EventBus.emit("updateformData"+n.id,s)}function T(m){u("update:dynamicId",m)}let Y=null;return e.watch(()=>l,async m=>{const k=JSON.stringify({...m,children:void 0,componentProps:{...m.componentProps,options:null}});if(k===Y)return!1;Y=k,z()},{immediate:!0,deep:!0}),e.onUnmounted(W),(m,k)=>{var C;const I=e.resolveComponent("ENode");return g.value&&A.value?(e.openBlock(),e.createBlock(Ee,{key:0,hasFormItem:e.unref(l).noFormItem!==!0&&((C=N.value)==null?void 0:C.defaultSchema.input),formItemProps:_.value,onUpdateFormItemRef:h},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g.value),e.mergeProps({ref_key:"componentInstance",ref:E,onVnodeMounted:L,model:e.unref(s)},{...M.value},{[M.value.bindModel]:o.value,["onUpdate:"+M.value.bindModel]:k[0]||(k[0]=x=>o.value=x),[`onUpdate:${M.value.bindModel}`||""]:b,"onUpdate:dynamicId":T}),{node:e.withCtx(x=>[e.createVNode(I,e.mergeProps({id:n.id},x,{sourceDateUrl:n.sourceDateUrl}),null,16,["id","sourceDateUrl"])]),"edit-node":e.withCtx(()=>[e.renderSlot(m.$slots,"edit-node")]),_:3},16,["model"]))]),_:3},8,["hasFormItem","formItemProps"])):e.createCommentVNode("",!0)}}});function ke(){const t=e.ref(!1),a=Q(),r=e.ref({});function n(){return new Promise(f=>{if(t.value)f();else{const p=e.watch(t,()=>{p(),f()})}})}async function o(f="default"){var u;await n();const p=(u=r.value)==null?void 0:u[f];if(!p)throw new Error(`表单 [name=${f}] 不存在`);return p}async function s(f,p){const u=await o(f);return V(await p(u))}async function i(f="default"){return await s(f,p=>p.getData())}function c(f,p="default"){var E;a.setFormData(f,p);const u=(E=r.value)==null?void 0:E[p];u==null||u.clearValidate()}async function d(f="default"){return await s(f,async p=>(await p.validate(),await p.getData()))}async function S(f){await n();const p={};for(const u in r.value){const E=r.value[u];E&&(p[u]=V(await f(E)))}return p}async function v(){return await S(f=>f.getData())}function l(f){for(const p in f)c(f[p],p)}async function y(){return await S(async f=>(await f.validate(),await f.getData()))}return{ready:t,pageManager:a,forms:r,getData:i,setData:c,validate:d,getForms:v,setForms:l,validateAll:y,getFormInstance:o}}const De={key:0,class:"epic-loading-box"},Ae={class:"epic-builder-main"},xe={class:"epic-loading-box"},ae=e.defineComponent({__name:"builder",props:{pageSchema:{},formData:{},disabled:{type:Boolean},sourceDateUrl:{},id:{}},emits:["change","ready"],setup(t,{expose:a,emit:r}){const n=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),o=r,{ready:s,pageManager:i,forms:c,getData:d,setData:S,validate:v,getForms:l,setForms:y,validateAll:f,getFormInstance:p}=ke(),u=t,E=e.reactive({schemas:[]});e.watch(()=>u.pageSchema,g=>{B(E,g)},{immediate:!0,deep:!0}),e.watch(()=>u.formData,g=>{g&&S(g)},{immediate:!0,deep:!0}),e.watch(()=>E.script,g=>{g&&i.setMethods(g,!0)},{immediate:!0}),e.provide("slots",e.useSlots()),e.provide("pageManager",i),e.provide("forms",c),e.provide("pageSchema",E),e.provide("disabled",e.computed(()=>u.disabled));const P=e.getCurrentInstance(),h=P==null?void 0:P.proxy;function w(){e.nextTick(()=>{s.value=!0,o("ready",i),h&&i.addComponentInstance("builder",h)})}return D.EventBus.on("updateformData"+u.id,g=>{o("change",g)}),a({ready:s,pageManager:i,getData:d,setData:S,validate:v,getForms:l,setForms:y,validateAll:f,getFormInstance:p}),(g,A)=>e.unref(D.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:w},{default:e.withCtx(()=>[e.createElementVNode("div",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.schemas,(_,M)=>(e.openBlock(),e.createBlock(e.unref(re),{id:u.id,key:M,sourceDateUrl:u.sourceDateUrl,componentSchema:_},null,8,["id","sourceDateUrl","componentSchema"]))),128))])]),fallback:e.withCtx(()=>[e.createElementVNode("div",xe,[e.createVNode(e.unref(n))])]),_:1})):(e.openBlock(),e.createElementBlock("div",De))}});function G(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}function Ie(t){let a=0,r,n;const o=()=>{a-=1,n&&a<=0&&(n.stop(),r=void 0,n=void 0)};return(...s)=>(a+=1,n||(n=e.effectScope(!0),r=n.run(()=>t(...s))),G(o),r)}function $(t){return typeof t=="function"?t():e.unref(t)}const Pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _e=t=>typeof t<"u",Ve=Object.prototype.toString,Me=t=>Ve.call(t)==="[object Object]",Be=()=>{};function Ne(t){return e.getCurrentInstance()}function Fe(t,a=!0,r){Ne()?e.onMounted(t,r):a?t():e.nextTick(t)}function Oe(t=!1,a={}){const{truthyValue:r=!0,falsyValue:n=!1}=a,o=e.isRef(t),s=e.ref(t);function i(c){if(arguments.length)return s.value=c,s.value;{const d=$(r);return s.value=s.value===d?$(n):d,s.value}}return o?i:[s,i]}function Re(t,a,r){const n=e.watch(t,(...o)=>(e.nextTick(()=>n()),a(...o)),r);return n}const J=Pe?window:void 0;function F(t){var a;const r=$(t);return(a=r==null?void 0:r.$el)!=null?a:r}function $e(...t){let a,r,n,o;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,n,o]=t,a=J):[a,r,n,o]=t,!a)return Be;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const s=[],i=()=>{s.forEach(v=>v()),s.length=0},c=(v,l,y,f)=>(v.addEventListener(l,y,f),()=>v.removeEventListener(l,y,f)),d=e.watch(()=>[F(a),$(o)],([v,l])=>{if(i(),!v)return;const y=Me(l)?{...l}:l;s.push(...r.flatMap(f=>n.map(p=>c(v,f,p,y))))},{immediate:!0,flush:"post"}),S=()=>{d(),i()};return G(S),S}function Te(t){return typeof t=="function"?t:typeof t=="string"?a=>a.key===t:Array.isArray(t)?a=>t.includes(a.key):()=>!0}function se(...t){let a,r,n={};t.length===3?(a=t[0],r=t[1],n=t[2]):t.length===2?typeof t[1]=="object"?(a=!0,r=t[0],n=t[1]):(a=t[0],r=t[1]):(a=!0,r=t[0]);const{target:o=J,eventName:s="keydown",passive:i=!1,dedupe:c=!1}=n,d=Te(a);return $e(o,s,v=>{v.repeat&&$(c)||d(v)&&r(v)},i)}function H(t,a,r={}){return se(t,a,{...r,eventName:"keydown"})}function K(t,a,r={}){return se(t,a,{...r,eventName:"keyup"})}function Ue(){const t=e.ref(!1),a=e.getCurrentInstance();return a&&e.onMounted(()=>{t.value=!0},a),t}function qe(t){const a=Ue();return e.computed(()=>(a.value,!!t()))}function Le(t){return JSON.parse(JSON.stringify(t))}function le(t,a,r={}){const{window:n=J,...o}=r;let s;const i=qe(()=>n&&"ResizeObserver"in n),c=()=>{s&&(s.disconnect(),s=void 0)},d=e.computed(()=>{const l=$(t);return Array.isArray(l)?l.map(y=>F(y)):[F(l)]}),S=e.watch(d,l=>{if(c(),i.value&&n){s=new ResizeObserver(a);for(const y of l)y&&s.observe(y,o)}},{immediate:!0,flush:"post"}),v=()=>{c(),S()};return G(v),{isSupported:i,stop:v}}function ze(t,a={width:0,height:0},r={}){const{window:n=J,box:o="content-box"}=r,s=e.computed(()=>{var l,y;return(y=(l=F(t))==null?void 0:l.namespaceURI)==null?void 0:y.includes("svg")}),i=e.ref(a.width),c=e.ref(a.height),{stop:d}=le(t,([l])=>{const y=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(n&&s.value){const f=F(t);if(f){const p=f.getBoundingClientRect();i.value=p.width,c.value=p.height}}else if(y){const f=Array.isArray(y)?y:[y];i.value=f.reduce((p,{inlineSize:u})=>p+u,0),c.value=f.reduce((p,{blockSize:u})=>p+u,0)}else i.value=l.contentRect.width,c.value=l.contentRect.height},r);Fe(()=>{const l=F(t);l&&(i.value="offsetWidth"in l?l.offsetWidth:a.width,c.value="offsetHeight"in l?l.offsetHeight:a.height)});const S=e.watch(()=>F(t),l=>{i.value=l?a.width:0,c.value=l?a.height:0});function v(){d(),S()}return{width:i,height:c,stop:v}}function Je(t,a,r,n={}){var o,s,i;const{clone:c=!1,passive:d=!1,eventName:S,deep:v=!1,defaultValue:l,shouldEmit:y}=n,f=e.getCurrentInstance(),p=r||(f==null?void 0:f.emit)||((o=f==null?void 0:f.$emit)==null?void 0:o.bind(f))||((i=(s=f==null?void 0:f.proxy)==null?void 0:s.$emit)==null?void 0:i.bind(f==null?void 0:f.proxy));let u=S;a||(a="modelValue"),u=u||`update:${a.toString()}`;const E=w=>c?typeof c=="function"?c(w):Le(w):w,P=()=>_e(t[a])?E(t[a]):l,h=w=>{y?y(w)&&p(u,w):p(u,w)};if(d){const w=P(),g=e.ref(w);let A=!1;return e.watch(()=>t[a],_=>{A||(A=!0,g.value=E(_),e.nextTick(()=>A=!1))}),e.watch(g,_=>{!A&&(_!==t[a]||v)&&h(_)},{deep:v}),g}else return e.computed({get(){return P()},set(w){h(w)}})}function We(){const{isDark:t}=q(),a=Oe(t);return{isDark:t,toggleDark:a}}function ie(){const t=e.ref(!1);return e.onMounted(()=>{ce(t),He(t)}),e.watch(()=>t.value,()=>{t.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}),{isDark:t}}function ce(t){var a=document.documentElement;a&&(a.classList.contains("dark")?t.value=!0:t.value=!1)}function He(t){var a=document.querySelector("html"),r=new MutationObserver(function(n){for(var o of n)if(o.type==="attributes"&&o.attributeName==="class"){const s=o.target;new Array(...s.classList).includes("dark")?t.value=!0:t.value=!1}});r.observe(a,{attributes:!0,attributeFilter:["class"]}),e.onUnmounted(()=>{r.disconnect()})}function ue(){const t=e.ref(1),a=e.ref(!1),{isDark:r}=ie(),{pressSpace:n,pressShift:o,pressCtrl:s}=de();return{canvasScale:t,pressSpace:n,pressShift:o,pressCtrl:s,disabledZoom:a,isDark:r}}const q=Ie(ue);function de(){const t=e.ref(!1),a=e.ref(!1),r=e.ref(!1);return H(" ",()=>{t.value=!0}),K(" ",()=>{t.value=!1}),H("Shift",n=>{n.preventDefault(),a.value=!0}),K("Shift",()=>{a.value=!1}),H("Control",n=>{n.preventDefault(),r.value=!0}),K("Control",()=>{r.value=!1}),{pressSpace:t,pressShift:a,pressCtrl:r}}function Ke(t){const{pressSpace:a}=q(),r=new Image(1,1);r.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==";let n=0,o=0;function s(d){var S;a.value&&(n=d.x,o=d.y,(S=d.dataTransfer)==null||S.setDragImage(document.createElement("div"),0,0))}function i(d){if(d.preventDefault(),!d.x||!d.y||!a.value)return;const S=d.x-n,v=d.y-o;n=d.x,o=d.y,t.value&&(t.value.scrollTop-=v,t.value.scrollLeft-=S)}function c(){a.value=!1}return{handleElementDragStart:s,handleElementDrag:i,handleElementDragEnd:c}}function Ze(t){const{pressCtrl:a,canvasScale:r,disabledZoom:n}=q();function o(s){if(!a.value||n.value)return;s.preventDefault();let i=0;s.deltaY<0?i=r.value+.05:i=r.value-.05,!(i>150||i<.5)&&(r.value=i)}return e.watch(()=>r.value,s=>{t.value&&!n.value&&(t.value.style.transform=`scale(${s})`)}),{handleZoom:o,canvasScale:r}}function Qe(t,a=16.66){let r;function n(){o(),r=window.setInterval(t,a)}function o(){window.clearInterval(r)}return{startTimedQuery:n,stopTimedQuery:o}}const Ge={class:"min-w-750px rounded"},Ye={class:"h-full rounded"},Xe=e.defineComponent({__name:"index",setup(t,{expose:a}){const r=D.pluginManager.getComponent("monacoEditor"),n=D.pluginManager.getComponent("modal"),o=e.ref(null),s=e.ref(!1),i=e.ref(!1),c=e.ref({}),d=e.inject("pageSchema"),S=e.ref(null),v=e.ref("");function l(){i.value=!1}function y(){s.value=!1}function f(){s.value=!0,v.value=U()}async function p(){try{let u=await S.value.validateAll();if(!Object.keys(u).length){alert("请添加表单组件后再尝试!");return}Object.keys(u).length===1&&(u=u.default),c.value=JSON.stringify(u,null,2),e.nextTick(()=>{var E;(E=o.value)==null||E.setValue(c.value)}),i.value=!0}catch(u){console.error(u)}}return a({handleOpen:f}),(u,E)=>(e.openBlock(),e.createBlock(e.unref(n),{modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=P=>s.value=P),title:"预览",class:"w-900px",width:"900px",onClose:y,onOk:p,okText:"表单数据"},{default:e.withCtx(()=>[e.createElementVNode("div",Ge,[(e.openBlock(),e.createBlock(e.unref(ae),{key:v.value,ref_key:"kb",ref:S,"page-schema":e.unref(d)},null,8,["page-schema"])),e.createVNode(e.unref(n),{modelValue:i.value,"onUpdate:modelValue":E[0]||(E[0]=P=>i.value=P),title:"表单数据",class:"w-860px",width:"860px",onClose:l,onOk:l},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[e.createVNode(e.unref(r),{ref_key:"monacoEditorRef",ref:o,autoToggleTheme:"",readOnly:"",class:"h-full editor","model-value":c.value},null,8,["model-value"])])]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]))}}),je={key:0,class:"epic-loading-box"},et={class:"epic-designer-main"},tt={class:"epic-header-container"},nt={class:"epic-loading-box"},ot=e.defineComponent({__name:"designer",props:{disabledZoom:{type:Boolean,default:!1},hiddenHeader:{type:Boolean,default:!1},lockDefaultSchemaEdit:{type:Boolean,default:!1},formMode:{type:Boolean,default:!1},title:{default:"EpicDesigner默认项目"},defaultSchema:{},sourceCodeReadOnly:{type:Boolean},source:{default:[]},updateSourceId:{}},emits:["ready","save","reset","toggleDeviceMode","saveSourceData","deleteSourceData","updateSourceData"],setup(t,{expose:a,emit:r}){const n=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-1afOcXnV.cjs"))),o=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BJlPL6eL.cjs"))),s=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BvRS3i9N.cjs"))),i=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C6ceZM1C.cjs"))),c=D.loadAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cap7FkuS.cjs"))),d=Q(),S=oe(),v=t;let l={schemas:[{type:"form",id:"root",label:"页面",children:[],componentProps:{name:"表单",style:{padding:"16px"}}}],script:`const { defineExpose, find } = epic;
2
-
3
- function test (){
4
- console.log('test')
5
- }
6
-
7
- // 通过defineExpose暴露的函数或者属性
8
- defineExpose({
9
- test
10
- })`};e.watchEffect(()=>{if(v.defaultSchema){l=v.defaultSchema;return}v.source&&D.pluginManager.setSourceData(v.source),v.formMode&&(l.schemas=D.pluginManager.formSchemas)}),d.setDesignMode(),d.setDefaultComponentIds(l.schemas);const y=r,f=e.ref(null),p=e.reactive({checkedNode:null,hoverNode:null,disableHover:!1,matched:[]}),u=e.reactive({schemas:[],script:l.script}),{disabledZoom:E}=q();e.watchEffect(()=>{E.value=v.disabledZoom}),e.watchEffect(()=>{const b=u.script;b&&b!==""&&d.setMethods(b)}),e.provide("pageSchema",u),e.provide("revoke",S),e.provide("pageManager",d),e.provide("designerProps",e.computed(()=>v)),e.provide("designer",{setCheckedNode:h,setHoverNode:w,setDisableHover:A,handleToggleDeviceMode:W,reset:N,state:p}),D.EventBus.on("saveSourceData",b=>{y("saveSourceData",b)}),D.EventBus.on("deleteSourceData",b=>{y("deleteSourceData",b)}),D.EventBus.on("updateSourceData",b=>{y("updateSourceData",b)});function P(){u.schemas=V(l.schemas),h(u.schemas[0]),S.push(u.schemas,"初始化撤销功能")}async function h(b=u.schemas[0]){p.checkedNode=b,p.matched=ee(u.schemas,b.id)}async function w(b=null){var T;if(!b||p.disableHover)return p.hoverNode=null,!1;if((b==null?void 0:b.id)===((T=p.hoverNode)==null?void 0:T.id))return!1;p.hoverNode=b}function g(){e.nextTick(()=>{y("ready",{pageManager:d})})}async function A(b=!1){p.disableHover=b}function _(b){B(u,V(b))}function M(){return e.toRaw(u)}function N(){Z(u.schemas,l.schemas)&&u.script===l.script||(B(u.schemas,l.schemas),u.script=l.script,h(u.schemas[0]),S.push(u.schemas,"重置操作"),y("reset",u))}function L(){y("save",e.toRaw(u))}function W(b){y("toggleDeviceMode",b)}function z(){f.value.handleOpen()}return P(),a({revoke:S,setData:_,getData:M,reset:N,preview:z}),(b,T)=>e.unref(D.pluginManager).initialized.value?(e.openBlock(),e.createBlock(e.Suspense,{key:1,onResolve:g},{default:e.withCtx(()=>[e.createElementVNode("div",et,[e.createElementVNode("div",tt,[e.renderSlot(b.$slots,"header",{},()=>[v.hiddenHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(n),{key:0,onPreview:z,onSave:L},{header:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),prefix:e.withCtx(()=>[e.renderSlot(b.$slots,"header-prefix")]),title:e.withCtx(()=>[e.renderSlot(b.$slots,"header-title")]),"right-prefix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-prefix")]),"right-action":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-action")]),"right-suffix":e.withCtx(()=>[e.renderSlot(b.$slots,"header-right-suffix")]),_:3}))])]),e.createElementVNode("div",{class:e.normalizeClass(["epic-split-view-container",{"hidden-header":b.hiddenHeader}])},[e.createVNode(e.unref(o)),e.createVNode(e.unref(s)),e.createVNode(e.unref(i))],2),e.createVNode(Xe,{ref_key:"previewRef",ref:f},null,512)])]),fallback:e.withCtx(()=>[e.createElementVNode("div",nt,[e.createVNode(e.unref(c))])]),_:3})):(e.openBlock(),e.createElementBlock("div",je))}}),rt={component:async()=>await Promise.resolve().then(()=>require("./index-BqPBE6Y2.cjs")),defaultSchema:{label:"代码编辑器",type:"monacoEditor",field:"monacoEditor",icon:"epic-icon-write",input:!0},config:{attribute:[{label:"字段名",type:"input",field:"field"},{label:"标题",type:"input",field:"label"},{label:"默认值",type:"monacoEditor",field:"componentProps.defaultValue"}]},bindModel:"model-value"},at={component:async()=>await Promise.resolve().then(()=>require("./index-Ch9jeYmj.cjs")),defaultSchema:{label:"页面",type:"page",componentProps:{},children:[]},config:{attribute:[{label:"页面名称",type:"input",componentProps:{placeholder:"请输入"},field:"componentProps.name"}]}};function st(t){t.component("EInputSize",async()=>await Promise.resolve().then(()=>require("./index-DpzLP1Zp.cjs"))),t.component("EColEditor",async()=>await Promise.resolve().then(()=>require("./index-BffcOK9E.cjs"))),t.component("EActionEditor",async()=>await Promise.resolve().then(()=>require("./index-DWA3Pa6_.cjs"))),t.component("ERuleEditor",async()=>await Promise.resolve().then(()=>require("./index-i26diW3P.cjs"))),t.component("EOptionsEditor",async()=>await Promise.resolve().then(()=>require("./index-Bl9bHpGb.cjs"))),t.component("ENode",async()=>await Promise.resolve().then(()=>require("./index-CKl_FM23.cjs"))),t.component("EDataSource",async()=>await Promise.resolve().then(()=>require("./index-B03W7FZR.cjs"))),t.registerActivitybar({id:"component_view",title:"组件",icon:"icon--epic--extension-outline",component:async()=>await Promise.resolve().then(()=>require("./index-C7Rkr11-.cjs"))}),t.registerActivitybar({id:"outline_view",title:"大纲",icon:"icon--epic--account-tree-outline-rounded",component:async()=>await Promise.resolve().then(()=>require("./outline-CJSEUbgc.cjs"))}),t.registerRightSidebar({id:"attribute_view",title:"属性",component:async()=>await Promise.resolve().then(()=>require("./attributeView-CkX6fubE.cjs"))}),t.registerRightSidebar({id:"style_view",title:"样式",component:async()=>await Promise.resolve().then(()=>require("./styleView-D_DJWtjt.cjs"))}),[rt,at].forEach(r=>{t.registerComponent(r)})}st(D.pluginManager);exports._sfc_main=re;exports._sfc_main$1=ae;exports._sfc_main$2=ot;exports.capitalizeFirstLetter=j;exports.convertKFormData=be;exports.debounce=Ce;exports.deepClone=V;exports.deepCompareAndModify=B;exports.deepEqual=Z;exports.findSchemaById=we;exports.findSchemaInfoById=Se;exports.findSchemas=R;exports.generateNewSchema=he;exports.getDarkState=ce;exports.getFormFields=ye;exports.getFormSchemas=te;exports.getMatchedById=ee;exports.getUUID=U;exports.getValueByPath=ve;exports.initStore=ue;exports.mapSchemas=ne;exports.recursionConvertedNode=O;exports.setValueByPath=ge;exports.useDark=ie;exports.useElementDrag=Ke;exports.useElementSize=ze;exports.useElementZoom=Ze;exports.useKeyPress=de;exports.usePageManager=Q;exports.useResizeObserver=le;exports.useRevoke=oe;exports.useStore=q;exports.useTheme=We;exports.useTimedQuery=Qe;exports.useVModel=Je;exports.watchOnce=Re;
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./index-QcfCoknU.js";
2
- export {
3
- f as default
4
- };
@@ -1,137 +0,0 @@
1
- import { watch as R, nextTick as U, ref as n, onMounted as A, onUnmounted as H, openBlock as N, createElementBlock as O, normalizeStyle as E, createElementVNode as i, createVNode as x, unref as b, withCtx as w, createTextVNode as P } from "vue";
2
- import { p as F, a as I } from "./axios-ITY6Uw7A.js";
3
- import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const L = { class: "btn" }, G = { class: "btns" }, J = {
5
- __name: "sign",
6
- props: {
7
- componentSchema: {
8
- type: Object,
9
- require: !0,
10
- default: () => ({})
11
- }
12
- },
13
- emits: ["update:modelValue"],
14
- setup(_, { expose: k, emit: S }) {
15
- const d = F.getComponent("button"), T = S, a = _;
16
- R(
17
- () => a.componentSchema,
18
- () => {
19
- U(() => {
20
- v();
21
- });
22
- },
23
- { deep: !0, immediate: !0 }
24
- );
25
- const C = new ResizeObserver((t) => {
26
- for (const e of t)
27
- e.target && e.target.clientWidth && e.target.clientHeight && v();
28
- }), l = n(null), s = n(null), o = n(), D = n("");
29
- function v() {
30
- var t, e;
31
- s.value && ((t = s.value) != null && t.clientHeight) && ((e = s.value) != null && e.clientWidth) && (l.value.height = s.value.clientHeight, l.value.width = s.value.clientWidth, o.value = l.value.getContext("2d"), o.value.lineWidth = a.componentSchema.componentProps.lineWidth || 4, a.componentSchema && a.componentSchema.componentProps && a.componentSchema.componentProps.style && a.componentSchema.componentProps.style.color && (o.value.strokeStyle = a.componentSchema.componentProps.style.color), D.value = l.value.getBoundingClientRect());
32
- }
33
- const r = n(""), c = n(""), W = n(""), B = n(""), u = n([]), m = n(!1);
34
- function M(t) {
35
- t = t || event, t.preventDefault();
36
- let e = {
37
- x: t.offsetX,
38
- y: t.offsetY
39
- };
40
- r.value = e.x, c.value = e.y, o.value.beginPath(), o.value.moveTo(e.x, e.y), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), u.value.push(e), m.value = !0;
41
- }
42
- function z(t) {
43
- if (t = t || event, t.preventDefault(), m.value) {
44
- let e = {
45
- x: t.offsetX,
46
- y: t.offsetY
47
- };
48
- W.value = e.x, B.value = e.y, o.value.beginPath(), o.value.moveTo(r.value, c.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), r.value = e.x, c.value = e.y, u.value.push(e);
49
- }
50
- }
51
- function V(t) {
52
- t = t || event, t.preventDefault();
53
- let e = {
54
- x: t.offsetX,
55
- y: t.offsetY
56
- };
57
- o.value.beginPath(), o.value.moveTo(r.value, c.value), o.value.lineTo(e.x, e.y), o.value.stroke(), o.value.closePath(), u.value.push(e), u.value.push({ x: -1, y: -1 }), m.value = !1;
58
- }
59
- function h() {
60
- o.value.clearRect(0, 0, l.value.width, l.value.height), u.value = [];
61
- }
62
- async function f() {
63
- let t = await X(l.value.toDataURL("image/png"));
64
- T("update:modelValue", t);
65
- }
66
- async function X(t) {
67
- let e = atob(t.split(",")[1]), y = new ArrayBuffer(e.length), Y = new Uint8Array(y);
68
- for (let p = 0; p < e.length; p++)
69
- Y[p] = e.charCodeAt(p);
70
- let j = new Blob([y], { type: "image/png" }), g = new FormData();
71
- return g.append("file", j, Date.now() + "png"), (await I({
72
- method: "post",
73
- url: "https://ess-ds.com/prod-api/center-file/file/upload",
74
- data: g,
75
- headers: {
76
- "Content-Type": "multipart/form-data"
77
- }
78
- })).data.data.url;
79
- }
80
- return A(() => {
81
- v(), C.observe(s.value);
82
- }), H(() => {
83
- }), k({
84
- surewrite: f
85
- }), (t, e) => (N(), O("div", {
86
- class: "sign",
87
- style: E({
88
- height: a.componentSchema.componentProps.style.height,
89
- width: a.componentSchema.componentProps.style.width || "100%"
90
- })
91
- }, [
92
- i("div", {
93
- class: "canvas",
94
- ref_key: "canvasWrap",
95
- ref: s
96
- }, [
97
- i("canvas", {
98
- ref_key: "canvas",
99
- ref: l,
100
- onMousedown: M,
101
- onMousemove: z,
102
- onMouseup: V
103
- }, null, 544)
104
- ], 512),
105
- i("div", L, [
106
- e[2] || (e[2] = i("div", { class: "remark" }, null, -1)),
107
- i("div", G, [
108
- x(b(d), {
109
- type: "info",
110
- size: "mini",
111
- onClick: h,
112
- onTouch: h
113
- }, {
114
- default: w(() => e[0] || (e[0] = [
115
- P("重写")
116
- ])),
117
- _: 1
118
- }),
119
- x(b(d), {
120
- type: "primary",
121
- size: "mini",
122
- onClick: f,
123
- onTouch: f
124
- }, {
125
- default: w(() => e[1] || (e[1] = [
126
- P("确定")
127
- ])),
128
- _: 1
129
- })
130
- ])
131
- ])
132
- ], 4));
133
- }
134
- }, ee = /* @__PURE__ */ q(J, [["__scopeId", "data-v-e972b6e0"]]);
135
- export {
136
- ee as default
137
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),g=require("./axios-CYGTE3lR.cjs"),B=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E={class:"btn"},j={class:"btns"},z={__name:"sign",props:{componentSchema:{type:Object,require:!0,default:()=>({})}},emits:["update:modelValue"],setup(x,{expose:b,emit:w}){const f=g.pluginManager.getComponent("button"),P=w,a=x;t.watch(()=>a.componentSchema,()=>{t.nextTick(()=>{p()})},{deep:!0,immediate:!0});const S=new ResizeObserver(o=>{for(const e of o)e.target&&e.target.clientWidth&&e.target.clientHeight&&p()}),l=t.ref(null),s=t.ref(null),n=t.ref(),_=t.ref("");function p(){var o,e;s.value&&((o=s.value)!=null&&o.clientHeight)&&((e=s.value)!=null&&e.clientWidth)&&(l.value.height=s.value.clientHeight,l.value.width=s.value.clientWidth,n.value=l.value.getContext("2d"),n.value.lineWidth=a.componentSchema.componentProps.lineWidth||4,a.componentSchema&&a.componentSchema.componentProps&&a.componentSchema.componentProps.style&&a.componentSchema.componentProps.style.color&&(n.value.strokeStyle=a.componentSchema.componentProps.style.color),_.value=l.value.getBoundingClientRect())}const r=t.ref(""),i=t.ref(""),T=t.ref(""),k=t.ref(""),u=t.ref([]),v=t.ref(!1);function V(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};r.value=e.x,i.value=e.y,n.value.beginPath(),n.value.moveTo(e.x,e.y),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),u.value.push(e),v.value=!0}function C(o){if(o=o||event,o.preventDefault(),v.value){let e={x:o.offsetX,y:o.offsetY};T.value=e.x,k.value=e.y,n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),r.value=e.x,i.value=e.y,u.value.push(e)}}function N(o){o=o||event,o.preventDefault();let e={x:o.offsetX,y:o.offsetY};n.value.beginPath(),n.value.moveTo(r.value,i.value),n.value.lineTo(e.x,e.y),n.value.stroke(),n.value.closePath(),u.value.push(e),u.value.push({x:-1,y:-1}),v.value=!1}function d(){n.value.clearRect(0,0,l.value.width,l.value.height),u.value=[]}async function m(){let o=await D(l.value.toDataURL("image/png"));P("update:modelValue",o)}async function D(o){let e=atob(o.split(",")[1]),h=new ArrayBuffer(e.length),M=new Uint8Array(h);for(let c=0;c<e.length;c++)M[c]=e.charCodeAt(c);let W=new Blob([h],{type:"image/png"}),y=new FormData;return y.append("file",W,Date.now()+"png"),(await g.axios({method:"post",url:"https://ess-ds.com/prod-api/center-file/file/upload",data:y,headers:{"Content-Type":"multipart/form-data"}})).data.data.url}return t.onMounted(()=>{p(),S.observe(s.value)}),t.onUnmounted(()=>{}),b({surewrite:m}),(o,e)=>(t.openBlock(),t.createElementBlock("div",{class:"sign",style:t.normalizeStyle({height:a.componentSchema.componentProps.style.height,width:a.componentSchema.componentProps.style.width||"100%"})},[t.createElementVNode("div",{class:"canvas",ref_key:"canvasWrap",ref:s},[t.createElementVNode("canvas",{ref_key:"canvas",ref:l,onMousedown:V,onMousemove:C,onMouseup:N},null,544)],512),t.createElementVNode("div",E,[e[2]||(e[2]=t.createElementVNode("div",{class:"remark"},null,-1)),t.createElementVNode("div",j,[t.createVNode(t.unref(f),{type:"info",size:"mini",onClick:d,onTouch:d},{default:t.withCtx(()=>e[0]||(e[0]=[t.createTextVNode("重写")])),_:1}),t.createVNode(t.unref(f),{type:"primary",size:"mini",onClick:m,onTouch:m},{default:t.withCtx(()=>e[1]||(e[1]=[t.createTextVNode("确定")])),_:1})])])],4))}},X=B._export_sfc(z,[["__scopeId","data-v-e972b6e0"]]);exports.default=X;