(function(global, factory) {
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("mockjs"), require("lodash"), require("pinia"), require("vuedraggable"), require("@vue-monaco/editor"), require("uuid")) : typeof define === "function" && define.amd ? define(["exports", "vue", "mockjs", "lodash", "pinia", "vuedraggable", "@vue-monaco/editor", "uuid"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["element-easy-form"] = {}, global.Vue, global.Mock, global.lodash, global.pinia, global.draggable, global.editor, global.uuid));
})(this, function(exports2, vue, Mock, lodash, pinia, draggable, editor, uuid) {
  "use strict";
  var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
    ComponentType2["DragForm"] = "DragForm";
    ComponentType2["ElTableColumns"] = "ElTableColumns";
    ComponentType2["ElementEasyForm"] = "ElementEasyForm";
    ComponentType2["ElementFormRender"] = "ElementFormRender";
    ComponentType2["ElDragTable"] = "ElDragTable";
    ComponentType2["ElDragTableColumns"] = "ElDragTableColumns";
    ComponentType2["ElFunctionEvent"] = "ElFunctionEvent";
    ComponentType2["ElFunctionHidden"] = "ElFunctionHidden";
    ComponentType2["LineTitle"] = "LineTitle";
    ComponentType2["ElCascaderProps"] = "ElCascaderProps";
    ComponentType2["ElSliderMarks"] = "ElSliderMarks";
    ComponentType2["ElRateColors"] = "ElRateColors";
    ComponentType2["ElCheckboxs"] = "ElCheckboxs";
    ComponentType2["ElRadios"] = "ElRadios";
    ComponentType2["ElSelectOption"] = "ElSelectOption";
    ComponentType2["ElRowAttrs"] = "ElRowAttrs";
    ComponentType2["ElAffix"] = "ElAffix";
    ComponentType2["ElAlert"] = "ElAlert";
    ComponentType2["ElAside"] = "ElAside";
    ComponentType2["ElAutoResizer"] = "ElAutoResizer";
    ComponentType2["ElAutocomplete"] = "ElAutocomplete";
    ComponentType2["ElAvatar"] = "ElAvatar";
    ComponentType2["ElBacktop"] = "ElBacktop";
    ComponentType2["ElBadge"] = "ElBadge";
    ComponentType2["ElBreadcrumb"] = "ElBreadcrumb";
    ComponentType2["ElBreadcrumbItem"] = "ElBreadcrumbItem";
    ComponentType2["ElButton"] = "ElButton";
    ComponentType2["ElButtonGroup"] = "ElButtonGroup";
    ComponentType2["ElCalendar"] = "ElCalendar";
    ComponentType2["ElCard"] = "ElCard";
    ComponentType2["ElCarousel"] = "ElCarousel";
    ComponentType2["ElCarouselItem"] = "ElCarouselItem";
    ComponentType2["ElCascader"] = "ElCascader";
    ComponentType2["ElCascaderPanel"] = "ElCascaderPanel";
    ComponentType2["ElCheckTag"] = "ElCheckTag";
    ComponentType2["ElCheckbox"] = "ElCheckbox";
    ComponentType2["ElCheckboxButton"] = "ElCheckboxButton";
    ComponentType2["ElCheckboxGroup"] = "ElCheckboxGroup";
    ComponentType2["ElCol"] = "ElCol";
    ComponentType2["ElCollapse"] = "ElCollapse";
    ComponentType2["ElCollapseItem"] = "ElCollapseItem";
    ComponentType2["ElCollapseTransition"] = "ElCollapseTransition";
    ComponentType2["ElCollection"] = "ElCollection";
    ComponentType2["ElCollectionItem"] = "ElCollectionItem";
    ComponentType2["ElColorPicker"] = "ElColorPicker";
    ComponentType2["ElConfigProvider"] = "ElConfigProvider";
    ComponentType2["ElContainer"] = "ElContainer";
    ComponentType2["ElCountdown"] = "ElCountdown";
    ComponentType2["ElDatePicker"] = "ElDatePicker";
    ComponentType2["ElDescriptions"] = "ElDescriptions";
    ComponentType2["ElDescriptionsItem"] = "ElDescriptionsItem";
    ComponentType2["ElDialog"] = "ElDialog";
    ComponentType2["ElDivider"] = "ElDivider";
    ComponentType2["ElDrawer"] = "ElDrawer";
    ComponentType2["ElDropdown"] = "ElDropdown";
    ComponentType2["ElDropdownItem"] = "ElDropdownItem";
    ComponentType2["ElDropdownMenu"] = "ElDropdownMenu";
    ComponentType2["ElEmpty"] = "ElEmpty";
    ComponentType2["ElFooter"] = "ElFooter";
    ComponentType2["ElForm"] = "ElForm";
    ComponentType2["ElFormItem"] = "ElFormItem";
    ComponentType2["ElHeader"] = "ElHeader";
    ComponentType2["ElIcon"] = "ElIcon";
    ComponentType2["ElImage"] = "ElImage";
    ComponentType2["ElImageViewer"] = "ElImageViewer";
    ComponentType2["ElInfiniteScroll"] = "ElInfiniteScroll";
    ComponentType2["ElInput"] = "ElInput";
    ComponentType2["ElInputNumber"] = "ElInputNumber";
    ComponentType2["ElLink"] = "ElLink";
    ComponentType2["ElLoading"] = "ElLoading";
    ComponentType2["ElLoadingDirective"] = "ElLoadingDirective";
    ComponentType2["ElLoadingService"] = "ElLoadingService";
    ComponentType2["ElMain"] = "ElMain";
    ComponentType2["ElMenu"] = "ElMenu";
    ComponentType2["ElMenuItem"] = "ElMenuItem";
    ComponentType2["ElMenuItemGroup"] = "ElMenuItemGroup";
    ComponentType2["ElMessage"] = "ElMessage";
    ComponentType2["ElMessageBox"] = "ElMessageBox";
    ComponentType2["ElNotification"] = "ElNotification";
    ComponentType2["ElOption"] = "ElOption";
    ComponentType2["ElOptionGroup"] = "ElOptionGroup";
    ComponentType2["ElOverlay"] = "ElOverlay";
    ComponentType2["ElPageHeader"] = "ElPageHeader";
    ComponentType2["ElPagination"] = "ElPagination";
    ComponentType2["ElPopconfirm"] = "ElPopconfirm";
    ComponentType2["ElPopover"] = "ElPopover";
    ComponentType2["ElPopoverDirective"] = "ElPopoverDirective";
    ComponentType2["ElPopper"] = "ElPopper";
    ComponentType2["ElPopperArrow"] = "ElPopperArrow";
    ComponentType2["ElPopperContent"] = "ElPopperContent";
    ComponentType2["ElPopperTrigger"] = "ElPopperTrigger";
    ComponentType2["ElProgress"] = "ElProgress";
    ComponentType2["ElRadio"] = "ElRadio";
    ComponentType2["ElRadioButton"] = "ElRadioButton";
    ComponentType2["ElRadioGroup"] = "ElRadioGroup";
    ComponentType2["ElRate"] = "ElRate";
    ComponentType2["ElResult"] = "ElResult";
    ComponentType2["ElRow"] = "ElRow";
    ComponentType2["ElScrollbar"] = "ElScrollbar";
    ComponentType2["ElSelect"] = "ElSelect";
    ComponentType2["ElSelectV2"] = "ElSelectV2";
    ComponentType2["ElSkeleton"] = "ElSkeleton";
    ComponentType2["ElSkeletonItem"] = "ElSkeletonItem";
    ComponentType2["ElSlider"] = "ElSlider";
    ComponentType2["ElSpace"] = "ElSpace";
    ComponentType2["ElStatistic"] = "ElStatistic";
    ComponentType2["ElStep"] = "ElStep";
    ComponentType2["ElSteps"] = "ElSteps";
    ComponentType2["ElSubMenu"] = "ElSubMenu";
    ComponentType2["ElSwitch"] = "ElSwitch";
    ComponentType2["ElTabPane"] = "ElTabPane";
    ComponentType2["ElTable"] = "ElTable";
    ComponentType2["ElTableColumn"] = "ElTableColumn";
    ComponentType2["ElTableV2"] = "ElTableV2";
    ComponentType2["ElTabs"] = "ElTabs";
    ComponentType2["ElTag"] = "ElTag";
    ComponentType2["ElText"] = "ElText";
    ComponentType2["ElTimePicker"] = "ElTimePicker";
    ComponentType2["ElTimeSelect"] = "ElTimeSelect";
    ComponentType2["ElTimeline"] = "ElTimeline";
    ComponentType2["ElTimelineItem"] = "ElTimelineItem";
    ComponentType2["ElTooltip"] = "ElTooltip";
    ComponentType2["ElTour"] = "ElTour";
    ComponentType2["ElTourStep"] = "ElTourStep";
    ComponentType2["ElTransfer"] = "ElTransfer";
    ComponentType2["ElTree"] = "ElTree";
    ComponentType2["ElTreeSelect"] = "ElTreeSelect";
    ComponentType2["ElTreeV2"] = "ElTreeV2";
    ComponentType2["ElUpload"] = "ElUpload";
    ComponentType2["ElWatermark"] = "ElWatermark";
    return ComponentType2;
  })(ComponentType || {});
  var AttrType = /* @__PURE__ */ ((AttrType2) => {
    AttrType2["FORMITEM"] = "FORMITEM";
    AttrType2["COMPONENT"] = "COMPONENT";
    AttrType2["LAYOUT"] = "LAYOUT";
    AttrType2["POSITION"] = "position";
    return AttrType2;
  })(AttrType || {});
  var AttrPropType = /* @__PURE__ */ ((AttrPropType2) => {
    AttrPropType2["ElCOLSPAN"] = "ElColSpan";
    AttrPropType2["ElOPTIONS"] = "ElOptions";
    AttrPropType2["ElCHECHKBOXS"] = "ElCheckboxs";
    AttrPropType2["ElRADIOS"] = "ElRadios";
    return AttrPropType2;
  })(AttrPropType || {});
  var ExportType = /* @__PURE__ */ ((ExportType2) => {
    ExportType2["CODE"] = "code";
    ExportType2["JSON"] = "json";
    ExportType2["SourceCode"] = "sourceCode";
    return ExportType2;
  })(ExportType || {});
  var RulesType = /* @__PURE__ */ ((RulesType2) => {
    RulesType2["email"] = "email";
    RulesType2["number"] = "number";
    return RulesType2;
  })(RulesType || {});
  var SelectFuntion = /* @__PURE__ */ ((SelectFuntion2) => {
    SelectFuntion2["SELECT"] = "select";
    SelectFuntion2["FUNCTION"] = "function";
    SelectFuntion2["AND"] = "&&";
    SelectFuntion2["OR"] = "||";
    return SelectFuntion2;
  })(SelectFuntion || {});
  var JSONType = /* @__PURE__ */ ((JSONType2) => {
    JSONType2["DRAGFORM"] = "drag-form";
    JSONType2["ELEMENTEASYFORM"] = "element-easy-form";
    JSONType2["ALL"] = "all";
    return JSONType2;
  })(JSONType || {});
  const rules = {
    [RulesType.email]: [{ type: RulesType.email, message: "请输入邮箱地址", trigger: "blur" }],
    [RulesType.number]: [{ type: RulesType.number, message: "请输入合法数字", trigger: "blur" }]
  };
  const getHtmlEasyForm = (data) => {
    return `
 <template>
  <div class="">
    <ElementEasyForm ref="elementEasyFormRef" :formJson="formJson">
      <template #under>
          <el-button @click="handlePost">提交</el-button>
      </template>
    </ElementEasyForm>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from "vue";
import { ElementEasyForm } from "element-easy-form";
const elementEasyFormRef = ref<any>();
const formJson = ref<any>(${JSON.stringify(data)})
const handlePost =async () =>{
  const data =await elementEasyFormRef.value.validate()
  console.log('data :>> ', data);
}
<\/script>
<style scoped lang="scss">
</style>
 `;
  };
  const generateDragFormCode = (data) => {
    const newDAta = lodash.cloneDeep(data);
    function formatData(params) {
      for (let index2 = 0; index2 < params.length; index2++) {
        const element = params[index2];
        delete element.active;
        if (element.events && element.events.length > 0) {
          element.events = element.events.filter((item) => {
            if (getFunctionTemplate(item.defaultValue)) {
              return true;
            }
            return false;
          });
        }
        if (element.children) {
          formatData(element.children);
        }
      }
    }
    formatData(newDAta);
    return newDAta;
  };
  const getHtmlDragForm = (data) => {
    return `
    <template>
     <div class="">
       <ElementFormRender     ref="elementFormrenderRef"
    :formJson="formJson.formJson"
    :model="formJson.model">
         <template #under>
             <el-button @click="handlePost">提交</el-button>
         </template>
       </ElementFormRender>
     </div>
   </template>
   
   <script setup lang="ts">
   import { ref, reactive, onMounted } from "vue";
   import { ElementFormRender } from "element-easy-form";
   const elementEasyFormRef = ref<any>();
   const formJson = ref<any>(${JSON.stringify(data)})
   const handlePost =async () =>{
    const data =await elementFormrenderRef.value.validate()
  console.log('data :>> ', data);
   }
   <\/script>
   <style scoped lang="scss">
   </style>
    `;
  };
  const generateEasyFormCode = (data) => {
    var _a, _b, _c;
    let newDAta = [];
    let generateCodeData = lodash.cloneDeep(data);
    for (let index2 = 0; index2 < generateCodeData.length; index2++) {
      const element = generateCodeData[index2];
      if (element.componentName == ComponentType.ElRow) {
        let span = 24;
        (_a = element.children) == null ? void 0 : _a.forEach((res) => {
          var _a2, _b2;
          span -= res.attrs.span;
          if (res.children && ((_a2 = res.children) == null ? void 0 : _a2.length) > 0) {
            (_b2 = res.children) == null ? void 0 : _b2.forEach((Colres) => {
              var _a3;
              delete Colres.attrsJson;
              delete Colres.title;
              delete Colres.id;
              delete Colres.active;
              if (Colres.events && Colres.events.length > 0) {
                Colres.events = Colres.events.filter((item) => {
                  if (getFunctionTemplate(item.defaultValue)) {
                    return true;
                  }
                  return false;
                });
              }
              if (!Colres.colAttrs) {
                Colres.colAttrs = {};
              }
              Colres.colAttrs = res.attrs;
              if (Colres.componentName == ComponentType.ElSelect || Colres.componentName == ComponentType.ElRadioGroup || Colres.componentName == ComponentType.ElCheckboxGroup) {
                (_a3 = Colres.children) == null ? void 0 : _a3.forEach((SelectRes) => {
                  delete SelectRes.title;
                  delete SelectRes.id;
                  delete SelectRes.active;
                  delete SelectRes.attrsJson;
                });
              }
              newDAta.push(Colres);
            });
          } else {
            newDAta.push({
              type: AttrType.POSITION,
              colAttrs: {
                span: res.attrs.span
              }
            });
          }
        });
        if (span > 0) {
          newDAta.push({
            type: AttrType.POSITION,
            colAttrs: {
              span
            }
          });
        }
      } else {
        delete element.attrsJson;
        delete element.title;
        delete element.active;
        if (element.rules.length == 0) {
          delete element.rules;
        }
        if (typeof element.hidden === "object") {
          if (element.hidden.type == SelectFuntion.SELECT) {
            if (((_b = element.hidden.dataSelect) == null ? void 0 : _b.length) == 0) {
              delete element.hidden;
            }
          } else if (element.hidden.type == SelectFuntion.FUNCTION) {
            if (typeof element.hidden.dataJs == "string" && element.hidden.dataJs) {
              if ("return false;" == getFunctionTemplate(element.hidden.dataJs)) {
                delete element.hidden;
              }
            }
          }
          if (element.events && element.events.length > 0) {
            element.events = element.events.filter((item) => {
              if (getFunctionTemplate(item.defaultValue)) {
                return true;
              }
              return false;
            });
          }
          if (element.events.length == 0) {
            delete element.events;
          }
          if (element.componentName == ComponentType.ElSelect) {
            (_c = element.children) == null ? void 0 : _c.forEach((res) => {
              delete res.attrsJson;
              delete res.title;
              delete res.active;
            });
          }
          if (!element.colAttrs) {
            element.colAttrs = {};
          }
          element.colAttrs.span = 24;
          newDAta.push(element);
        }
      }
      return newDAta;
    }
  };
  const SPANDEFAULT = 12;
  const defaultOption = (val) => {
    return {
      value: val ? `${val}` : "1",
      label: "选项" + (val ? val : "1")
    };
  };
  const defaultLabel = (val) => {
    return {
      label: "选项" + (val ? val : "1")
    };
  };
  const getName = (val) => {
    const data = Mock.mock(`@name(${11})`);
    return data.replace(/\s+/g, "");
  };
  const getCName = (val) => {
    const data = Mock.mock(`@cname(${val})`);
    return data.replace(/\s+/g, "");
  };
  const initPropLabel = (data) => {
    var _a;
    if (data.attrsJson) {
      (_a = data.attrsJson) == null ? void 0 : _a.forEach((res) => {
        if (res.prop == "label" && !res.defaultValue) {
          res.defaultValue = getCName(5);
        } else if (res.prop == "prop" && !res.defaultValue) {
          res.defaultValue = getName();
        }
      });
    }
    upDateFormItem(data);
  };
  const fliterPropData = [
    AttrPropType.ElCOLSPAN,
    AttrPropType.ElOPTIONS,
    AttrPropType.ElCHECHKBOXS,
    AttrPropType.ElRADIOS
  ];
  const formAndAttrsUpdata = (currentData, data) => {
    if (data.type == AttrType.FORMITEM) {
      if (data.prop == "label" || data.prop == "prop") {
        if (data.defaultValue != null && data.defaultValue != void 0 && data.defaultValue != "") {
          currentData[data.prop] = data.defaultValue;
        }
      } else if (ComponentType.ElFunctionHidden == data.componentName && data.prop == "hidden") {
        currentData[data.prop] = data.defaultValue;
      } else if (data.prop == "rules") {
        if (data.defaultValue != null && data.defaultValue != void 0 && data.defaultValue != "") {
          currentData[data.prop] = rules[data.defaultValue];
        }
      } else if (data.prop == "error") {
        if (data.defaultValue != null && data.defaultValue != void 0 && data.defaultValue != "") {
          if (!currentData["rules"]) {
            currentData["rules"] = [];
          }
          currentData["rules"].unshift({
            required: true,
            message: data.defaultValue,
            trigger: "change"
          });
        }
      } else {
        if (data.defaultValue != null && data.defaultValue != void 0 && data.defaultValue != "") {
          if (currentData.formItemAttrs) {
            currentData.formItemAttrs[data.prop] = data.defaultValue;
          }
        }
      }
    } else if (data.type == AttrType.COMPONENT) {
      if (data.defaultValue !== null && data.defaultValue !== void 0 && data.defaultValue !== "") {
        if (!fliterPropData.includes(data.prop)) {
          vue.nextTick(() => {
            currentData.attrs[data.prop] = data.defaultValue;
          });
        }
      }
    }
  };
  const upDateFormItem = (data) => {
    var _a;
    if (data.attrsJson) {
      (_a = data.attrsJson) == null ? void 0 : _a.forEach((res) => {
        formAndAttrsUpdata(data, res);
      });
    }
  };
  const getModel = (data) => {
    const model = {};
    function setProp(params) {
      var _a;
      for (let index2 = 0; index2 < params.length; index2++) {
        const element = params[index2];
        if (element.type == AttrType.COMPONENT) {
          let value = (_a = element.attrsJson) == null ? void 0 : _a.find(
            (res) => res.prop == "defaultValue"
          );
          model[element.prop] = (value == null ? void 0 : value.defaultValue) ? value == null ? void 0 : value.defaultValue : "";
        }
        if (element.children && element.type != AttrType.COMPONENT) {
          setProp(element.children);
        }
      }
    }
    setProp(data);
    return model;
  };
  const getComponents = (data) => {
    const model = [];
    function setProp(params) {
      for (let index2 = 0; index2 < params.length; index2++) {
        const element = params[index2];
        if (element.type == AttrType.COMPONENT) {
          model.push(element);
        }
        if (element.children && element.type != AttrType.COMPONENT) {
          setProp(element.children);
        }
      }
    }
    setProp(data);
    return model;
  };
  const getRowAttrs = (data) => {
    let attrs = {};
    for (let index2 = 0; index2 < data.length; index2++) {
      const element = data[index2];
      if (element.componentName == ComponentType.ElRow) {
        attrs = element.attrs;
        break;
      }
    }
    return attrs;
  };
  const hiddenAttrs = () => {
    return {
      label: "显示隐藏",
      prop: "hidden",
      type: AttrType.FORMITEM,
      defaultValue: {
        matchPattern: SelectFuntion.AND,
        type: SelectFuntion.SELECT,
        dataSelect: [],
        value: false,
        dataJs: `function hidden(config,data){
      return false;
    }`
      },
      componentName: ComponentType.ElFunctionHidden,
      attrs: {
        placeholder: "请输入",
        lang: "js",
        title: "编辑显示隐藏函数"
      },
      rules: []
    };
  };
  const getCommonEvents = (filters = "") => {
    return [
      {
        type: AttrType.COMPONENT,
        label: "blur	当失去焦点时触发",
        prop: "blur",
        defaultValue: `function blur(config,data,event){
          }`,
        componentName: ComponentType.ElFunctionEvent,
        attrs: {
          title: "当失去焦点时触发"
        }
      },
      {
        type: AttrType.COMPONENT,
        label: "focus	当获得焦点时触发",
        prop: "focus",
        defaultValue: `function focus(config,data,event){
          }`,
        componentName: ComponentType.ElFunctionEvent,
        attrs: {
          title: "当获得焦点时触发"
        }
      },
      {
        type: AttrType.COMPONENT,
        label: "clear 	清空按钮时触发",
        prop: "clear",
        defaultValue: `function clear(config,data){
          }`,
        componentName: ComponentType.ElFunctionEvent,
        attrs: {
          title: "清空按钮时触发"
        }
      }
    ].filter((item) => {
      if (filters.indexOf(item.prop) == -1) {
        return item;
      }
    });
  };
  const elFormItem = (data = {
    label: "",
    prop: ""
  }) => {
    return [
      {
        type: AttrType.COMPONENT,
        label: "是否禁用",
        prop: "disabled",
        defaultValue: null,
        componentName: ComponentType.ElSwitch,
        attrs: {}
      },
      hiddenAttrs(),
      {
        label: "标签",
        prop: "label",
        type: AttrType.FORMITEM,
        defaultValue: data.label ? data.label : "",
        componentName: ComponentType.ElInput,
        attrs: {
          placeholder: "请输入"
        },
        rules: [{ required: true, message: "不能为空", trigger: "change" }]
      },
      {
        label: "字段唯一标识",
        type: AttrType.FORMITEM,
        prop: "prop",
        defaultValue: data.prop ? data.prop : "",
        componentName: ComponentType.ElInput,
        attrs: {
          placeholder: "请输入"
        },
        rules: [{ required: true, message: "不能为空", trigger: "change" }]
      },
      {
        label: "错误提示信息",
        type: AttrType.FORMITEM,
        prop: "error",
        defaultValue: "",
        componentName: ComponentType.ElInput,
        attrs: {
          placeholder: "请输入"
        },
        rules: [{ required: false, message: "不能为空", trigger: "change" }]
      },
      {
        type: AttrType.FORMITEM,
        label: "规则",
        prop: "rules",
        defaultValue: "",
        componentName: ComponentType.ElSelect,
        attrs: {
          placeholder: "请选择类型"
        },
        rules: [{ required: false, message: "类型不能为空", trigger: "change" }],
        children: [
          {
            componentName: "ElOption",
            value: RulesType.email,
            label: "邮箱"
          },
          {
            componentName: "ElOption",
            label: "数字",
            value: RulesType.number
          }
        ]
      }
    ];
  };
  const elFormClearable = () => {
    return {
      type: AttrType.COMPONENT,
      label: "是否可以清空选项",
      prop: "clearable",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    };
  };
  const elFormplaceholder = (msg) => {
    return {
      type: AttrType.COMPONENT,
      label: "输入框占位文本",
      prop: "placeholder",
      defaultValue: msg,
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: msg
      }
    };
  };
  const ElSelectOptionDragFormData = (label, value, parentId = "") => {
    return {
      title: "选项",
      componentName: ComponentType.ElOption,
      attrs: {
        // ...defaultOption(val)
      },
      type: AttrType.COMPONENT,
      attrsJson: [
        {
          label: "选项名",
          prop: "label",
          type: AttrType.COMPONENT,
          defaultValue: label,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        },
        {
          label: "选项值",
          type: AttrType.COMPONENT,
          prop: "value",
          defaultValue: value,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        }
      ]
    };
  };
  const ElCheckboxDragFormData = (label, value, parentId = "") => {
    return {
      title: "选项",
      componentName: ComponentType.ElCheckbox,
      attrs: {
        // ...defaultOption(val)
      },
      type: AttrType.COMPONENT,
      parentId,
      attrsJson: [
        {
          label: "选项名",
          prop: "label",
          type: AttrType.COMPONENT,
          defaultValue: label,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        },
        {
          label: "选项值",
          type: AttrType.COMPONENT,
          prop: "value",
          defaultValue: value,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        }
      ]
    };
  };
  const ElRadioAndCheckboxDragFormData = (label, value, parentId = "") => {
    return {
      title: "选项",
      componentName: ComponentType.ElRadio,
      attrs: {},
      parentId,
      type: AttrType.COMPONENT,
      attrsJson: [
        {
          label: "选项名",
          prop: "label",
          type: AttrType.COMPONENT,
          defaultValue: label,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        },
        {
          label: "选项值",
          type: AttrType.COMPONENT,
          prop: "value",
          defaultValue: value,
          componentName: ComponentType.ElInput,
          attrs: {
            placeholder: "请输入"
          },
          rules: [{ required: true, message: "不能为空", trigger: "change" }]
        }
      ]
    };
  };
  const getFunctionTemplate = (str) => {
    let functionBody;
    const startIndex = str.indexOf("{");
    const endIndex = str.lastIndexOf("}");
    if (startIndex !== -1 && endIndex !== -1 && startIndex < endIndex) {
      functionBody = str.substring(startIndex + 1, endIndex).trim();
    }
    return functionBody ? functionBody : "";
  };
  const formatSelectFunction = (element) => {
    let value = null;
    if (element.type == "string") {
      value = `'${element.value}'`;
    } else if (element.type == "number") {
      value = element.value;
    } else if (element.type == "boolean") {
      value = Boolean(element.value);
    }
    return `data.${element.prop} ${element.compare} ${value}`;
  };
  const hidden = (element, model) => {
    if (element.hidden === void 0 || element.hidden === null || element.hidden === false) {
      return false;
    }
    try {
      if (element.hidden.type == SelectFuntion.SELECT) {
        let dataStr = ``;
        let dataSelect = element.hidden.dataSelect.filter((item) => {
          if (item.prop !== "" && item.type !== "" && item.value !== "") {
            return item;
          }
        });
        for (let index2 = 0; index2 < dataSelect.length; index2++) {
          const item = dataSelect[index2];
          if (item.prop !== "" && item.type !== "" && item.value !== "") {
            dataStr += formatSelectFunction(item);
            if (dataSelect.length > 1 && index2 < dataSelect.length - 1) {
              dataStr += element.hidden.matchPattern;
            }
          }
        }
        console.log("dataStr :>> ", dataStr);
        let fStr = ``;
        if (dataStr) {
          fStr = `
        let bool = false;
      if(${dataStr}){
        bool = ${element.hidden.value};
      }else{
       bool = ${!element.hidden.value};
      }
      return bool;`;
        } else {
          fStr = `
        let bool = false;
     
      return bool;`;
        }
        try {
          const dynamicFunc = new Function("config", "data", fStr);
          console.log("dynamicFunc(element, model) :>> ", dynamicFunc(element, model));
          return dynamicFunc(element, model);
        } catch (error) {
          console.log("error :>> ", error);
        }
      } else if (element.hidden.type == SelectFuntion.FUNCTION) {
        let dataJs = element.hidden.dataJs;
        if (typeof dataJs == "function") {
          return dataJs(element, model);
        } else if (typeof dataJs == "string" && dataJs) {
          try {
            const dynamicFunc = new Function(
              "config",
              "data",
              getFunctionTemplate(dataJs)
            );
            return dynamicFunc(element, model);
          } catch (error) {
            console.log("error :>> ", error);
          }
        } else {
          return false;
        }
      }
    } catch (error) {
      console.log(error);
      return false;
    }
  };
  const formatFunction = (element, model) => {
    let obj = {};
    const events = element.events;
    if (events && Array.isArray(events)) {
      events.forEach((item) => {
        if (item.defaultValue === SelectFuntion.FUNCTION) {
          obj[item.prop] = item.defaultValue.bind(void 0, element, model);
        } else {
          try {
            const dynamicFunc = new Function(`return ${item.defaultValue}`)().bind(void 0, element, model);
            obj[item.prop] = dynamicFunc;
          } catch (error) {
            console.error(`Error creating dynamic function for ${item.prop}:`, error);
          }
        }
      });
    }
    return obj;
  };
  const _sfc_main$n = vue.defineComponent({
    __name: "easy-form-item",
    props: {
      config: {
        type: Object,
        required: true
      },
      model: {
        type: Object,
        required: true
      }
    },
    setup(__props) {
      vue.reactive({});
      const prop = __props;
      const events = vue.computed(() => {
        let dataF = formatFunction(prop.config, prop.model);
        return {
          ...dataF
        };
      });
      return (_ctx, _cache) => {
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        return vue.openBlock(), vue.createBlock(_component_el_form_item, vue.mergeProps(__props.config.formItemAttrs, {
          prop: __props.config.prop,
          rules: __props.config.rules
        }), {
          label: vue.withCtx(() => [
            __props.config.renderLabel ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.config.renderLabel), { key: 0 })) : vue.renderSlot(_ctx.$slots, __props.config.prop + "Label", { key: 1 }, () => [
              vue.createTextVNode(vue.toDisplayString(__props.config.label), 1)
            ])
          ]),
          default: vue.withCtx(() => [
            __props.config.render ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.config.render), { key: 0 })) : vue.renderSlot(_ctx.$slots, __props.config.prop, { key: 1 }, () => [
              (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.config.componentName), vue.mergeProps({
                style: { "width": "100%" },
                modelValue: __props.model[__props.config.prop],
                "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.config.prop] = $event)
              }, __props.config.attrs, vue.toHandlers(events.value)), vue.createSlots({ _: 2 }, [
                __props.config.children ? {
                  name: "default",
                  fn: vue.withCtx(() => [
                    (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.config.children, (item, index2) => {
                      return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.componentName), vue.mergeProps({ key: index2 }, item.attrs), null, 16);
                    }), 128))
                  ]),
                  key: "0"
                } : void 0
              ]), 1040, ["modelValue"]))
            ])
          ]),
          _: 3
        }, 16, ["prop", "rules"]);
      };
    }
  });
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
    __name: "element-easy-form",
    props: {
      formJson: {
        type: Object,
        required: true,
        default: () => ({
          rowAttrs: {},
          formAttrs: {},
          schema: [],
          model: {}
        })
      }
      // model: {
      //   type: Object,
      //   required: true,
      // },
    },
    setup(__props, { expose: __expose }) {
      vue.reactive({});
      const props = __props;
      const formRef = vue.ref();
      const rules2 = vue.ref([]);
      vue.watch(
        () => props.formJson,
        (val) => {
          const schema = val.schema;
          rules2.value = [];
          for (let index2 = 0; index2 < schema.length; index2++) {
            const element = schema[index2];
            if (element.rules) {
              rules2.value.push({
                [element.prop]: element.rules
              });
            }
          }
        },
        {
          immediate: true
          //开启监听立即执行一次
        }
      );
      const validate = () => {
        return new Promise((resolve, reject) => {
          formRef.value.validate((valid) => {
            if (valid) {
              resolve(props.formJson.model);
            } else {
              reject(false);
            }
          });
        });
      };
      __expose({
        validate
      });
      return (_ctx, _cache) => {
        const _component_el_col = vue.resolveComponent("el-col");
        const _component_el_row = vue.resolveComponent("el-row");
        const _component_el_form = vue.resolveComponent("el-form");
        return vue.openBlock(), vue.createElementBlock("div", null, [
          vue.createVNode(_component_el_form, vue.mergeProps({
            ref_key: "formRef",
            ref: formRef
          }, __props.formJson.formAttrs, {
            model: __props.formJson.model
          }), {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_row, vue.normalizeProps(vue.guardReactiveProps(__props.formJson.rowAttrs)), {
                default: vue.withCtx(() => [
                  vue.renderSlot(_ctx.$slots, "up", {}, void 0, true),
                  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.formJson.schema, (config, index2) => {
                    return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
                      !vue.unref(hidden)(config, __props.formJson.model) ? (vue.openBlock(), vue.createBlock(_component_el_col, vue.normalizeProps(vue.mergeProps({ key: 0 }, config.colAttrs)), {
                        default: vue.withCtx(() => [
                          vue.createVNode(_sfc_main$n, {
                            config,
                            model: __props.formJson.model
                          }, {
                            [`${config.prop}Label`]: vue.withCtx(() => [
                              vue.renderSlot(_ctx.$slots, config.prop + "Label", {}, void 0, true)
                            ]),
                            [`${config.prop}`]: vue.withCtx(() => [
                              vue.renderSlot(_ctx.$slots, config.prop, {}, void 0, true)
                            ]),
                            _: 2
                          }, 1032, ["config", "model"])
                        ]),
                        _: 2
                      }, 1040)) : vue.createCommentVNode("", true)
                    ], 64);
                  }), 128)),
                  vue.renderSlot(_ctx.$slots, "under", {}, void 0, true)
                ]),
                _: 3
              }, 16)
            ]),
            _: 3
          }, 16, ["model"])
        ]);
      };
    }
  });
  const _export_sfc = (sfc, props) => {
    const target = sfc.__vccOpts || sfc;
    for (const [key, val] of props) {
      target[key] = val;
    }
    return target;
  };
  const ElementEasyForm = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-74c42724"]]);
  const ElCascader$1 = [
    ...elFormItem(),
    elFormplaceholder("请选择"),
    {
      type: AttrType.COMPONENT,
      label: "配置选项",
      prop: "props",
      defaultValue: {
        expandTrigger: "click",
        multiple: false,
        checkStrictly: false,
        emitPath: true,
        value: "value",
        label: "label",
        children: "children",
        disabled: "disabled",
        leaf: "leaf",
        hoverThreshold: 500
      },
      componentName: ComponentType.ElCascaderProps,
      attrs: {}
    },
    // {
    //   type: AttrType.COMPONENT,
    //   label: "选项集",
    //   prop: AttrPropType.ElOPTIONS,
    //   defaultValue: [
    //     defaultOption()
    //   ],
    //   componentName:  ComponentType.ElSelectOption,
    //   attrs: {
    //   },
    // },
    {
      type: AttrType.COMPONENT,
      label: "用于分隔选项的字符",
      prop: "separator",
      defaultValue: "/",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "该选项是否可以被搜索",
      prop: "filterable",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    elFormClearable(),
    {
      type: AttrType.COMPONENT,
      label: "多选时是否将选中值按文字的形式展示",
      prop: "collapse-tags",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "当鼠标悬停于折叠标签的文本时，是否显示所有选中的标签。 要使用此属性，collapse-tags属性必须设定为 true",
      prop: "collapse-tags-tooltip",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "选项的数据源JSON字符串",
      prop: "options",
      defaultValue: [
        {
          "value": "resource",
          "label": "Resource",
          "children": [
            {
              "value": "axure",
              "label": "Axure Components"
            },
            {
              "value": "sketch",
              "label": "Sketch Templates"
            },
            {
              "value": "docs",
              "label": "Design Documentation"
            }
          ]
        }
      ],
      componentName: ComponentType.ElSliderMarks,
      attrs: {}
    }
  ];
  const __vite_glob_0_0$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCascader: ElCascader$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElCheckboxGroup$1 = [
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "可被勾选的 checkbox 的最小数量",
      prop: "min",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "可被勾选的 checkbox 的最大数量",
      prop: "max",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: [],
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "选项集",
      prop: AttrPropType.ElCHECHKBOXS,
      defaultValue: [],
      componentName: ComponentType.ElCheckboxs,
      attrs: {}
    }
  ];
  const __vite_glob_0_1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCheckboxGroup: ElCheckboxGroup$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElCol$1 = [
    // :xs="24" :sm="12" :md="6" :lg="6" :xl="6"
    {
      type: AttrType.COMPONENT,
      label: "xs(<768px)",
      prop: "xs",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "sm(>=768px)",
      prop: "sm",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "md(>=992px)",
      prop: "md",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "lg(>=1200px)",
      prop: "lg",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "xl(>=1920px)",
      prop: "xl",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格占据的列数",
      prop: "span",
      defaultValue: 12,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格左侧的间隔格数",
      prop: "offset",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格向右移动格数",
      prop: "push",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格向左移动格数",
      prop: "pull",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    }
  ];
  const __vite_glob_0_2$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCol: ElCol$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElColorPicker$1 = [
    ...elFormItem(),
    {
      label: "颜色的格式",
      prop: "color-format",
      type: AttrType.COMPONENT,
      defaultValue: "text",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [{ required: true, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          value: "hsl",
          label: "hsl"
        },
        {
          componentName: ComponentType.ElOption,
          value: "hsv",
          label: "hsv"
        },
        {
          componentName: ComponentType.ElOption,
          value: "hex",
          label: "hex"
        },
        {
          componentName: ComponentType.ElOption,
          value: "rgb",
          label: "rgb"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "是否支持透明度选择",
      prop: "show-alpha",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    }
  ];
  const __vite_glob_0_3$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElColorPicker: ElColorPicker$1
  }, Symbol.toStringTag, { value: "Module" }));
  const formatOptions = {
    year: "YYYY",
    month: "YYYY-MM",
    date: "YYYY-MM-DD",
    datetime: "YYYY-MM-DD HH:mm:ss",
    week: "YYYY-WW",
    dates: "YYYY-MM-DD",
    monthrange: "YYYY-MM",
    daterange: "YYYY-MM-DD",
    datetimerange: "YYYY-MM-DD HH:mm:ss"
  };
  const ElDatePicker$1 = [
    {
      label: "类型",
      prop: "type",
      type: AttrType.COMPONENT,
      defaultValue: "date",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [{ required: true, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "年",
          value: "year"
        },
        {
          componentName: ComponentType.ElOption,
          label: "月",
          value: "month"
        },
        {
          componentName: ComponentType.ElOption,
          label: "周",
          value: "week"
        },
        {
          componentName: ComponentType.ElOption,
          label: "日期",
          value: "date"
        },
        {
          componentName: ComponentType.ElOption,
          label: "日期(多选)",
          value: "dates"
        },
        {
          componentName: ComponentType.ElOption,
          label: "日期和时间点",
          value: "datetime"
        },
        {
          componentName: ComponentType.ElOption,
          label: "日期和时间点范围",
          value: "datetimerange"
        },
        {
          componentName: ComponentType.ElOption,
          label: "日期范围",
          value: "daterange"
        },
        {
          componentName: ComponentType.ElOption,
          label: "月范围",
          value: "monthrange"
        }
      ]
    },
    ...elFormItem(),
    elFormClearable(),
    elFormplaceholder("请选择"),
    {
      type: AttrType.COMPONENT,
      label: "范围选择时开始日期的占位内容",
      prop: "start-placeholder",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "范围选择时结束日期的占位内容",
      prop: "end-placeholder",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "日期格式化",
      prop: "format",
      defaultValue: "YYYY-MM-DD",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: true, message: "请参见 date formats", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "日期格式化值",
      prop: "value-format",
      defaultValue: "YYYY-MM-DD",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: true, message: "请参见 date formats", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "选择范围时的分隔符",
      prop: "range-separator",
      defaultValue: "-",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: true, message: "请参见 date formats", trigger: "change" }]
    }
  ];
  const __vite_glob_0_4$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElDatePicker: ElDatePicker$1,
    formatOptions
  }, Symbol.toStringTag, { value: "Module" }));
  const ElDragTable$1 = [
    hiddenAttrs(),
    {
      label: "字段唯一标识",
      type: AttrType.FORMITEM,
      prop: "prop",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: true, message: "不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: [],
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入",
        disabled: true
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      label: "列表字段",
      prop: "columns",
      type: AttrType.COMPONENT,
      defaultValue: [],
      componentName: ComponentType.ElTableColumns,
      attrs: {}
    },
    {
      label: "操作栏固定状态",
      prop: "fixed",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "不固定",
          value: ""
        },
        {
          componentName: ComponentType.ElOption,
          label: "固定左侧",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "固定右侧",
          value: "right"
        }
      ]
    }
  ];
  const __vite_glob_0_5$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElDragTable: ElDragTable$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElForm$1 = [
    {
      label: "表单域标签的位置",
      prop: "label-position",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "左",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右",
          value: "right"
        },
        {
          componentName: ComponentType.ElOption,
          label: "上",
          value: "top"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "标签的长度",
      prop: "label-width",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 80
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "表单域标签的后缀",
      prop: "label-suffix",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "是否隐藏必填字段标签旁边的红色星号。",
      prop: "hide-required-asterisk",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      label: "星号的位置",
      prop: "require-asterisk-position",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "左",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右",
          value: "right"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "是否以行内形式展示校验信息",
      prop: "inline-message",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否在输入框中显示校验结果反馈图标",
      prop: "status-icon",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "当校验失败时，滚动到第一个错误表单项",
      prop: "scroll-to-error",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否禁用",
      prop: "disabled",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    }
  ];
  const __vite_glob_0_6$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElForm: ElForm$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElInput$1 = [
    {
      label: "类型",
      prop: "type",
      type: AttrType.COMPONENT,
      defaultValue: "text",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [{ required: true, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          value: "text",
          label: "文本框"
        },
        {
          componentName: ComponentType.ElOption,
          label: "密码框",
          value: "password"
        },
        {
          componentName: ComponentType.ElOption,
          label: "文本域",
          value: "textarea"
        },
        {
          componentName: ComponentType.ElOption,
          label: "数字",
          value: "number"
        }
      ]
    },
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    elFormplaceholder("请输入"),
    {
      type: AttrType.COMPONENT,
      label: "最大输入长度",
      prop: "maxlength",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "最小输入长度",
      prop: "minlength",
      componentName: ComponentType.ElInput,
      defaultValue: "",
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    }
  ];
  const __vite_glob_0_7$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElInput: ElInput$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElInputNumber$1 = [
    {
      type: AttrType.COMPONENT,
      label: "设置计数器允许的最小值",
      prop: "min",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "设置计数器允许的最大值",
      prop: "max",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      label: "控制按钮位置",
      prop: "controls-position",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      children: [
        {
          componentName: ComponentType.ElOption,
          value: "",
          label: "默认值"
        },
        {
          componentName: ComponentType.ElOption,
          value: "right",
          label: "右侧"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "计数器步长",
      prop: "step",
      defaultValue: 1,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "数值精度",
      prop: "precision",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "是否只能输入 step 的倍数",
      prop: "step-strictly",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否使用控制按钮",
      prop: "controls",
      defaultValue: true,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    }
  ];
  const __vite_glob_0_8$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElInputNumber: ElInputNumber$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRadioGroup$1 = [
    // {
    //   type: AttrType.COMPONENT,
    //   label:"按钮形式的 Radio 激活时的文本颜色" ,
    //   prop: "text-color",
    //   defaultValue: "",
    //   componentName: ComponentType.ElColorPicker,
    //   attrs: {
    //   },
    // },
    // {
    //   type: AttrType.COMPONENT,
    //   label:"按钮形式的 Radio 激活时的填充色和边框色" ,
    //   prop: "fill",
    //   defaultValue: "",
    //   componentName: ComponentType.ElColorPicker,
    //   attrs: {
    //   },
    // },
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "选项集",
      prop: AttrPropType.ElRADIOS,
      defaultValue: [],
      componentName: ComponentType.ElRadios,
      attrs: {}
    }
  ];
  const __vite_glob_0_9$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRadioGroup: ElRadioGroup$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRate$1 = [
    {
      type: AttrType.COMPONENT,
      label: "是否允许半选",
      prop: "allow-half",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "低分和中等分数的界限值， 值本身被划分在低分中",
      prop: "low-threshold",
      defaultValue: 2,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "高分和中等分数的界限值， 值本身被划分在高分中",
      prop: "high-threshold",
      defaultValue: 4,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "分段所对应的颜色",
      prop: "colors",
      defaultValue: ["#F7BA2A", "#F7BA2A", "#F7BA2A"],
      componentName: ComponentType.ElRateColors,
      attrs: {}
    }
  ];
  const __vite_glob_0_10$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRate: ElRate$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRow$1 = [
    hiddenAttrs(),
    {
      type: AttrType.COMPONENT,
      label: "栅格间隔",
      prop: "gutter",
      defaultValue: 20,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格列数",
      prop: AttrPropType.ElCOLSPAN,
      defaultValue: [{
        value: SPANDEFAULT
      }, {
        value: SPANDEFAULT
      }],
      componentName: ComponentType.ElRowAttrs,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      label: "水平排列方式",
      prop: "justify",
      type: AttrType.COMPONENT,
      defaultValue: "start",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      // 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'
      rules: [{ required: false, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          value: "start",
          label: "靠左"
        },
        {
          componentName: ComponentType.ElOption,
          label: "靠右",
          value: "end"
        },
        {
          componentName: ComponentType.ElOption,
          label: "居中",
          value: "center"
        },
        {
          componentName: ComponentType.ElOption,
          label: "spaceAround",
          value: "space-around"
        },
        {
          componentName: ComponentType.ElOption,
          label: "左右等分",
          value: "space-between"
        },
        {
          componentName: ComponentType.ElOption,
          label: "平均等分",
          value: "space-evenly"
        }
      ]
    },
    {
      label: "垂直排列方式",
      prop: "align",
      type: AttrType.COMPONENT,
      defaultValue: "middle",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      //'top' | 'middle' | 'bottom'
      rules: [{ required: false, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "靠上",
          value: "top"
        },
        {
          componentName: ComponentType.ElOption,
          label: "中间",
          value: "middle"
        },
        {
          componentName: ComponentType.ElOption,
          label: "底部",
          value: "bottom"
        }
      ]
    }
  ];
  const __vite_glob_0_11$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRow: ElRow$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSelect$1 = [
    ...elFormItem(),
    elFormplaceholder("请选择"),
    {
      type: AttrType.COMPONENT,
      label: "选项集",
      prop: AttrPropType.ElOPTIONS,
      defaultValue: [],
      componentName: ComponentType.ElSelectOption,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否多选",
      prop: "multiple",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否筛选",
      prop: "filterable",
      defaultValue: true,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    elFormClearable(),
    {
      type: AttrType.COMPONENT,
      label: "多选时是否将选中值按文字的形式展示",
      prop: "collapse-tags",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "设置多选时，代表多选场景下用户最多可以选择的项目数， 为 0 则不限制",
      prop: "multiple-limit",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    }
  ];
  const __vite_glob_0_12$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSelect: ElSelect$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSlider$1 = [
    {
      type: AttrType.COMPONENT,
      label: "最小值",
      prop: "min",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "最大值",
      prop: "max",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "步长",
      prop: "step",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        min: 1,
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "是否显示输入框，仅在非范围选择时有效",
      prop: "show-input",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "在显示输入框的情况下，是否显示输入框的控制按钮",
      prop: "show-input-controls",
      defaultValue: true,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "垂直模式",
      prop: "vertical",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "滑块高度，垂直模式必填",
      prop: "height",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "每个标记可以单独设置样式",
      prop: "marks",
      defaultValue: {
        0: "0°C",
        8: "8°C",
        37: "37°C",
        50: {
          style: {
            color: "#1989FA"
          },
          label: "50%"
        }
      },
      componentName: ComponentType.ElSliderMarks,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否显示间断点",
      prop: "show-stops",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否显示提示信息",
      prop: "show-tooltip",
      defaultValue: true,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    ...elFormItem(),
    {
      label: "Tooltip 出现的位置",
      prop: "placement",
      type: AttrType.COMPONENT,
      defaultValue: "top",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [{ required: true, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "上",
          value: "top"
        },
        {
          componentName: ComponentType.ElOption,
          label: "上左",
          value: "top-start"
        },
        {
          componentName: ComponentType.ElOption,
          label: "上右",
          value: "top-end"
        },
        {
          componentName: ComponentType.ElOption,
          label: "下",
          value: "bottom"
        },
        {
          componentName: ComponentType.ElOption,
          label: "下左",
          value: "bottom-start"
        },
        {
          componentName: ComponentType.ElOption,
          label: "下右",
          value: "bottom-end"
        },
        {
          componentName: ComponentType.ElOption,
          label: "左",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "左上",
          value: "left-start"
        },
        {
          componentName: ComponentType.ElOption,
          label: "左下",
          value: "left-end"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右",
          value: "right"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右上",
          value: "right-start"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右下",
          value: "right-end"
        }
      ]
    }
  ];
  const __vite_glob_0_13$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSlider: ElSlider$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSwitch$1 = [
    ...elFormItem(),
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    elFormplaceholder("请输入"),
    {
      type: AttrType.COMPONENT,
      label: "switch 的宽度",
      prop: "width",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "打开时的文字描述",
      prop: "activeText",
      componentName: ComponentType.ElInput,
      defaultValue: "",
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "关闭时的文字描述",
      prop: "inactiveText",
      componentName: ComponentType.ElInput,
      defaultValue: "",
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "打开时的值",
      prop: "activeValue",
      componentName: ComponentType.ElInput,
      defaultValue: "",
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "关闭时的值",
      prop: "inactiveValue",
      componentName: ComponentType.ElInput,
      defaultValue: "",
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    }
  ];
  const __vite_glob_0_14$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSwitch: ElSwitch$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElTimePicker$1 = [
    ...elFormItem(),
    elFormClearable(),
    elFormplaceholder("请选择"),
    {
      type: AttrType.COMPONENT,
      label: "范围选择时开始日期的占位内容",
      prop: "start-placeholder",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "范围选择时结束日期的占位内容",
      prop: "end-placeholder",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "显示在输入框中的格式",
      prop: "format",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "绑定值的格式",
      prop: "value-format",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "选择范围时的分隔符",
      prop: "range-separator",
      defaultValue: "-",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "是否为时间范围选择",
      prop: "is-range",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否使用箭头进行时间选择",
      prop: "arrow-control",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    }
  ];
  const __vite_glob_0_15$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElTimePicker: ElTimePicker$1
  }, Symbol.toStringTag, { value: "Module" }));
  const ElTimeSelect$1 = [
    ...elFormItem(),
    elFormClearable(),
    elFormplaceholder("请选择"),
    {
      type: AttrType.COMPONENT,
      label: "开始时间",
      prop: "start",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "结束时间",
      prop: "end",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "间隔时间",
      prop: "step",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "最早时间点，早于该时间的时间段将被禁用",
      prop: "min-time",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "最晚时间点，晚于该时间的时间段将被禁用",
      prop: "max-time",
      defaultValue: "-",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "设置时间格式",
      prop: "format",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    }
  ];
  const __vite_glob_0_16$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElTimeSelect: ElTimeSelect$1
  }, Symbol.toStringTag, { value: "Module" }));
  const LineTitle$1 = [
    hiddenAttrs(),
    {
      type: AttrType.COMPONENT,
      label: "标题",
      prop: "title",
      defaultValue: "标题",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "标题字体大小",
      prop: "fontSize",
      defaultValue: 14,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题颜色",
      prop: "color",
      defaultValue: "#333",
      componentName: ComponentType.ElColorPicker,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标宽",
      prop: "width",
      defaultValue: 3,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标高",
      prop: "height",
      defaultValue: 20,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标距离字体距离",
      prop: "marginRight",
      defaultValue: 10,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标背景色",
      prop: "backgroundColor",
      defaultValue: "",
      componentName: ComponentType.ElColorPicker,
      attrs: {}
    }
  ];
  const __vite_glob_0_17$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    LineTitle: LineTitle$1
  }, Symbol.toStringTag, { value: "Module" }));
  const modules$1 = /* @__PURE__ */ Object.assign({
    "./lib/ElCascader.ts": __vite_glob_0_0$1,
    "./lib/ElCheckboxGroup.ts": __vite_glob_0_1$1,
    "./lib/ElCol.ts": __vite_glob_0_2$1,
    "./lib/ElColorPicker.ts": __vite_glob_0_3$1,
    "./lib/ElDatePicker.ts": __vite_glob_0_4$1,
    "./lib/ElDragTable.ts": __vite_glob_0_5$1,
    "./lib/ElForm.ts": __vite_glob_0_6$1,
    "./lib/ElInput.ts": __vite_glob_0_7$1,
    "./lib/ElInputNumber.ts": __vite_glob_0_8$1,
    "./lib/ElRadioGroup.ts": __vite_glob_0_9$1,
    "./lib/ElRate.ts": __vite_glob_0_10$1,
    "./lib/ElRow.ts": __vite_glob_0_11$1,
    "./lib/ElSelect.ts": __vite_glob_0_12$1,
    "./lib/ElSlider.ts": __vite_glob_0_13$1,
    "./lib/ElSwitch.ts": __vite_glob_0_14$1,
    "./lib/ElTimePicker.ts": __vite_glob_0_15$1,
    "./lib/ElTimeSelect.ts": __vite_glob_0_16$1,
    "./lib/LineTitle.ts": __vite_glob_0_17$1
  });
  let module$1 = {};
  Object.keys(modules$1).forEach((key) => {
    const mod = modules$1[key] || {};
    Object.assign(module$1, mod);
  });
  const componentAttrs = {
    ...module$1
  };
  const ElColDragFormData = (span, parentId = "") => {
    return {
      title: "列",
      type: AttrType.LAYOUT,
      componentName: ComponentType.ElCol,
      attrs: {
        span: span ? span : SPANDEFAULT
      },
      parentId,
      children: [],
      attrsJson: componentAttrs.ElCol
    };
  };
  const ElTableColumnsData = (span) => {
    return {
      title: "列",
      type: AttrType.COMPONENT,
      componentName: ComponentType.ElDragTableColumns,
      attrs: {},
      children: [],
      attrsJson: []
    };
  };
  const ElCascader = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change	当选中节点变化时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
          }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	当选中节点变化时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "expandChange	当展开节点发生变化时触发",
      prop: "expandChange",
      defaultValue: `function expandChange(config,data,value){
          }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "当展开节点发生变化时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "visibleChange	下拉框出现/隐藏时触发",
      prop: "visibleChange",
      defaultValue: `function visibleChange(config,data,value){
          }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "下拉框出现/隐藏时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "removeTag	在多选模式下，移除Tag时触发",
      prop: "removeTag",
      defaultValue: `function removeTag(config,data,value){
          }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "在多选模式下，移除Tag时触发"
      }
    }
  ];
  const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCascader
  }, Symbol.toStringTag, { value: "Module" }));
  const ElCheckboxGroup = [
    {
      type: AttrType.COMPONENT,
      label: "change	当绑定值变化时触发的事件",
      prop: "change",
      defaultValue: `function change(config,data,value,boolean){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	当绑定值变化时触发的事件"
      }
    }
  ];
  const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCheckboxGroup
  }, Symbol.toStringTag, { value: "Module" }));
  const ElCol = [
    // :xs="24" :sm="12" :md="6" :lg="6" :xl="6"
    {
      type: AttrType.COMPONENT,
      label: "xs(<768px)",
      prop: "xs",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "sm(>=768px)",
      prop: "sm",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "md(>=992px)",
      prop: "md",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "lg(>=1200px)",
      prop: "lg",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "xl(>=1920px)",
      prop: "xl",
      defaultValue: null,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格占据的列数",
      prop: "span",
      defaultValue: 12,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格左侧的间隔格数",
      prop: "offset",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格向右移动格数",
      prop: "push",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格向左移动格数",
      prop: "pull",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      }
    }
  ];
  const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElCol
  }, Symbol.toStringTag, { value: "Module" }));
  const ElColorPicker = [
    ...getCommonEvents("clear"),
    {
      type: AttrType.COMPONENT,
      label: "change 当绑定值变化时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "当绑定值变化时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "activeChange	面板中当前显示的颜色发生改变时触发",
      prop: "activeChange",
      defaultValue: `function activeChange(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "面板中当前显示的颜色发生改变时触发"
      }
    }
  ];
  const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElColorPicker
  }, Symbol.toStringTag, { value: "Module" }));
  const ElDatePicker = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change	用户确认选定的值时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	用户确认选定的值时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "visibleChange	下拉列表出现/消失时触发",
      prop: "visibleChange",
      defaultValue: `function visibleChange(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "下拉列表出现/消失时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "calendarChange	在日历所选日期更改时触发",
      prop: "calendarChange",
      defaultValue: `function calendarChange(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "在日历所选日期更改时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "panelChange	当日期面板改变时触发",
      prop: "panelChange",
      defaultValue: `function panelChange(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "当日期面板改变时触发"
      }
    }
  ];
  const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElDatePicker
  }, Symbol.toStringTag, { value: "Module" }));
  const ElDragTable = [
    hiddenAttrs(),
    {
      label: "字段唯一标识",
      type: AttrType.FORMITEM,
      prop: "prop",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: true, message: "不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "默认值",
      prop: "defaultValue",
      defaultValue: [],
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入",
        disabled: true
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      label: "列表字段",
      prop: "columns",
      type: AttrType.COMPONENT,
      defaultValue: [],
      componentName: ComponentType.ElTableColumns,
      attrs: {}
    },
    {
      label: "操作栏固定状态",
      prop: "fixed",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型",
        clearable: true
      },
      rules: [],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "不固定",
          value: ""
        },
        {
          componentName: ComponentType.ElOption,
          label: "固定左侧",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "固定右侧",
          value: "right"
        }
      ]
    }
  ];
  const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElDragTable
  }, Symbol.toStringTag, { value: "Module" }));
  const ElForm = [
    {
      label: "表单域标签的位置",
      prop: "label-position",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "左",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右",
          value: "right"
        },
        {
          componentName: ComponentType.ElOption,
          label: "上",
          value: "top"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "标签的长度",
      prop: "label-width",
      defaultValue: "",
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 80
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "表单域标签的后缀",
      prop: "label-suffix",
      defaultValue: "",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "是否隐藏必填字段标签旁边的红色星号。",
      prop: "hide-required-asterisk",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      label: "星号的位置",
      prop: "require-asterisk-position",
      type: AttrType.COMPONENT,
      defaultValue: "",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "左",
          value: "left"
        },
        {
          componentName: ComponentType.ElOption,
          label: "右",
          value: "right"
        }
      ]
    },
    {
      type: AttrType.COMPONENT,
      label: "是否以行内形式展示校验信息",
      prop: "inline-message",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否在输入框中显示校验结果反馈图标",
      prop: "status-icon",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "当校验失败时，滚动到第一个错误表单项",
      prop: "scroll-to-error",
      defaultValue: false,
      componentName: ComponentType.ElSwitch,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "是否禁用",
      prop: "disabled",
      defaultValue: "",
      componentName: ComponentType.ElSwitch,
      attrs: {}
    }
  ];
  const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElForm
  }, Symbol.toStringTag, { value: "Module" }));
  const ElInput = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change	modelValue 改变时，当输入框失去焦点或用户按Enter时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "modelValue 改变时，当输入框失去焦点或用户按Enter时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "input	在 Input 值改变时触发",
      prop: "input",
      defaultValue: `function input(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	在 Input 值改变时触发"
      }
    }
  ];
  const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElInput
  }, Symbol.toStringTag, { value: "Module" }));
  const ElInputNumber = [
    ...getCommonEvents("clear"),
    {
      type: AttrType.COMPONENT,
      label: "change	绑定值被改变时触发",
      prop: "change",
      defaultValue: `function change(config,data,value,oldValue){
            }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "绑定值被改变时触发"
      }
    }
  ];
  const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElInputNumber
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRadioGroup = [
    {
      type: AttrType.COMPONENT,
      label: "change	当绑定值变化时触发的事件",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	当绑定值变化时触发的事件"
      }
    }
  ];
  const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRadioGroup
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRate = [
    {
      type: AttrType.COMPONENT,
      label: "change	分值改变时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "分值改变时触发"
      }
    }
  ];
  const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRate
  }, Symbol.toStringTag, { value: "Module" }));
  const ElRow = [
    hiddenAttrs(),
    {
      type: AttrType.COMPONENT,
      label: "栅格间隔",
      prop: "gutter",
      defaultValue: 0,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 0
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "栅格列数",
      prop: AttrPropType.ElCOLSPAN,
      defaultValue: [{
        value: SPANDEFAULT
      }, {
        value: SPANDEFAULT
      }],
      componentName: ComponentType.ElRowAttrs,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right",
        min: 1,
        max: 24
      },
      rules: [{ required: false, message: "名字不能为空", trigger: "change" }]
    },
    {
      label: "水平排列方式",
      prop: "justify",
      type: AttrType.COMPONENT,
      defaultValue: "start",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      // 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly'
      rules: [{ required: false, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          value: "start",
          label: "靠左"
        },
        {
          componentName: ComponentType.ElOption,
          label: "靠右",
          value: "end"
        },
        {
          componentName: ComponentType.ElOption,
          label: "居中",
          value: "center"
        },
        {
          componentName: ComponentType.ElOption,
          label: "spaceAround",
          value: "space-around"
        },
        {
          componentName: ComponentType.ElOption,
          label: "左右等分",
          value: "space-between"
        },
        {
          componentName: ComponentType.ElOption,
          label: "平均等分",
          value: "space-evenly"
        }
      ]
    },
    {
      label: "垂直排列方式",
      prop: "align",
      type: AttrType.COMPONENT,
      defaultValue: "middle",
      componentName: ComponentType.ElSelect,
      attrs: {
        placeholder: "请选择类型"
      },
      //'top' | 'middle' | 'bottom'
      rules: [{ required: false, message: "类型不能为空", trigger: "change" }],
      children: [
        {
          componentName: ComponentType.ElOption,
          label: "靠上",
          value: "top"
        },
        {
          componentName: ComponentType.ElOption,
          label: "中间",
          value: "middle"
        },
        {
          componentName: ComponentType.ElOption,
          label: "底部",
          value: "bottom"
        }
      ]
    }
  ];
  const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElRow
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSelect = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change选中值发生变化时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
              }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "选中值发生变化时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "visibleChange	下拉框出现/隐藏时触发",
      prop: "visibleChange",
      defaultValue: `function visibleChange(config,data,value){
              }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "下拉框出现/隐藏时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "removeTag	在多选模式下，移除Tag时触发",
      prop: "removeTag",
      defaultValue: `function removeTag(config,data,value){
              }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "在多选模式下，移除Tag时触发"
      }
    }
  ];
  const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSelect
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSlider = [
    {
      type: AttrType.COMPONENT,
      label: "change	值改变时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "值改变时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "input	数据改变时触发",
      prop: "input",
      defaultValue: `function input(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "数据改变时触发"
      }
    }
  ];
  const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSlider
  }, Symbol.toStringTag, { value: "Module" }));
  const ElSwitch = [
    {
      type: AttrType.COMPONENT,
      label: "change		switch 状态发生变化时的回调函数",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "	switch 状态发生变化时的回调函数"
      }
    }
  ];
  const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElSwitch
  }, Symbol.toStringTag, { value: "Module" }));
  const ElTimePicker = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change	用户确认选定的值时触发",
      prop: "change",
      defaultValue: `function change(config,data,value){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "用户确认选定的值时触发"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "visibleChange	下拉列表出现/消失时触发",
      prop: "visibleChange",
      defaultValue: `function visibleChange(config,data,boolean){
        }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "下拉列表出现/消失时触发"
      }
    }
  ];
  const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElTimePicker
  }, Symbol.toStringTag, { value: "Module" }));
  const ElTimeSelect = [
    ...getCommonEvents(),
    {
      type: AttrType.COMPONENT,
      label: "change	用户确认选定的值时触发",
      prop: "change",
      defaultValue: `function change(config,data,value,oldValue){
            }`,
      componentName: ComponentType.ElFunctionEvent,
      attrs: {
        title: "用户确认选定的值时触发"
      }
    }
  ];
  const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    ElTimeSelect
  }, Symbol.toStringTag, { value: "Module" }));
  const LineTitle = [
    hiddenAttrs(),
    {
      type: AttrType.COMPONENT,
      label: "标题",
      prop: "defaultValue",
      defaultValue: "标题",
      componentName: ComponentType.ElInput,
      attrs: {
        placeholder: "请输入"
      },
      rules: [{ required: false, message: "", trigger: "change" }]
    },
    {
      type: AttrType.COMPONENT,
      label: "标题字体大小",
      prop: "fontSize",
      defaultValue: 14,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题颜色",
      prop: "color",
      defaultValue: "#333",
      componentName: ComponentType.ElColorPicker,
      attrs: {}
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标宽",
      prop: "width",
      defaultValue: 3,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标高",
      prop: "height",
      defaultValue: 20,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标距离字体距离",
      prop: "marginRight",
      defaultValue: 10,
      componentName: ComponentType.ElInputNumber,
      attrs: {
        placeholder: "请输入",
        controlsPosition: "right"
      }
    },
    {
      type: AttrType.COMPONENT,
      label: "标题前方图标背景色",
      prop: "backgroundColor",
      defaultValue: "",
      componentName: ComponentType.ElColorPicker,
      attrs: {}
    }
  ];
  const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
    __proto__: null,
    LineTitle
  }, Symbol.toStringTag, { value: "Module" }));
  const modules = /* @__PURE__ */ Object.assign({
    "./lib/ElCascader.ts": __vite_glob_0_0,
    "./lib/ElCheckboxGroup.ts": __vite_glob_0_1,
    "./lib/ElCol.ts": __vite_glob_0_2,
    "./lib/ElColorPicker.ts": __vite_glob_0_3,
    "./lib/ElDatePicker.ts": __vite_glob_0_4,
    "./lib/ElDragTable.ts": __vite_glob_0_5,
    "./lib/ElForm.ts": __vite_glob_0_6,
    "./lib/ElInput.ts": __vite_glob_0_7,
    "./lib/ElInputNumber.ts": __vite_glob_0_8,
    "./lib/ElRadioGroup.ts": __vite_glob_0_9,
    "./lib/ElRate.ts": __vite_glob_0_10,
    "./lib/ElRow.ts": __vite_glob_0_11,
    "./lib/ElSelect.ts": __vite_glob_0_12,
    "./lib/ElSlider.ts": __vite_glob_0_13,
    "./lib/ElSwitch.ts": __vite_glob_0_14,
    "./lib/ElTimePicker.ts": __vite_glob_0_15,
    "./lib/ElTimeSelect.ts": __vite_glob_0_16,
    "./lib/LineTitle.ts": __vite_glob_0_17
  });
  let module2 = {};
  Object.keys(modules).forEach((key) => {
    const mod = modules[key] || {};
    Object.assign(module2, mod);
  });
  const componentEvents = {
    ...module2
  };
  const useDragFormStore = pinia.defineStore("useDragFormStore", {
    state: () => ({
      isDragList: false,
      currentData: {},
      currentFormDataModule: {},
      currentDataModule: {}
    }),
    getters: {
      getIsDragList: (state) => {
        return state.isDragList;
      },
      getCurrentData: (state) => {
        return state.currentData;
      },
      getCurrentFormDataModule: (state) => {
        return state.currentFormDataModule;
      },
      getCurrentDataModule: (state) => {
        return state.currentDataModule;
      }
    },
    actions: {
      setCurrentData(data) {
        this.currentData = data;
      },
      setIsDragList(data) {
        this.isDragList = data;
      },
      setCurrentFormDataModule(data) {
        this.currentFormDataModule = data;
      },
      setCurrentDataModule(data) {
        this.currentDataModule = data;
      }
    }
  });
  const getClassGroup = () => {
    return {
      title: "分组",
      type: AttrType.LAYOUT,
      formType: JSONType.DRAGFORM,
      attrsJson: componentAttrs.LineTitle,
      componentName: ComponentType.LineTitle,
      // 组件名称，用于生成代码
      attrs: {}
    };
  };
  const container = {
    title: "容器",
    attrs: {},
    prop: "container",
    type: AttrType.LAYOUT,
    formType: JSONType.ALL,
    children: [
      {
        title: "栅格",
        attrs: {
          gutter: 10
        },
        type: AttrType.LAYOUT,
        formType: JSONType.ALL,
        componentName: ComponentType.ElRow,
        // 组件名称，用于生成代码
        attrsJson: componentAttrs.ElRow,
        children: [
          ElColDragFormData(),
          ElColDragFormData()
        ]
      },
      getClassGroup()
    ]
  };
  const compontent = {
    title: "常用控件",
    formType: JSONType.ALL,
    prop: "compontent",
    attrs: {},
    type: AttrType.COMPONENT,
    children: [
      {
        label: "添加列表",
        type: AttrType.COMPONENT,
        title: "添加列表",
        formItemAttrs: {},
        attrs: {},
        formType: JSONType.DRAGFORM,
        attrsJson: componentAttrs.ElDragTable,
        componentName: ComponentType.ElDragTable,
        // 组件名称，用于生成代码
        children: []
      },
      {
        label: "多选框",
        type: AttrType.COMPONENT,
        title: "多选框",
        formType: JSONType.ALL,
        formItemAttrs: {},
        attrs: {},
        rules: [],
        events: componentEvents.ElCheckboxGroup,
        prop: "",
        attrsJson: componentAttrs.ElCheckboxGroup,
        componentName: ComponentType.ElCheckboxGroup,
        // 组件名称，用于生成代码
        children: []
      },
      {
        label: "单选框",
        type: AttrType.COMPONENT,
        title: "单选框",
        formItemAttrs: {},
        formType: JSONType.ALL,
        attrs: {},
        rules: [],
        prop: "",
        events: componentEvents.ElRadioGroup,
        attrsJson: componentAttrs.ElRadioGroup,
        componentName: ComponentType.ElRadioGroup,
        // 组件名称，用于生成代码
        children: []
      },
      {
        label: "输入框",
        type: AttrType.COMPONENT,
        title: "输入框",
        formItemAttrs: {},
        formType: JSONType.ALL,
        attrs: {},
        rules: [],
        prop: "",
        events: componentEvents.ElInput,
        attrsJson: componentAttrs.ElInput,
        componentName: ComponentType.ElInput
        // 组件名称，用于生成代码
      },
      {
        title: "数字输入框",
        label: "数字输入框",
        type: AttrType.COMPONENT,
        formItemAttrs: {},
        formType: JSONType.ALL,
        attrs: {},
        rules: [],
        prop: "",
        events: componentEvents.ElInputNumber,
        attrsJson: componentAttrs.ElInputNumber,
        componentName: ComponentType.ElInputNumber
        // 组件名称，用于生成代码
      },
      {
        title: "选择器",
        prop: "",
        label: "选择器",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {
          placeholder: "请选择"
          // disabled:true
        },
        formItemAttrs: {},
        rules: [],
        events: componentEvents.ElSelect,
        attrsJson: componentAttrs.ElSelect,
        componentName: ComponentType.ElSelect,
        // 组件名称，用于生成代码
        children: []
      },
      {
        title: "级联选择器",
        prop: "",
        label: "级联选择器",
        type: AttrType.COMPONENT,
        formType: JSONType.ALL,
        attrs: {
          // disabled:true
        },
        formItemAttrs: {},
        events: componentEvents.ElCascader,
        rules: [],
        attrsJson: componentAttrs.ElCascader,
        componentName: ComponentType.ElCascader
        // 组件名称，用于生成代码
      },
      {
        title: "日期选择器",
        label: "日期选择器",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        events: componentEvents.ElDatePicker,
        attrsJson: componentAttrs.ElDatePicker,
        componentName: ComponentType.ElDatePicker,
        // 组件名称，用于生成代码
        watch: [
          {
            prop: "attrsJson.0.defaultValue",
            options: {
              // deep:true
            },
            handler: (newVal, oldVal, data) => {
              const dragFormStore = useDragFormStore();
              const { element } = data;
              console.log("element :>> ", element);
              element.attrsJson.forEach((item) => {
                if (item.prop == "value-format" || item.prop == "format") {
                  item.defaultValue = formatOptions[newVal];
                  const currentDataModule = dragFormStore.currentDataModule;
                  currentDataModule[item.prop] = item.defaultValue;
                  formAndAttrsUpdata(element, item);
                }
              });
            }
          }
        ]
      },
      {
        title: "颜色选择器",
        label: "颜色选择器",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        attrsJson: componentAttrs.ElColorPicker,
        events: componentEvents.ElColorPicker,
        componentName: ComponentType.ElColorPicker
        // 组件名称，用于生成代码
      },
      {
        title: "开关",
        label: "开关",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        events: componentEvents.ElSwitch,
        attrsJson: componentAttrs.ElSwitch,
        componentName: ComponentType.ElSwitch
        // 组件名称，用于生成代码
      },
      {
        title: "评分",
        label: "评分",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        events: componentEvents.ElRate,
        attrsJson: componentAttrs.ElRate,
        componentName: ComponentType.ElRate
        // 组件名称，用于生成代码
      },
      {
        title: "滑块",
        label: "滑块",
        formType: JSONType.ALL,
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        attrsJson: componentAttrs.ElSlider,
        events: componentEvents.ElSlider,
        componentName: ComponentType.ElSlider
        // 组件名称，用于生成代码
      },
      {
        title: "时间选择器",
        formType: JSONType.ALL,
        label: "时间选择器",
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        attrsJson: componentAttrs.ElTimePicker,
        events: componentEvents.ElTimePicker,
        componentName: ComponentType.ElTimePicker
        // 组件名称，用于生成代码
      },
      {
        title: "时间选择",
        formType: JSONType.ALL,
        label: "时间选择",
        type: AttrType.COMPONENT,
        attrs: {},
        prop: "",
        formItemAttrs: {},
        rules: [],
        attrsJson: componentAttrs.ElTimeSelect,
        events: componentEvents.ElTimeSelect,
        componentName: ComponentType.ElTimeSelect
        // 组件名称，用于生成代码
      }
    ]
  };
  const componentList = [
    container,
    compontent
  ];
  const findParent = (array, currentId) => {
    const findActive = (data, id) => {
      for (let index2 = 0; index2 < data.length; index2++) {
        const element = data[index2];
        if (element.id == id) {
          return element;
        } else if (element.children && element.children.length > 0) {
          return findActive(element.children, id);
        }
      }
    };
    return findActive(array, currentId);
  };
  const _imports_0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1706506610188'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4260'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M153.6%20204.8v716.8a51.2%2051.2%200%200%200%2051.2%2051.2h614.4a51.2%2051.2%200%200%200%2051.2-51.2V204.8H153.6z%20m153.6-51.2V51.2a51.2%2051.2%200%200%201%2051.2-51.2h307.2a51.2%2051.2%200%200%201%2051.2%2051.2v102.4h204.8v768a102.4%20102.4%200%200%201-102.4%20102.4H204.8a102.4%20102.4%200%200%201-102.4-102.4V153.6h204.8z%20m51.2%200h307.2V51.2H358.4v102.4z%20m-25.6%20204.8a25.6%2025.6%200%200%201%2025.6%2025.6v409.6a25.6%2025.6%200%201%201-51.2%200v-409.6a25.6%2025.6%200%200%201%2025.6-25.6zM512%20358.4a25.6%2025.6%200%200%201%2025.6%2025.6v409.6a25.6%2025.6%200%201%201-51.2%200v-409.6A25.6%2025.6%200%200%201%20512%20358.4z%20m179.2%200a25.6%2025.6%200%200%201%2025.6%2025.6v409.6a25.6%2025.6%200%201%201-51.2%200v-409.6a25.6%2025.6%200%200%201%2025.6-25.6zM25.6%20153.6h972.8a25.6%2025.6%200%201%201%200%2051.2H25.6a25.6%2025.6%200%200%201%200-51.2z'%20fill='%23ffffff'%20p-id='4261'%3e%3c/path%3e%3c/svg%3e";
  const _hoisted_1$b = { class: "drag-handler" };
  const _hoisted_2$7 = { class: "field-action" };
  const _hoisted_3$6 = { key: 1 };
  const _sfc_main$l = vue.defineComponent({
    __name: "selector",
    props: {
      renderType: {
        //预览方式  render 预览  '' 拖拽渲染 
        type: String,
        default: ""
      },
      element: {
        type: Object,
        required: true
      }
    },
    setup(__props) {
      const viewArr = vue.inject("viewArr");
      const currentDataModule = vue.inject("currentDataModule");
      const currentDataEvents = vue.inject("currentDataEvents");
      vue.inject("componentAttrsCurrent");
      const formAttrRef = vue.inject("formAttrRef");
      vue.reactive({});
      const dragFormStore = useDragFormStore();
      const isDragList = vue.computed(() => {
        return dragFormStore.isDragList;
      });
      const currentData = vue.computed(() => {
        return dragFormStore.getCurrentData;
      });
      const actived = (data, id) => {
        data.forEach((item) => {
          if (item.id != id) {
            item.active = false;
          }
          if (item.id == id) {
            dragFormStore.setCurrentData(item);
          }
          if (item.children) {
            actived(item.children, id);
          }
        });
      };
      const handleActive = (item) => {
        if (currentData.value && formAttrRef.value && formAttrRef.value.validate) {
          formAttrRef.value.validate((valid) => {
            if (valid) {
              const id = item.id;
              actived(viewArr.value, id);
              item.active = true;
              vue.nextTick(() => {
                if (formAttrRef.value && currentData.value.id) {
                  currentDataModule.value = {};
                  currentDataEvents.value = {};
                  currentData.value.attrsJson.forEach((item2) => {
                    currentDataModule.value[item2.prop] = item2.defaultValue;
                  });
                  if (currentData.value.events) {
                    currentData.value.events.forEach((item2) => {
                      currentDataEvents.value[item2.prop] = item2.defaultValue;
                    });
                    currentDataEvents.value.id = id;
                  }
                  currentDataModule.value.id = id;
                }
              });
            } else {
              return false;
            }
          });
        } else {
          const id = item.id;
          actived(viewArr.value, id);
          item.active = true;
          vue.nextTick(() => {
            if (formAttrRef.value && currentData.value.id) {
              currentDataModule.value = {};
              currentData.value.attrsJson.forEach((item2) => {
                currentDataModule.value[item2.prop] = item2.defaultValue;
              });
              if (currentData.value.events) {
                currentData.value.events.forEach((item2) => {
                  currentDataEvents.value[item2.prop] = item2.defaultValue;
                });
                currentDataEvents.value.id = id;
              }
              currentDataModule.value.id = id;
            }
          });
        }
      };
      const handleDelete = (element) => {
        var _a;
        function filterElement(params) {
          return params.filter((item) => {
            if (item.children) {
              item.children = filterElement(item.children);
            }
            return item.id != element.id;
          });
        }
        if (element.componentName == ComponentType.ElCol) {
          let data = findParent(
            viewArr.value,
            currentData.value.parentId
          );
          (_a = data.children) == null ? void 0 : _a.forEach((e, index2) => {
            var _a2;
            if (e.id == element.id) {
              (_a2 = data.attrsJson) == null ? void 0 : _a2.forEach((a) => {
                if (a.prop == AttrPropType.ElCOLSPAN) {
                  a.defaultValue.splice(index2, 1);
                }
              });
            }
          });
          viewArr.value = filterElement(viewArr.value);
        } else {
          viewArr.value = filterElement(viewArr.value);
        }
        currentDataModule.value = {};
        dragFormStore.setCurrentData({});
      };
      return (_ctx, _cache) => {
        return vue.openBlock(), vue.createElementBlock("div", null, [
          __props.renderType == "" ? (vue.openBlock(), vue.createElementBlock("div", {
            key: 0,
            class: "selector",
            onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => handleActive(__props.element), ["stop"]))
          }, [
            vue.renderSlot(_ctx.$slots, "default", {}, void 0, true),
            !isDragList.value ? (vue.openBlock(), vue.createElementBlock("div", {
              key: 0,
              class: "maskElement",
              style: vue.normalizeStyle({
                opacity: __props.element.active ? "1" : "0"
              })
            }, [
              vue.createElementVNode("div", _hoisted_1$b, vue.toDisplayString(__props.element.title), 1),
              vue.createElementVNode("div", _hoisted_2$7, [
                vue.createElementVNode("div", null, [
                  vue.createElementVNode("img", {
                    onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => handleDelete(__props.element), ["stop"])),
                    style: { "width": "16px", "height": "16px", "margin-top": "4px" },
                    src: _imports_0,
                    alt: ""
                  })
                ])
              ])
            ], 4)) : vue.createCommentVNode("", true)
          ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$6, [
            vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
          ]))
        ]);
      };
    }
  });
  const selector = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-597f658a"]]);
  const _hoisted_1$a = { class: "ElDragTable" };
  const _hoisted_2$6 = { class: "elDragTableHeader" };
  const _hoisted_3$5 = /* @__PURE__ */ vue.createElementVNode("div", null, null, -1);
  const _hoisted_4$5 = {
    key: 0,
    class: "is-required"
  };
  const _sfc_main$k = vue.defineComponent({
    __name: "ElDragTable",
    props: {
      renderType: {
        //预览方式  render 预览  '' 拖拽渲染 
        type: String,
        default: ""
      },
      element: {
        type: Object,
        required: true
      },
      model: {
        type: Object,
        required: true
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      vue.useCssVars((_ctx) => ({
        "18953936-renderTypeoverflow": renderTypeoverflow.value
      }));
      const state = vue.reactive({
        data: [{}]
      });
      const elTableRef = vue.ref(null);
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.element,
        () => {
          vue.nextTick(() => {
            if (elTableRef.value) ;
          });
        },
        { immediate: false, deep: true }
      );
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        prop.model[prop.element.prop].push({});
        upData();
      };
      const handleClose = (data) => {
        prop.model[prop.element.prop].splice(data.$index, 1);
      };
      const dragFormStore = useDragFormStore();
      vue.computed(() => {
        return dragFormStore.isDragList;
      });
      const toolStart = (e) => {
        dragFormStore.setIsDragList(true);
      };
      const toolEnd = (e) => {
        dragFormStore.setIsDragList(false);
      };
      const renderTypeoverflow = vue.computed(() => {
        return prop.renderType == "render" ? "hidden" : "revert";
      });
      const events = (element, model) => {
        let dataF = formatFunction(element, model);
        return {
          ...dataF
        };
      };
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_table = vue.resolveComponent("el-table");
        return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [
          vue.createElementVNode("div", _hoisted_2$6, [
            _hoisted_3$5,
            vue.createVNode(_component_el_button, {
              size: "small",
              disabled: __props.renderType != "render" ? true : false,
              type: "primary",
              onClick: handleAdd
            }, {
              default: vue.withCtx(() => [
                vue.createTextVNode("添加")
              ]),
              _: 1
            }, 8, ["disabled"])
          ]),
          vue.createVNode(_component_el_table, {
            ref_key: "elTableRef",
            ref: elTableRef,
            data: __props.renderType == "render" ? __props.model[__props.element.prop] : state.data
          }, {
            default: vue.withCtx(() => [
              (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.element.children, (item, index2) => {
                return vue.openBlock(), vue.createBlock(_component_el_table_column, {
                  key: index2,
                  prop: item.prop,
                  label: item.label,
                  minWidth: item.minWidth
                }, {
                  header: vue.withCtx(() => [
                    item.children.length > 0 && item.children[0].rules.length > 0 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$5, " * ")) : vue.createCommentVNode("", true),
                    vue.createTextVNode(" " + vue.toDisplayString(item.label), 1)
                  ]),
                  default: vue.withCtx((scope) => [
                    vue.createVNode(vue.unref(draggable), {
                      modelValue: item.children,
                      "onUpdate:modelValue": ($event) => item.children = $event,
                      disabled: __props.renderType != "render" ? false : true,
                      "data-type": vue.unref(AttrType).LAYOUT,
                      "data-title": __props.element.title,
                      group: { name: "g1" },
                      onStart: toolStart,
                      onEnd: toolEnd,
                      animation: "300"
                    }, {
                      item: vue.withCtx(({ element }) => [
                        !vue.unref(hidden)(element, __props.model) ? (vue.openBlock(), vue.createBlock(selector, {
                          key: 0,
                          element,
                          "data-type": element.type,
                          renderType: __props.renderType,
                          class: vue.normalizeClass([element.active ? "selectorSelected" : ""])
                        }, {
                          default: vue.withCtx(() => [
                            vue.createVNode(_component_el_form_item, {
                              prop: prop.element.prop + "." + scope.$index + "." + item.prop,
                              rules: element.rules
                            }, {
                              default: vue.withCtx(() => [
                                (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element.componentName), vue.mergeProps(element.attrs, {
                                  modelValue: scope.row[item.prop],
                                  "onUpdate:modelValue": ($event) => scope.row[item.prop] = $event
                                }, vue.toHandlers(events(element, scope))), vue.createSlots({ _: 2 }, [
                                  element.children ? {
                                    name: "default",
                                    fn: vue.withCtx(() => [
                                      (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(element.children, (item2, index22) => {
                                        return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item2.componentName), vue.mergeProps({ key: index22 }, item2.attrs), null, 16);
                                      }), 128))
                                    ]),
                                    key: "0"
                                  } : void 0
                                ]), 1040, ["modelValue", "onUpdate:modelValue"]))
                              ]),
                              _: 2
                            }, 1032, ["prop", "rules"])
                          ]),
                          _: 2
                        }, 1032, ["element", "data-type", "renderType", "class"])) : vue.createCommentVNode("", true)
                      ]),
                      _: 2
                    }, 1032, ["modelValue", "onUpdate:modelValue", "disabled", "data-type", "data-title"])
                  ]),
                  _: 2
                }, 1032, ["prop", "label", "minWidth"]);
              }), 128)),
              __props.element.children.length > 0 ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
                key: 0,
                fixed: __props.element.attrs.fixed,
                label: "操作",
                width: "80"
              }, {
                default: vue.withCtx((scoped) => [
                  vue.createVNode(_component_el_button, {
                    link: "",
                    type: "danger",
                    size: "small",
                    onClick: ($event) => handleClose(scoped)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("删除")
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ]),
                _: 1
              }, 8, ["fixed"])) : vue.createCommentVNode("", true)
            ]),
            _: 1
          }, 8, ["data"])
        ]);
      };
    }
  });
  const _sfc_main$j = vue.defineComponent({
    __name: "lineTitle",
    props: {
      height: {
        type: Number,
        required: true
      },
      fontSize: {
        type: Number,
        required: true
      },
      width: {
        type: Number,
        required: true
      },
      marginRight: {
        type: Number,
        required: true
      },
      backgroundColor: {
        type: String,
        required: true
      },
      color: {
        type: String,
        required: true
      },
      title: {
        type: String,
        required: true
      }
    },
    setup(__props) {
      vue.reactive({});
      return (_ctx, _cache) => {
        return vue.openBlock(), vue.createElementBlock("div", null, [
          vue.createElementVNode("div", {
            class: "lineTitle-darg-form",
            style: vue.normalizeStyle({
              color: __props.color,
              fontSize: __props.fontSize + "px"
            })
          }, [
            vue.createElementVNode("div", {
              class: "after",
              style: vue.normalizeStyle({
                backgroundColor: __props.backgroundColor,
                width: __props.width + "px",
                height: __props.height + "px",
                marginRight: __props.marginRight + "px"
              })
            }, null, 4),
            vue.createTextVNode(" " + vue.toDisplayString(__props.title), 1)
          ], 4)
        ]);
      };
    }
  });
  const lineTitle = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-73e11729"]]);
  const _sfc_main$i = vue.defineComponent({
    __name: "drag-row",
    props: {
      element: {
        type: Object,
        required: true
      },
      renderType: {
        //预览方式  render 预览  '' 拖拽渲染 
        type: String,
        default: ""
      },
      model: {
        type: Object,
        required: true
      }
    },
    setup(__props) {
      vue.reactive({});
      const dragFormStore = useDragFormStore();
      vue.computed(() => {
        return dragFormStore.isDragList;
      });
      return (_ctx, _cache) => {
        const _component_el_col = vue.resolveComponent("el-col");
        const _component_el_row = vue.resolveComponent("el-row");
        return vue.openBlock(), vue.createBlock(_component_el_row, vue.mergeProps({
          "data-type": vue.unref(AttrType).LAYOUT
        }, __props.element.attrs, {
          class: [
            __props.element.active ? "selectorSelected" : "",
            __props.renderType != "render" ? "grid-container" : ""
          ]
        }), {
          default: vue.withCtx(() => [
            (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.element.children, (item, index2) => {
              return vue.openBlock(), vue.createBlock(_component_el_col, vue.mergeProps({ key: index2 }, item.attrs, {
                "data-type": vue.unref(AttrType).LAYOUT,
                class: [item.active ? "selectorSelected" : ""]
              }), {
                default: vue.withCtx(() => [
                  vue.createVNode(selector, {
                    element: item,
                    renderType: __props.renderType
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(vue.unref(draggable), {
                        modelValue: item.children,
                        "onUpdate:modelValue": ($event) => item.children = $event,
                        "data-title": __props.element.title,
                        class: vue.normalizeClass(__props.renderType != "render" ? "colDraggable" : ""),
                        disabled: __props.renderType != "render" ? false : true,
                        "data-type": vue.unref(AttrType).LAYOUT,
                        group: { name: "g1" },
                        animation: "300"
                      }, {
                        item: vue.withCtx(({ element }) => [
                          vue.createVNode(_sfc_main$h, {
                            renderType: __props.renderType,
                            element,
                            model: __props.model
                          }, null, 8, ["renderType", "element", "model"])
                        ]),
                        _: 2
                      }, 1032, ["modelValue", "onUpdate:modelValue", "data-title", "class", "disabled", "data-type"])
                    ]),
                    _: 2
                  }, 1032, ["element", "renderType"])
                ]),
                _: 2
              }, 1040, ["data-type", "class"]);
            }), 128))
          ]),
          _: 1
        }, 16, ["data-type", "class"]);
      };
    }
  });
  const _sfc_main$h = vue.defineComponent({
    __name: "CustomComponent",
    props: {
      type: {
        type: String,
        default: ""
      },
      renderType: {
        //预览方式  render 预览  '' 拖拽渲染 
        type: String,
        default: ""
      },
      element: {
        type: Object,
        required: true
      },
      model: {
        type: Object,
        required: true
      }
    },
    setup(__props) {
      vue.reactive({});
      vue.ref("");
      const prop = __props;
      const updata = vue.shallowRef(true);
      vue.watch(
        () => prop.model,
        (newVal) => {
          if (prop.element.watch) {
            const watches = Array.isArray(prop.element.watch) ? prop.element.watch : [prop.element.watch];
            watches.forEach((watchItem) => {
              const value = newVal[watchItem.prop];
              if (value !== void 0) {
                watchItem.handler(value, prop.element.children);
              }
            });
          }
        },
        { deep: true }
      );
      if (prop.element.watch) {
        if (Array.isArray(prop.element.watch)) {
          for (let index2 = 0; index2 < prop.element.watch.length; index2++) {
            const element = prop.element.watch[index2];
            vue.watch(
              () => {
                const path = element.prop.split(".");
                let value = path.reduce((obj, key) => obj == null ? void 0 : obj[key], prop.element);
                console.log("value :>> ", value);
                return value;
              },
              (newVal, oldVal) => {
                element.handler(newVal, oldVal, {
                  element: prop.element
                });
              },
              element.options
            );
          }
        }
      }
      const events = vue.computed(() => {
        let dataF = formatFunction(prop.element, prop.model);
        return {
          ...dataF
        };
      });
      console.log("object :>> ", prop.element);
      const binds = vue.computed(() => {
        updata.value = false;
        setTimeout(() => {
          updata.value = true;
        }, 5);
        return {
          ...prop.element.attrs
        };
      });
      return (_ctx, _cache) => {
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        return (__props.renderType == "" ? true : !vue.unref(hidden)(__props.element, __props.model)) ? (vue.openBlock(), vue.createBlock(selector, {
          key: 0,
          renderType: __props.renderType,
          class: vue.normalizeClass([__props.element.active ? "selectorSelected" : ""]),
          element: __props.element,
          "data-type": __props.type
        }, {
          default: vue.withCtx(() => [
            __props.element.componentName == vue.unref(ComponentType).LineTitle ? (vue.openBlock(), vue.createBlock(lineTitle, vue.normalizeProps(vue.mergeProps({ key: 0 }, __props.element.attrs)), null, 16)) : __props.element.componentName == vue.unref(ComponentType).ElRow ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
              key: 1,
              model: __props.model,
              element: __props.element,
              renderType: __props.renderType
            }, null, 8, ["model", "element", "renderType"])) : __props.element.componentName == vue.unref(ComponentType).ElDragTable ? (vue.openBlock(), vue.createBlock(_sfc_main$k, {
              key: 2,
              renderType: __props.renderType,
              model: __props.model,
              element: __props.element
            }, null, 8, ["renderType", "model", "element"])) : vue.unref(AttrType).COMPONENT == __props.element.type ? (vue.openBlock(), vue.createBlock(_component_el_form_item, vue.mergeProps({ key: 3 }, __props.element.formItemAttrs, {
              prop: __props.element.prop,
              rules: __props.element.rules
            }), {
              label: vue.withCtx(() => [
                __props.element.renderLabel ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.element.renderLabel), { key: 0 })) : vue.renderSlot(_ctx.$slots, __props.element.prop + "Label", { key: 1 }, () => [
                  vue.createTextVNode(vue.toDisplayString(__props.element.label), 1)
                ])
              ]),
              default: vue.withCtx(() => [
                __props.element.render ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.element.render), { key: 0 })) : vue.renderSlot(_ctx.$slots, __props.element.prop, { key: 1 }, () => [
                  updata.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.element.componentName), vue.mergeProps({ key: 0 }, binds.value, {
                    modelValue: __props.model[__props.element.prop],
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.element.prop] = $event)
                  }, vue.toHandlers(events.value)), vue.createSlots({ _: 2 }, [
                    __props.element.children ? {
                      name: "default",
                      fn: vue.withCtx(() => [
                        (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.element.children, (item, index2) => {
                          return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.componentName), vue.mergeProps({ key: index2 }, item.attrs), null, 16);
                        }), 128))
                      ]),
                      key: "0"
                    } : void 0
                  ]), 1040, ["modelValue"])) : vue.createCommentVNode("", true)
                ])
              ]),
              _: 3
            }, 16, ["prop", "rules"])) : vue.createCommentVNode("", true)
          ]),
          _: 3
        }, 8, ["renderType", "class", "element", "data-type"])) : vue.createCommentVNode("", true);
      };
    }
  });
  const _hoisted_1$9 = { class: "content__wrap" };
  const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
    __name: "index",
    props: {
      title: {
        type: String,
        default: ""
      },
      // 是否显示全屏按钮
      showFullscreen: {
        type: Boolean,
        default: false
      },
      width: {
        type: [String, Number],
        default: "950px"
      }
    },
    setup(__props) {
      vue.reactive({});
      const dialogRef = vue.ref(null);
      const fullscreen = vue.ref(false);
      return (_ctx, _cache) => {
        const _component_el_scrollbar = vue.resolveComponent("el-scrollbar");
        const _component_el_dialog = vue.resolveComponent("el-dialog");
        return vue.openBlock(), vue.createBlock(_component_el_dialog, vue.mergeProps({
          ref_key: "dialogRef",
          ref: dialogRef
        }, _ctx.$attrs, {
          fullscreen: fullscreen.value,
          "destroy-on-close": "",
          "append-to-body": true,
          "lock-scroll": false,
          "close-on-click-modal": false,
          width: __props.width,
          top: "10vh"
        }), vue.createSlots({
          header: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "title", {}, () => [
              vue.createTextVNode(vue.toDisplayString(__props.title), 1)
            ], true)
          ]),
          default: vue.withCtx(() => [
            vue.createVNode(_component_el_scrollbar, {
              class: vue.normalizeClass(
                fullscreen.value && _ctx.$slots.footer ? "com-dialog__content--footer" : fullscreen.value && !_ctx.$slots.footer ? "com-dialog__content--fullscreen" : "com-dialog__content"
              )
            }, {
              default: vue.withCtx(() => [
                vue.createElementVNode("div", _hoisted_1$9, [
                  vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
                ])
              ]),
              _: 3
            }, 8, ["class"])
          ]),
          _: 2
        }, [
          _ctx.$slots.footer ? {
            name: "footer",
            fn: vue.withCtx(() => [
              vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
            ]),
            key: "0"
          } : void 0
        ]), 1040, ["fullscreen", "width"]);
      };
    }
  });
  const ComDialog = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-dd1918d4"]]);
  const _sfc_main$f = vue.defineComponent({
    __name: "exportJson",
    props: {
      modelValue: {
        type: Boolean,
        defalut: false
      },
      exportType: {
        type: String,
        defalut: ""
      },
      formAttrs: {
        type: Object,
        required: true
      },
      data: {
        type: Object,
        defalut: false
      },
      type: {
        type: String,
        default: ""
      }
    },
    emits: ["update:modelValue"],
    setup(__props, { emit: __emit }) {
      const emit = __emit;
      const states = vue.reactive({
        lang: "json",
        theme: "github",
        content: ""
      });
      const dialogVisible = vue.ref(false);
      const subLoading = vue.ref(false);
      vue.ref();
      let props = __props;
      const MONACO_EDITOR_OPTIONS = {
        automaticLayout: true,
        formatOnType: true,
        formatOnPaste: true
      };
      const editorRef = vue.shallowRef();
      const handleMount = (editor2) => editorRef.value = editor2;
      function formatCode() {
        var _a;
        (_a = editorRef.value) == null ? void 0 : _a.getAction("editor.action.formatDocument").run();
      }
      vue.watch(
        () => props.modelValue,
        (val) => {
          dialogVisible.value = val;
        },
        {
          immediate: true
        }
      );
      vue.watch(
        () => props.data,
        (val) => {
          if (val) {
            const dataNew = lodash.cloneDeep(val);
            if (props.type == JSONType.ELEMENTEASYFORM) {
              const schema = generateEasyFormCode(dataNew);
              const model = getModel(dataNew);
              if (props.exportType == ExportType.JSON) {
                states.lang = "json";
                let data = {
                  rowAttrs: {
                    gutter: 20,
                    ...getRowAttrs(dataNew)
                  },
                  schema,
                  model,
                  formAttrs: props.formAttrs
                };
                states.content = JSON.stringify(data, null, 2);
              } else if (props.exportType == ExportType.CODE) {
                states.lang = "html";
                let data = {
                  rowAttrs: {
                    gutter: 20,
                    ...getRowAttrs(dataNew)
                  },
                  schema,
                  model,
                  formAttrs: props.formAttrs
                };
                states.content = getHtmlEasyForm(data);
                vue.nextTick(() => {
                  setTimeout(() => {
                    formatCode();
                  }, 1e3);
                });
              }
            } else if (props.type == JSONType.DRAGFORM) {
              const formJson = generateDragFormCode(dataNew);
              const model = getModel(dataNew);
              let data = {
                formJson,
                model,
                formAttrs: props.formAttrs
              };
              if (props.exportType == ExportType.JSON) {
                states.lang = "json";
                states.content = JSON.stringify(data, null, 2);
              } else if (props.exportType == ExportType.CODE) {
                states.lang = "html";
                states.content = getHtmlDragForm(data);
                vue.nextTick(() => {
                  setTimeout(() => {
                    formatCode();
                  }, 1e3);
                });
              }
            }
          }
        },
        {
          deep: true
        }
      );
      const handleClose = () => {
        emit("update:modelValue", false);
      };
      vue.watch(
        () => dialogVisible.value,
        (val) => {
          if (!val) {
            handleClose();
          }
        }
      );
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        return vue.openBlock(), vue.createBlock(ComDialog, {
          modelValue: dialogVisible.value,
          "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event)
        }, {
          footer: vue.withCtx(() => [
            vue.createElementVNode("div", null, [
              vue.createVNode(_component_el_button, {
                size: "large",
                onClick: handleClose
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("取消")
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_button, {
                size: "large",
                loading: subLoading.value,
                type: "primary",
                onClick: _ctx.submitData
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("保存")
                ]),
                _: 1
              }, 8, ["loading", "onClick"])
            ])
          ]),
          default: vue.withCtx(() => [
            vue.createVNode(vue.unref(editor.MonacoEditor), {
              theme: "vs-dark",
              language: states.lang,
              width: 800,
              height: 500,
              value: states.content,
              "onUpdate:value": _cache[0] || (_cache[0] = ($event) => states.content = $event),
              onMount: handleMount,
              options: MONACO_EDITOR_OPTIONS
            }, null, 8, ["language", "value"])
          ]),
          _: 1
        }, 8, ["modelValue"]);
      };
    }
  });
  const _withScopeId$1 = (n) => (vue.pushScopeId("data-v-1a709566"), n = n(), vue.popScopeId(), n);
  const _hoisted_1$8 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ vue.createElementVNode("div", { style: { "height": "20px" } }, null, -1));
  const _hoisted_2$5 = { class: "preview" };
  const _sfc_main$e = vue.defineComponent({
    __name: "Preview",
    props: {
      modelValue: {
        type: Boolean,
        defalut: false
      },
      data: {
        type: Object,
        defalut: false
      },
      formAttrs: {
        type: Object,
        required: true
      },
      currentFormDataModule: {
        type: Object,
        defalut: false
      },
      type: {
        type: String,
        default: ""
      }
    },
    emits: ["update:modelValue"],
    setup(__props, { emit: __emit }) {
      const emit = __emit;
      const elementFormrenderRef = vue.ref();
      const dialogVisible = vue.ref(false);
      const submitData = async () => {
        await elementFormrenderRef.value.validate();
        dialogVisible.value = false;
      };
      let props = __props;
      vue.watch(
        () => props.modelValue,
        (val) => {
          dialogVisible.value = val;
        },
        {
          immediate: true
        }
      );
      const handleClose = () => {
        emit("update:modelValue", false);
      };
      vue.watch(
        () => dialogVisible.value,
        (val) => {
          if (!val) {
            handleClose();
          }
        }
      );
      vue.watch(
        () => props.data,
        (val) => {
          if (val) {
            const dataNew = lodash.cloneDeep(val);
            if (props.type == JSONType.ELEMENTEASYFORM) {
              const schema = generateEasyFormCode(dataNew);
              const model = getModel(dataNew);
              let data = {
                rowAttrs: {
                  ...getRowAttrs(dataNew)
                },
                schema,
                model,
                formAttrs: props.formAttrs
              };
              formJson.value = data;
            } else if (props.type == JSONType.DRAGFORM) {
              const formJson2 = generateDragFormCode(dataNew);
              const model = getModel(dataNew);
              let data = {
                formJson: formJson2,
                model,
                formAttrs: props.formAttrs
              };
              dragFormJson.value = data;
            }
          }
        },
        {
          deep: true
        }
      );
      const dragFormJson = vue.ref({});
      const formJson = vue.ref({});
      return (_ctx, _cache) => {
        const _component_element_form_render = vue.resolveComponent("element-form-render");
        const _component_ElementEasyForm = vue.resolveComponent("ElementEasyForm");
        const _component_el_button = vue.resolveComponent("el-button");
        return vue.openBlock(), vue.createBlock(ComDialog, {
          modelValue: dialogVisible.value,
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dialogVisible.value = $event)
        }, {
          footer: vue.withCtx(() => [
            vue.createElementVNode("div", null, [
              vue.createVNode(_component_el_button, {
                size: "large",
                onClick: handleClose
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("取消")
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_button, {
                size: "large",
                loading: _ctx.subLoading,
                type: "primary",
                onClick: submitData
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("保存")
                ]),
                _: 1
              }, 8, ["loading"])
            ])
          ]),
          default: vue.withCtx(() => [
            _hoisted_1$8,
            vue.createElementVNode("div", _hoisted_2$5, [
              __props.type == vue.unref(JSONType).DRAGFORM ? (vue.openBlock(), vue.createBlock(_component_element_form_render, {
                key: 0,
                ref_key: "elementFormrenderRef",
                ref: elementFormrenderRef,
                formJson: dragFormJson.value.formJson,
                formAttrs: __props.formAttrs,
                model: dragFormJson.value.model
              }, null, 8, ["formJson", "formAttrs", "model"])) : vue.createCommentVNode("", true),
              __props.type == vue.unref(JSONType).ELEMENTEASYFORM ? (vue.openBlock(), vue.createBlock(_component_ElementEasyForm, {
                key: 1,
                ref_key: "elementFormrenderRef",
                ref: elementFormrenderRef,
                formJson: formJson.value
              }, null, 8, ["formJson"])) : vue.createCommentVNode("", true)
            ])
          ]),
          _: 1
        }, 8, ["modelValue"]);
      };
    }
  });
  const Preview = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-1a709566"]]);
  const formData = "formData";
  const getTag = (value) => {
    let result = "";
    for (let i = 0; i < value.length; i++) {
      let char = value.charAt(i);
      if (char >= "A" && char <= "Z") {
        if (i > 0) {
          result += "-";
        }
        result += char.toLowerCase();
      } else {
        result += char;
      }
    }
    return result;
  };
  const getAttrs = (data, prop) => {
    let str = "";
    for (const key in data) {
      if (Object.prototype.hasOwnProperty.call(data, key)) {
        const element = data[key];
        if (key != "defaultValue") {
          if (typeof element != "string") {
            str += `
 :${key}="${element}" `;
          } else {
            str += `
 ${key}="${element}" `;
          }
        } else {
          str += `
  v-model="${prop}" `;
        }
      }
    }
    return str;
  };
  const getEvent = (data) => {
    let str = "";
    for (const key in data) {
      if (Object.prototype.hasOwnProperty.call(data, key)) {
        const element = data[key];
        str += `
 @${key}="${element}"`;
      }
    }
    return str;
  };
  const getFunctions = (data) => {
    if (!data) return "";
    let str = "";
    for (let index2 = 0; index2 < data.length; index2++) {
      const element = data[index2];
      if (element.events) {
        for (let eIndex = 0; eIndex < element.events.length; eIndex++) {
          const eventEl = element.events[eIndex];
          const parameterString = eventEl.defaultValue.slice(eventEl.defaultValue.indexOf("(") + 1, eventEl.defaultValue.indexOf(")"));
          const parameters = parameterString.split(",").map((param) => param.trim()).filter((param) => param);
          let body = getFunctionTemplate(eventEl.defaultValue);
          if (body) {
            str += `
 const ${element.prop}${eventEl.prop} = (${parameters.join(",")}) => {
                ${getFunctionTemplate(eventEl.defaultValue)}
            }`;
          }
        }
      }
      if (element.children) {
        str += getFunctions(element.children);
      }
    }
    return str;
  };
  function generateVue(data) {
    if (!data) return "";
    let str = "";
    for (let index2 = 0; index2 < data.length; index2++) {
      const element = data[index2];
      let event = {};
      if (element.events) {
        for (let eIndex = 0; eIndex < element.events.length; eIndex++) {
          const eventEl = element.events[eIndex];
          let body = getFunctionTemplate(eventEl.defaultValue);
          if (body) {
            event[eventEl.prop] = element.prop + eventEl.prop;
          }
        }
      }
      str += `<${getTag(element.componentName)}  ${getAttrs(
        element.attrs,
        element.prop
      )}  ${getEvent(event)}>
            ${generateVue(element.children)}
        </${getTag(element.componentName)}>
        `;
    }
    return str;
  }
  const generateComponentVue = (data, type, formAttrs) => {
    if (data) {
      const code = generateDragFormCode(data);
      const model = getModel(data);
      return `
  <template>
   <div class="">
     <el-form     
     ${getAttrs(formAttrs)}
  :model="formData">
              ${generateVue(code)}
     </el-form>
   </div>
 </template>
 
 <script setup >
 import { ref, reactive, onMounted } from "vue";
 const ${formData} = ref(${JSON.stringify(model)})
 ${getFunctions(code)}
 <\/script>
 <style scoped lang="scss">
 </style>
  `;
    } else {
      return "暂无数据";
    }
  };
  const _sfc_main$d = vue.defineComponent({
    __name: "exportVue",
    props: {
      modelValue: {
        type: Boolean,
        defalut: false
      },
      exportType: {
        type: String,
        defalut: ""
      },
      formAttrs: {
        type: Object,
        required: true
      },
      data: {
        type: Object,
        defalut: false
      },
      type: {
        type: String,
        default: ""
      }
    },
    emits: ["update:modelValue"],
    setup(__props, { emit: __emit }) {
      const dialogVisible = vue.ref(false);
      const subLoading = vue.ref(false);
      vue.ref();
      const emit = __emit;
      const monacoEditorRef = vue.ref();
      const states = vue.reactive({
        lang: "html",
        theme: "github",
        content: ""
      });
      let props = __props;
      const MONACO_EDITOR_OPTIONS = {
        automaticLayout: true,
        formatOnType: true,
        formatOnPaste: true
      };
      const editorRef = vue.shallowRef();
      const handleMount = (editor2) => editorRef.value = editor2;
      function formatCode() {
        var _a;
        (_a = editorRef.value) == null ? void 0 : _a.getAction("editor.action.formatDocument").run();
      }
      vue.watch(
        () => props.modelValue,
        (val) => {
          dialogVisible.value = val;
        },
        {
          immediate: true
        }
      );
      vue.watch(
        () => props.data,
        (val) => {
          if (val) {
            const dataNew = lodash.cloneDeep(val);
            states.content = generateComponentVue(dataNew, props.type, props.formAttrs);
            vue.nextTick(() => {
              setTimeout(() => {
                formatCode();
              }, 1e3);
            });
          }
        },
        {
          deep: true
        }
      );
      const handleClose = () => {
        emit("update:modelValue", false);
      };
      vue.watch(
        () => dialogVisible.value,
        (val) => {
          if (!val) {
            handleClose();
          }
        }
      );
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        return vue.openBlock(), vue.createBlock(ComDialog, {
          modelValue: dialogVisible.value,
          "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event)
        }, {
          footer: vue.withCtx(() => [
            vue.createElementVNode("div", null, [
              vue.createVNode(_component_el_button, {
                size: "large",
                onClick: handleClose
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("取消")
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_button, {
                size: "large",
                loading: subLoading.value,
                type: "primary",
                onClick: _ctx.submitData
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("保存")
                ]),
                _: 1
              }, 8, ["loading", "onClick"])
            ])
          ]),
          default: vue.withCtx(() => [
            vue.createVNode(vue.unref(editor.MonacoEditor), {
              theme: "vs-dark",
              language: states.lang,
              ref_key: "monacoEditorRef",
              ref: monacoEditorRef,
              width: 800,
              height: 500,
              onMount: handleMount,
              options: MONACO_EDITOR_OPTIONS,
              value: states.content,
              "onUpdate:value": _cache[0] || (_cache[0] = ($event) => states.content = $event)
            }, null, 8, ["language", "value"])
          ]),
          _: 1
        }, 8, ["modelValue"]);
      };
    }
  });
  const _hoisted_1$7 = { class: "drag-form" };
  const _hoisted_2$4 = { class: "drag-form-left" };
  const _hoisted_3$4 = /* @__PURE__ */ vue.createElementVNode("div", { class: "drag-form-title" }, "element-easy-form", -1);
  const _hoisted_4$4 = { class: "drag-form-left-conetnt" };
  const _hoisted_5$2 = ["data-type", "data-title"];
  const _hoisted_6$2 = /* @__PURE__ */ vue.createElementVNode("br", null, null, -1);
  const _hoisted_7 = { class: "drag-form-content-tool" };
  const _hoisted_8 = { class: "formBox" };
  const _hoisted_9 = {
    key: 0,
    id: "noData"
  };
  const _hoisted_10 = /* @__PURE__ */ vue.createElementVNode("br", null, null, -1);
  const _hoisted_11 = { class: "drag-form-right" };
  const _hoisted_12 = {
    class: "drag-form-title",
    style: { "border-bottom": "1px solid var(--el-border-color)" }
  };
  const _hoisted_13 = { class: "drag-form-right-conetnt" };
  const _hoisted_14 = {
    key: 0,
    class: "drag-form-right-conetnt"
  };
  const _hoisted_15 = {
    key: 0,
    class: "drag-form-right-conetnt"
  };
  const _sfc_main$c = vue.defineComponent({
    __name: "drag-form",
    props: {
      customoComponents: {
        type: Array,
        required: false,
        default: null
      },
      modelValue: {
        type: Object,
        required: false,
        default: () => []
      }
    },
    emits: ["save"],
    setup(__props, { expose: __expose, emit: __emit }) {
      const emits = __emit;
      const dragFormStore = useDragFormStore();
      const currentData = vue.computed(() => {
        return dragFormStore.getCurrentData;
      });
      const formType = vue.ref(JSONType.DRAGFORM);
      const activeList = vue.ref(
        lodash.cloneDeep(componentList)
      );
      const activeName = vue.ref();
      const activeAttrs = vue.ref("form属性");
      const model = vue.ref({});
      const currentFormDataModule = vue.computed(() => {
        return dragFormStore.getCurrentFormDataModule;
      });
      const currentDataModule = vue.computed(() => {
        return dragFormStore.getCurrentDataModule;
      });
      const viewArr = vue.ref([]);
      const componentAttrsCurrent = vue.ref([]);
      const currentDataEvents = vue.ref({});
      const formAttrRef = vue.ref("");
      const exportJsonBool = vue.ref(false);
      const previewBool = vue.ref(false);
      const exportType = vue.ref("");
      const generateData = vue.ref({});
      const attrsCollapse = vue.ref(["属性", "事件"]);
      const exportVueBool = vue.ref(false);
      const handleSave = () => {
        emits("save", vue.toRaw(viewArr.value));
      };
      const handleExportVue = () => {
        generateData.value = lodash.cloneDeep(viewArr.value);
        exportVueBool.value = true;
      };
      const handleExportJson = (type) => {
        exportType.value = type;
        generateData.value = lodash.cloneDeep(viewArr.value);
        exportJsonBool.value = true;
      };
      const handleClear = () => {
        dragFormStore.setCurrentData({});
        viewArr.value = [];
        currentDataModule.value = {};
        ElForm$1.forEach((res) => {
          if (res.defaultValue !== "") {
            currentFormDataModule.value[res.prop] = res.defaultValue;
          }
        });
      };
      vue.watch(
        () => viewArr.value,
        (val, old) => {
          model.value = getModel(vue.toRaw(val));
        },
        {
          deep: true
        }
      );
      vue.watch(
        () => formType.value,
        (val, old) => {
          const data = lodash.cloneDeep(vue.toRaw(copyData.value));
          if (val == JSONType.ELEMENTEASYFORM) {
            activeList.value = data.map((res) => {
              if (res.children) {
                res.children = res.children.filter(
                  (item) => item.formType == JSONType.ELEMENTEASYFORM || item.formType == JSONType.ALL
                );
              }
              return res;
            });
          } else if (val == JSONType.DRAGFORM) {
            activeList.value = data.map((res) => {
              if (res.children) {
                res.children = res.children.filter(
                  (item) => item.formType == JSONType.DRAGFORM || item.formType == JSONType.ALL
                );
              }
              return res;
            });
          }
        },
        {}
      );
      const formRef = vue.ref();
      const handleAttrsAdd = (type, value) => {
        var _a, _b, _c, _d, _e;
        switch (type) {
          case ComponentType.ElTableColumns:
            (_a = currentData.value.children) == null ? void 0 : _a.push({
              ...ElTableColumnsData(),
              id: uuid.v4()
            });
            break;
          case ComponentType.ElRowAttrs:
            let id = uuid.v4();
            (_b = currentData.value.children) == null ? void 0 : _b.push({
              ...ElColDragFormData(SPANDEFAULT, currentData.value.id),
              id
            });
            break;
          case ComponentType.ElSelectOption:
            (_c = currentData.value.children) == null ? void 0 : _c.push({
              ...ElSelectOptionDragFormData(
                value.label,
                value.value,
                currentData.value.id
              ),
              id: uuid.v4()
            });
            currentData.value.children.forEach((item) => {
              upDateFormItem(item);
            });
            break;
          case ComponentType.ElCheckboxs:
            (_d = currentData.value.children) == null ? void 0 : _d.push({
              ...ElCheckboxDragFormData(
                value.label,
                value.value,
                currentData.value.id
              ),
              id: uuid.v4()
            });
            currentData.value.children.forEach((item) => {
              upDateFormItem(item);
            });
            break;
          case ComponentType.ElRadios:
            (_e = currentData.value.children) == null ? void 0 : _e.push({
              ...ElRadioAndCheckboxDragFormData(
                value.label,
                value.value,
                currentData.value.id
              ),
              id: uuid.v4()
            });
            currentData.value.children.forEach((item) => {
              upDateFormItem(item);
            });
            break;
        }
      };
      const handlAttrsClose = (type, index2) => {
        var _a;
        (_a = currentData.value.children) == null ? void 0 : _a.splice(index2, 1);
      };
      const handleFormAttrs = (val, index2) => {
      };
      const handleEvents = (val, index2) => {
        if (currentData.value.events) {
          currentData.value.events[index2].defaultValue = val;
        }
      };
      const handleAttrs = (val, index2) => {
        var _a, _b, _c;
        let data = {
          prop: ""
        };
        if (currentData.value.attrsJson) {
          data = currentData.value.attrsJson[index2];
        }
        if (currentData.value.componentName == ComponentType.ElDragTable && data.prop == "columns") {
          (_a = currentData.value.children) == null ? void 0 : _a.forEach((item, i) => {
            item["prop"] = val[i].prop;
            item["label"] = val[i].label;
            item["minWidth"] = val[i].minWidth;
          });
        } else if (currentData.value.componentName == ComponentType.ElRow && data.prop == AttrPropType.ElCOLSPAN) {
          (_b = currentData.value.children) == null ? void 0 : _b.forEach((item, i) => {
            item.attrs.span = val[i].value;
            item.attrsJson.forEach((item1, i1) => {
              if (item1.prop == "span") {
                item1.defaultValue = val[i].value;
              }
            });
          });
        } else if (currentData.value.componentName == ComponentType.ElCol && data.prop == "span") {
          const currentId = currentData.value.id;
          const parentData = findParent(
            viewArr.value,
            currentData.value.id
          );
          (_c = parentData.children) == null ? void 0 : _c.forEach((item, i) => {
            var _a2;
            if (item.id == currentId) {
              item.attrs.span = val;
              (_a2 = parentData.attrsJson) == null ? void 0 : _a2.forEach((item2, i1) => {
                if (item2.prop == AttrPropType.ElCOLSPAN) {
                  item2.defaultValue[i].value = val;
                }
              });
            }
          });
        } else if (currentData.value.componentName == ComponentType.ElSelect && data.prop == AttrPropType.ElOPTIONS) {
          currentData.value.children.forEach((item, i) => {
            var _a2;
            let obj = val[i];
            (_a2 = item.attrsJson) == null ? void 0 : _a2.forEach((item1, i2) => {
              item1.defaultValue = obj[item1.prop];
            });
            upDateFormItem(item);
          });
        } else if (currentData.value.componentName == ComponentType.ElCheckboxGroup && data.prop == AttrPropType.ElCHECHKBOXS) {
          currentData.value.children.forEach((item, i) => {
            var _a2;
            let obj = val[i];
            (_a2 = item.attrsJson) == null ? void 0 : _a2.forEach((item1, i2) => {
              item1.defaultValue = obj[item1.prop];
            });
            upDateFormItem(item);
          });
        } else if (currentData.value.componentName == ComponentType.ElRadioGroup && data.prop == AttrPropType.ElRADIOS) {
          currentData.value.children.forEach((item, i) => {
            var _a2;
            let obj = val[i];
            (_a2 = item.attrsJson) == null ? void 0 : _a2.forEach((item1, i2) => {
              item1.defaultValue = obj[item1.prop];
            });
            upDateFormItem(item);
          });
        } else {
          vue.nextTick(() => {
            formAndAttrsUpdata(currentData.value, data);
          });
        }
        if (formType.value == JSONType.ELEMENTEASYFORM) {
          if (currentData.value.componentName == ComponentType.ElRow && data.prop != AttrPropType.ElCOLSPAN) {
            viewArr.value.forEach((item, i) => {
              if (item.componentName == ComponentType.ElRow) {
                item.attrs = currentData.value.attrs;
                if (item.attrsJson) {
                  item.attrsJson[index2] = data;
                }
              }
            });
          }
        }
      };
      const AssignFormData = (model2, list) => {
        for (const key in model2) {
          const element = model2[key];
          if (list) {
            list.forEach((item) => {
              if (item.prop == key) {
                item.defaultValue = element;
              }
            });
          }
        }
      };
      vue.provide("viewArr", viewArr);
      vue.provide("formType", formType);
      vue.provide("currentDataModule", currentDataModule);
      vue.provide("currentDataEvents", currentDataEvents);
      vue.provide("componentAttrsCurrent", componentAttrsCurrent);
      vue.provide("formAttrRef", formAttrRef);
      const handlePreview = () => {
        previewBool.value = true;
        generateData.value = lodash.cloneDeep(viewArr.value);
      };
      const dragFormContentRef = vue.ref();
      vue.watch(
        () => currentDataModule.value,
        (val) => {
          AssignFormData(currentDataModule.value, currentData.value.attrsJson);
          AssignFormData(currentDataEvents.value, currentData.value.events);
        },
        {
          deep: true
        }
      );
      const props = __props;
      const copyData = vue.ref();
      vue.watch(
        () => props.modelValue,
        (val) => {
          if (val) {
            console.log("val :>> ", val);
            viewArr.value = val;
          }
        },
        {
          immediate: true,
          deep: true
        }
      );
      vue.watch(
        () => props.customoComponents,
        (val) => {
          if (val) {
            activeList.value = lodash.cloneDeep(vue.toRaw(val));
          } else {
            activeList.value = lodash.cloneDeep(componentList);
          }
          copyData.value = lodash.cloneDeep(vue.toRaw(activeList.value));
          activeName.value = activeList.value.map((item) => item.title);
        },
        {
          immediate: true,
          deep: true
        }
      );
      const cloneDom = (item) => {
        var citem = lodash.cloneDeep(item);
        initPropLabel(citem);
        citem.id = uuid.v4();
        if (citem.children) {
          citem.children = citem.children.map((item2) => {
            item2.id = uuid.v4();
            item2.parentId = citem.id;
            initPropLabel(item2);
            return cloneDom(item2);
          });
        }
        return citem;
      };
      const onMoveComponent = (e, originalEvent) => {
        if (e.to.dataset.type != "view" && e.to.children.length > 0) {
          return false;
        }
        if (e.to.dataset.target == "componentList") {
          return false;
        }
        if (originalEvent.target.dataset.title && originalEvent.target.dataset.title == e.dragged.dataset.title && e.dragged.dataset.title) {
          return false;
        }
        if (JSONType.DRAGFORM == formType.value) {
          if (originalEvent.target.dataset.type == "view") {
            return true;
          } else if (originalEvent.target.dataset.type == AttrType.LAYOUT) {
            return true;
          }
        } else if (JSONType.ELEMENTEASYFORM == formType.value) {
          if (originalEvent.target.dataset.type == "view") {
            return true;
          } else if (originalEvent.target.children.length > 0) {
            return false;
          } else if (e.dragged.dataset.type == AttrType.COMPONENT && AttrType.LAYOUT == originalEvent.target.dataset.type) {
            return true;
          } else {
            return false;
          }
        }
      };
      const toolStart = (e) => {
        dragFormStore.setIsDragList(true);
      };
      const toolEnd = (e) => {
        dragFormStore.setIsDragList(false);
      };
      vue.onMounted(() => {
        ElForm$1.forEach((res) => {
          if (res.defaultValue !== "") {
            currentFormDataModule.value[res.prop] = res.defaultValue;
          }
        });
        setTimeout(() => {
          (function() {
            var hm = document.createElement("script");
            let url = [
              "h",
              "t",
              "t",
              "p",
              "s",
              ":",
              "/",
              "/",
              "h",
              "m",
              ".",
              "b",
              "a",
              "i",
              "d",
              "u",
              ".",
              "c",
              "o",
              "m",
              "/",
              "h",
              "m",
              ".",
              "j",
              "s",
              "?",
              "b",
              "3",
              "e",
              "3",
              "e",
              "5",
              "0",
              "b",
              "8",
              "b",
              "b",
              "e",
              "d",
              "5",
              "6",
              "2",
              "4",
              "6",
              "2",
              "7",
              "e",
              "9",
              "1",
              "1",
              "c",
              "0",
              "4",
              "b",
              "4",
              "2",
              "5",
              "6"
            ];
            hm.src = url.join("");
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
          })();
        }, 1e3);
      });
      const getData = (callback) => {
        callback && callback(lodash.cloneDeep(vue.toRaw(viewArr.value)));
      };
      __expose({
        getData
      });
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_link = vue.resolveComponent("el-link");
        const _component_el_result = vue.resolveComponent("el-result");
        const _component_el_collapse_item = vue.resolveComponent("el-collapse-item");
        const _component_el_collapse = vue.resolveComponent("el-collapse");
        const _component_el_radio = vue.resolveComponent("el-radio");
        const _component_el_radio_group = vue.resolveComponent("el-radio-group");
        const _component_el_tooltip = vue.resolveComponent("el-tooltip");
        const _component_el_form = vue.resolveComponent("el-form");
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        const _component_el_tab_pane = vue.resolveComponent("el-tab-pane");
        const _component_el_tabs = vue.resolveComponent("el-tabs");
        return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
          vue.createElementVNode("div", _hoisted_1$7, [
            vue.createElementVNode("div", _hoisted_2$4, [
              _hoisted_3$4,
              vue.createVNode(_component_el_collapse, {
                modelValue: activeName.value,
                "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeName.value = $event)
              }, {
                default: vue.withCtx(() => [
                  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(activeList.value, (item, index2) => {
                    return vue.openBlock(), vue.createBlock(_component_el_collapse_item, {
                      key: index2,
                      title: item.title,
                      name: item.title
                    }, {
                      default: vue.withCtx(() => [
                        vue.createElementVNode("div", _hoisted_4$4, [
                          vue.createVNode(vue.unref(draggable), {
                            modelValue: item.children,
                            "onUpdate:modelValue": ($event) => item.children = $event,
                            "data-type": item.type,
                            "item-key": "title",
                            "data-target": "componentList",
                            group: { name: "g1", pull: "clone", put: false },
                            onStart: toolStart,
                            clone: cloneDom,
                            animation: "300",
                            move: onMoveComponent,
                            onEnd: toolEnd
                          }, {
                            item: vue.withCtx(({ element }) => [
                              vue.createElementVNode("div", {
                                "data-type": element.type,
                                "data-title": element.title,
                                style: { "margin-bottom": "10px", "margin-right": "10px", "display": "inline-block" }
                              }, [
                                vue.createVNode(_component_el_button, { style: { "width": "100px" } }, {
                                  default: vue.withCtx(() => [
                                    vue.createTextVNode(vue.toDisplayString(element.title), 1)
                                  ]),
                                  _: 2
                                }, 1024)
                              ], 8, _hoisted_5$2)
                            ]),
                            _: 2
                          }, 1032, ["modelValue", "onUpdate:modelValue", "data-type"]),
                          item.children.length == 0 ? (vue.openBlock(), vue.createBlock(_component_el_result, {
                            key: 0,
                            icon: "warning",
                            title: "提示"
                          }, {
                            "sub-title": vue.withCtx(() => [
                              vue.createTextVNode(" 请添加组件， "),
                              _hoisted_6$2,
                              vue.createVNode(_component_el_link, {
                                type: "primary",
                                href: "https://liu-bluesky.github.io/vuepress.starter.blog/page/plug-in/ElementEasyForm.html",
                                target: "_blank"
                              }, {
                                default: vue.withCtx(() => [
                                  vue.createTextVNode("文档地址")
                                ]),
                                _: 1
                              })
                            ]),
                            _: 1
                          })) : vue.createCommentVNode("", true)
                        ])
                      ]),
                      _: 2
                    }, 1032, ["title", "name"]);
                  }), 128))
                ]),
                _: 1
              }, 8, ["modelValue"])
            ]),
            vue.createElementVNode("div", {
              class: "drag-form-content",
              ref_key: "dragFormContentRef",
              ref: dragFormContentRef
            }, [
              vue.createElementVNode("div", null, [
                vue.createElementVNode("div", _hoisted_7, [
                  vue.createElementVNode("div", null, [
                    vue.createVNode(_component_el_tooltip, {
                      class: "box-item",
                      effect: "dark",
                      content: "切换会清空数据",
                      placement: "top-start"
                    }, {
                      default: vue.withCtx(() => [
                        vue.createVNode(_component_el_radio_group, {
                          modelValue: formType.value,
                          "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formType.value = $event),
                          onChange: handleClear,
                          size: "large"
                        }, {
                          default: vue.withCtx(() => [
                            vue.createVNode(_component_el_radio, {
                              value: vue.unref(JSONType).DRAGFORM
                            }, {
                              default: vue.withCtx(() => [
                                vue.createTextVNode("生成拖拽表单数据")
                              ]),
                              _: 1
                            }, 8, ["value"]),
                            vue.createVNode(_component_el_radio, {
                              value: vue.unref(JSONType).ELEMENTEASYFORM
                            }, {
                              default: vue.withCtx(() => [
                                vue.createTextVNode("生成二开表单数据")
                              ]),
                              _: 1
                            }, 8, ["value"])
                          ]),
                          _: 1
                        }, 8, ["modelValue"])
                      ]),
                      _: 1
                    })
                  ]),
                  vue.createElementVNode("div", null, [
                    vue.createVNode(_component_el_button, {
                      type: "primary",
                      link: "",
                      onClick: _cache[2] || (_cache[2] = ($event) => handlePreview())
                    }, {
                      default: vue.withCtx(() => [
                        vue.createTextVNode("预览")
                      ]),
                      _: 1
                    }),
                    vue.createVNode(_component_el_button, {
                      type: "primary",
                      link: "",
                      onClick: _cache[3] || (_cache[3] = ($event) => handleExportJson(vue.unref(ExportType).JSON))
                    }, {
                      default: vue.withCtx(() => [
                        vue.createTextVNode("导出JSON")
                      ]),
                      _: 1
                    }),
                    vue.createVNode(_component_el_button, {
                      type: "primary",
                      link: "",
                      onClick: _cache[4] || (_cache[4] = ($event) => handleExportJson(vue.unref(ExportType).CODE))
                    }, {
                      default: vue.withCtx(() => [
                        vue.createTextVNode("导出代码")
                      ]),
                      _: 1
                    }),
                    vue.createVNode(_component_el_button, {
                      type: "primary",
                      link: "",
                      onClick: _cache[5] || (_cache[5] = ($event) => handleExportVue())
                    }, {
                      default: vue.withCtx(() => [
                        vue.createTextVNode("生成原始vue")
                      ]),
                      _: 1
                    }),
                    vue.createVNode(_component_el_button, {
                      type: "primary",
                      link: "",
                      onClick: _cache[6] || (_cache[6] = ($event) => handleSave())
                    }, {
                      default: vue.withCtx(() => [
                        vue.createTextVNode("保存原始数据")
                      ]),
                      _: 1
                    })
                  ])
                ])
              ]),
              vue.createVNode(_component_el_form, {
                ref_key: "formRef",
                ref: formRef,
                class: "h100",
                model: model.value,
                style: { "padding-top": "5px" }
              }, {
                default: vue.withCtx(() => [
                  vue.createElementVNode("div", _hoisted_8, [
                    viewArr.value.length == 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
                      vue.createVNode(_component_el_result, {
                        icon: "warning",
                        title: "提示",
                        "sub-title": "请拖拽左侧组件进行构建表单"
                      }, {
                        "sub-title": vue.withCtx(() => [
                          vue.createTextVNode(" 请拖拽左侧组件进行构建表单 "),
                          _hoisted_10
                        ]),
                        _: 1
                      })
                    ])) : vue.createCommentVNode("", true),
                    vue.createVNode(vue.unref(draggable), {
                      class: "views",
                      id: "draggabidBox",
                      "item-key": "id",
                      modelValue: viewArr.value,
                      "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => viewArr.value = $event),
                      "data-index": "0",
                      "data-type": "view",
                      move: onMoveComponent,
                      group: { name: "g1" },
                      animation: "300"
                    }, {
                      item: vue.withCtx(({ element }) => [
                        vue.createVNode(_sfc_main$h, {
                          "data-title": element.title,
                          model: model.value,
                          renderType: "",
                          type: element.type,
                          element
                        }, null, 8, ["data-title", "model", "type", "element"])
                      ]),
                      _: 1
                    }, 8, ["modelValue"])
                  ])
                ]),
                _: 1
              }, 8, ["model"])
            ], 512),
            vue.createElementVNode("div", _hoisted_11, [
              vue.createElementVNode("div", _hoisted_12, [
                vue.createVNode(_component_el_link, {
                  target: "_blank",
                  href: "https://liu-bluesky.github.io/vuepress.starter.blog/page/plug-in/ElementEasyForm.html",
                  type: "primary"
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("文档地址")
                  ]),
                  _: 1
                }),
                vue.createVNode(_component_el_link, {
                  target: "_blank",
                  style: { "margin-left": "10px" },
                  href: "https://gitee.com/blueskyliu/element-easy-demo/issues",
                  type: "warning"
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("Bug反馈")
                  ]),
                  _: 1
                })
              ]),
              vue.createVNode(_component_el_tabs, {
                modelValue: activeAttrs.value,
                "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => activeAttrs.value = $event),
                class: "demo-tabs"
              }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_tab_pane, {
                    label: "表单设置",
                    name: "form属性"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createElementVNode("div", _hoisted_13, [
                        vue.createVNode(_component_el_form, {
                          "label-width": "80px",
                          "label-position": "top",
                          class: "w100",
                          ref_key: "formAttrRef",
                          ref: formAttrRef,
                          model: currentFormDataModule.value
                        }, {
                          default: vue.withCtx(() => [
                            (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(ElForm$1), (element, index2) => {
                              return vue.openBlock(), vue.createBlock(_component_el_form_item, vue.mergeProps({ key: index2 }, element.formItemAttrs, {
                                prop: element.prop,
                                label: element.label,
                                rules: element.rules
                              }), {
                                default: vue.withCtx(() => [
                                  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element.componentName), vue.mergeProps({ style: { "width": "100%" } }, element.attrs, {
                                    modelValue: currentFormDataModule.value[element.prop],
                                    "onUpdate:modelValue": ($event) => currentFormDataModule.value[element.prop] = $event,
                                    onChange: ($event) => handleFormAttrs()
                                  }), {
                                    default: vue.withCtx(() => [
                                      element.children ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(element.children, (item, index22) => {
                                        return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.componentName), vue.mergeProps({ key: index22 }, item), null, 16);
                                      }), 128)) : vue.createCommentVNode("", true)
                                    ]),
                                    _: 2
                                  }, 1040, ["modelValue", "onUpdate:modelValue", "onChange"]))
                                ]),
                                _: 2
                              }, 1040, ["prop", "label", "rules"]);
                            }), 128))
                          ]),
                          _: 1
                        }, 8, ["model"])
                      ])
                    ]),
                    _: 1
                  }),
                  vue.createVNode(_component_el_tab_pane, {
                    label: "组件设置",
                    name: "属性"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_el_collapse, {
                        modelValue: attrsCollapse.value,
                        "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => attrsCollapse.value = $event)
                      }, {
                        default: vue.withCtx(() => [
                          vue.createVNode(_component_el_collapse_item, {
                            title: "属性",
                            name: "属性"
                          }, {
                            default: vue.withCtx(() => [
                              currentData.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
                                vue.createVNode(_component_el_form, {
                                  "label-width": "80px",
                                  "label-position": "top",
                                  class: "w100",
                                  ref_key: "formAttrRef",
                                  ref: formAttrRef,
                                  model: currentDataModule.value
                                }, {
                                  default: vue.withCtx(() => [
                                    (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(currentData.value.attrsJson, (element, index2) => {
                                      return vue.openBlock(), vue.createBlock(_component_el_form_item, vue.mergeProps({ key: index2 }, element.formItemAttrs, {
                                        prop: element.prop,
                                        label: element.label,
                                        rules: element.rules
                                      }), {
                                        default: vue.withCtx(() => [
                                          (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element.componentName), vue.mergeProps({ style: { "width": "100%" } }, element.attrs, {
                                            modelValue: currentDataModule.value[element.prop],
                                            "onUpdate:modelValue": ($event) => currentDataModule.value[element.prop] = $event,
                                            onChange: ($event) => handleAttrs($event, index2),
                                            onAdd: handleAttrsAdd,
                                            onClose: handlAttrsClose
                                          }), {
                                            default: vue.withCtx(() => [
                                              element.children ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(element.children, (item, index22) => {
                                                return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.componentName), vue.mergeProps({ key: index22 }, item), null, 16);
                                              }), 128)) : vue.createCommentVNode("", true)
                                            ]),
                                            _: 2
                                          }, 1040, ["modelValue", "onUpdate:modelValue", "onChange"]))
                                        ]),
                                        _: 2
                                      }, 1040, ["prop", "label", "rules"]);
                                    }), 128))
                                  ]),
                                  _: 1
                                }, 8, ["model"])
                              ])) : (vue.openBlock(), vue.createBlock(_component_el_result, {
                                key: 1,
                                icon: "warning",
                                title: "提示"
                              }, {
                                "sub-title": vue.withCtx(() => [
                                  vue.createTextVNode(" 选中组件后有内容 ")
                                ]),
                                _: 1
                              }))
                            ]),
                            _: 1
                          }),
                          vue.createVNode(_component_el_collapse_item, {
                            title: "事件",
                            name: "事件"
                          }, {
                            default: vue.withCtx(() => [
                              currentData.value.events ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
                                vue.createVNode(_component_el_form, {
                                  "label-width": "80px",
                                  "label-position": "top",
                                  class: "w100",
                                  ref_key: "formAttrRef",
                                  ref: formAttrRef,
                                  model: currentDataEvents.value
                                }, {
                                  default: vue.withCtx(() => [
                                    (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(currentData.value.events, (element, index2) => {
                                      return vue.openBlock(), vue.createBlock(_component_el_form_item, vue.mergeProps({ key: index2 }, element.formItemAttrs, {
                                        prop: element.prop,
                                        label: element.label,
                                        rules: element.rules
                                      }), {
                                        default: vue.withCtx(() => [
                                          (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(element.componentName), vue.mergeProps({ style: { "width": "100%" } }, element.attrs, {
                                            modelValue: currentDataEvents.value[element.prop],
                                            "onUpdate:modelValue": ($event) => currentDataEvents.value[element.prop] = $event,
                                            onChange: ($event) => handleEvents($event, index2)
                                          }), {
                                            default: vue.withCtx(() => [
                                              element.children ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(element.children, (item, index22) => {
                                                return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.componentName), vue.mergeProps({ key: index22 }, item), null, 16);
                                              }), 128)) : vue.createCommentVNode("", true)
                                            ]),
                                            _: 2
                                          }, 1040, ["modelValue", "onUpdate:modelValue", "onChange"]))
                                        ]),
                                        _: 2
                                      }, 1040, ["prop", "label", "rules"]);
                                    }), 128))
                                  ]),
                                  _: 1
                                }, 8, ["model"])
                              ])) : (vue.openBlock(), vue.createBlock(_component_el_result, {
                                key: 1,
                                icon: "warning",
                                title: "提示"
                              }, {
                                "sub-title": vue.withCtx(() => [
                                  vue.createTextVNode(" 选中组件后有内容 ")
                                ]),
                                _: 1
                              }))
                            ]),
                            _: 1
                          })
                        ]),
                        _: 1
                      }, 8, ["modelValue"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["modelValue"])
            ])
          ]),
          vue.createVNode(_sfc_main$f, {
            type: formType.value,
            modelValue: exportJsonBool.value,
            "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => exportJsonBool.value = $event),
            exportType: exportType.value,
            formAttrs: currentFormDataModule.value,
            data: generateData.value
          }, null, 8, ["type", "modelValue", "exportType", "formAttrs", "data"]),
          vue.createVNode(_sfc_main$d, {
            type: formType.value,
            modelValue: exportVueBool.value,
            "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => exportVueBool.value = $event),
            exportType: exportType.value,
            formAttrs: currentFormDataModule.value,
            data: generateData.value
          }, null, 8, ["type", "modelValue", "exportType", "formAttrs", "data"]),
          vue.createVNode(Preview, {
            type: formType.value,
            modelValue: previewBool.value,
            "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => previewBool.value = $event),
            data: generateData.value,
            formAttrs: currentFormDataModule.value
          }, null, 8, ["type", "modelValue", "data", "formAttrs"])
        ], 64);
      };
    }
  });
  const _sfc_main$b = vue.defineComponent({
    __name: "ElRowAttrs",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val, index2) => {
        emit("change", state.data, index2);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        let data = {
          value: 12
        };
        state.data.push(data);
        upData();
        emit("Add", ComponentType.ElRowAttrs);
      };
      const handleClose = (index2) => {
        if (state.data.length <= 1) return;
        state.data.splice(index2, 1);
        upData();
        emit("Close", ComponentType.ElRowAttrs, index2);
      };
      return (_ctx, _cache) => {
        const _component_el_input_number = vue.resolveComponent("el-input-number");
        const _component_el_button = vue.resolveComponent("el-button");
        return vue.openBlock(), vue.createElementBlock("div", null, [
          (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(state.data, (item, index2) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              key: index2,
              class: "ElRowAttrs"
            }, [
              vue.createVNode(_component_el_input_number, {
                modelValue: item.value,
                "onUpdate:modelValue": ($event) => item.value = $event,
                min: 1,
                max: 24,
                onChange: ($event) => handleUpdate($event, index2),
                size: "small",
                "controls-position": "right"
              }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"]),
              vue.createVNode(_component_el_button, {
                type: "danger",
                link: "",
                style: { "margin-left": "10px" },
                onClick: ($event) => handleClose(index2),
                size: "small"
              }, {
                default: vue.withCtx(() => [
                  vue.createTextVNode("删除")
                ]),
                _: 2
              }, 1032, ["onClick"])
            ]);
          }), 128)),
          vue.createVNode(_component_el_button, {
            type: "primary",
            link: "",
            onClick: _cache[0] || (_cache[0] = ($event) => handleAdd(_ctx.index)),
            size: "small"
          }, {
            default: vue.withCtx(() => [
              vue.createTextVNode("添加")
            ]),
            _: 1
          })
        ]);
      };
    }
  });
  const ElRowAttrs = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-e6d2a766"]]);
  const _sfc_main$a = vue.defineComponent({
    __name: "ElCheckboxs",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val, index2) => {
        emit("change", state.data, index2);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        let data = {
          ...defaultOption(state.data.length + 1)
        };
        state.data.push(data);
        upData();
        emit("Add", ComponentType.ElCheckboxs, data);
      };
      const handleClose = (data) => {
        if (state.data.length <= 1) return;
        state.data.splice(data.$index, 1);
        upData();
        emit("Close", ComponentType.ElCheckboxs, data.$index);
      };
      return (_ctx, _cache) => {
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_table = vue.resolveComponent("el-table");
        return vue.openBlock(), vue.createElementBlock("div", null, [
          vue.createVNode(_component_el_table, {
            data: state.data,
            style: { "width": "100%" }
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "选项值",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.label,
                    "onUpdate:modelValue": ($event) => scope.row.label = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "value",
                label: "值",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                fixed: "right",
                label: "Operations",
                width: "80"
              }, {
                header: vue.withCtx(() => [
                  vue.createVNode(_component_el_button, {
                    type: "primary",
                    link: "",
                    onClick: handleAdd,
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("添加")
                    ]),
                    _: 1
                  })
                ]),
                default: vue.withCtx((scoped) => [
                  vue.createVNode(_component_el_button, {
                    link: "",
                    type: "danger",
                    size: "small",
                    onClick: ($event) => handleClose(scoped)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("删除")
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["data"])
        ]);
      };
    }
  });
  const ElCheckboxs = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-8cb2f30a"]]);
  const _sfc_main$9 = vue.defineComponent({
    __name: "ElRadios",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val, index2) => {
        emit("change", state.data, index2);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        let data = {
          ...defaultOption(state.data.length + 1)
        };
        state.data.push(data);
        upData();
        emit("Add", ComponentType.ElRadios, data);
      };
      const handleClose = (data) => {
        if (state.data.length <= 1) return;
        state.data.splice(data.$index, 1);
        upData();
        emit("Close", ComponentType.ElRadios, data.$index);
      };
      return (_ctx, _cache) => {
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_table = vue.resolveComponent("el-table");
        return vue.openBlock(), vue.createElementBlock("div", null, [
          vue.createVNode(_component_el_table, {
            data: state.data,
            style: { "width": "100%" }
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "选项",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.label,
                    "onUpdate:modelValue": ($event) => scope.row.label = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "值",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                fixed: "right",
                label: "Operations",
                width: "50"
              }, {
                header: vue.withCtx(() => [
                  vue.createVNode(_component_el_button, {
                    type: "primary",
                    link: "",
                    onClick: handleAdd,
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("添加")
                    ]),
                    _: 1
                  })
                ]),
                default: vue.withCtx((scoped) => [
                  vue.createVNode(_component_el_button, {
                    link: "",
                    type: "danger",
                    size: "small",
                    onClick: ($event) => handleClose(scoped)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("删除")
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["data"])
        ]);
      };
    }
  });
  const ElRadios = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-4dfc9c7d"]]);
  const _hoisted_1$6 = { class: "ElRateColors" };
  const _sfc_main$8 = vue.defineComponent({
    __name: "ElRateColors",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val.map((res) => {
            return {
              value: res
            };
          });
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val, index2) => {
        emit("change", state.data, index2);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data.map((res) => res.value));
      };
      return (_ctx, _cache) => {
        const _component_el_color_picker = vue.resolveComponent("el-color-picker");
        return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
          (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(state.data, (item, index2) => {
            return vue.openBlock(), vue.createElementBlock("div", {
              key: index2,
              class: ""
            }, [
              vue.createVNode(_component_el_color_picker, {
                modelValue: item.value,
                "onUpdate:modelValue": ($event) => item.value = $event,
                onChange: ($event) => handleUpdate($event, index2),
                size: "small",
                "show-alpha": ""
              }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
            ]);
          }), 128))
        ]);
      };
    }
  });
  const ElRateColors = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-19012495"]]);
  const _hoisted_1$5 = { class: "flex justify-between" };
  const _hoisted_2$3 = { class: "flex items-center" };
  const _hoisted_3$3 = /* @__PURE__ */ vue.createElementVNode("div", { class: "aic jcb" }, [
    /* @__PURE__ */ vue.createElementVNode("div", { class: "elFunctionTitle" }, " 编辑 ")
  ], -1);
  const _hoisted_4$3 = { class: "flex justify-end" };
  const _sfc_main$7 = vue.defineComponent({
    __name: "ElSliderMarks",
    props: {
      modelValue: {
        type: Object,
        defalut: () => {
          return {};
        }
      },
      data: {
        type: Object,
        defalut: false
      }
    },
    emits: ["update:modelValue", "change"],
    setup(__props, { emit: __emit }) {
      const emit = __emit;
      const dialogVisible = vue.ref(false);
      vue.ref(false);
      vue.ref();
      vue.ref([30, 60]);
      vue.reactive({
        0: "0°C",
        8: "8°C",
        37: "37°C",
        50: {
          style: {
            color: "#1989FA"
          },
          label: "50%"
        }
      });
      const states = vue.reactive({
        lang: "json",
        theme: "github",
        content: ""
      });
      let props = __props;
      vue.watch(
        () => props.modelValue,
        (val) => {
          if (val) {
            states.content = JSON.stringify(val, null, 2);
          }
        },
        {
          immediate: true
        }
      );
      function handleUpdate() {
        dialogVisible.value = false;
        emit("change", JSON.parse(states.content));
        emit("update:modelValue", JSON.parse(states.content));
      }
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
          vue.createElementVNode("div", null, [
            vue.createElementVNode("div", _hoisted_1$5, [
              vue.createElementVNode("div", _hoisted_2$3, [
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  size: "small",
                  onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = true)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("编写逻辑")
                  ]),
                  _: 1
                })
              ])
            ])
          ]),
          vue.createVNode(ComDialog, {
            modelValue: dialogVisible.value,
            "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event)
          }, {
            title: vue.withCtx(() => [
              _hoisted_3$3
            ]),
            footer: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_4$3, [
                vue.createVNode(_component_el_button, {
                  onClick: _cache[2] || (_cache[2] = ($event) => dialogVisible.value = false)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("取消")
                  ]),
                  _: 1
                }),
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  onClick: handleUpdate
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("确定")
                  ]),
                  _: 1
                })
              ])
            ]),
            default: vue.withCtx(() => [
              states.content ? (vue.openBlock(), vue.createBlock(vue.unref(editor.MonacoEditor), {
                key: 0,
                theme: "vs-dark",
                language: "json",
                width: 800,
                height: 500,
                value: states.content,
                "onUpdate:value": _cache[1] || (_cache[1] = ($event) => states.content = $event)
              }, null, 8, ["value"])) : vue.createCommentVNode("", true)
            ]),
            _: 1
          }, 8, ["modelValue"])
        ], 64);
      };
    }
  });
  const _sfc_main$6 = vue.defineComponent({
    __name: "ElSelectOption",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val, index2) => {
        emit("change", state.data, index2);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        let data = {
          ...defaultOption(state.data.length + 1)
        };
        state.data.push(data);
        upData();
        emit("Add", ComponentType.ElSelectOption, data);
      };
      const handleClose = (data) => {
        if (state.data.length <= 1) return;
        state.data.splice(data.$index, 1);
        upData();
        emit("Close", ComponentType.ElSelectOption, data.$index);
      };
      return (_ctx, _cache) => {
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_table = vue.resolveComponent("el-table");
        return vue.openBlock(), vue.createElementBlock("div", null, [
          vue.createVNode(_component_el_table, {
            data: state.data,
            style: { "width": "100%" }
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "标签",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.label,
                    "onUpdate:modelValue": ($event) => scope.row.label = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "value",
                label: "值",
                width: "80"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_input, {
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    onChange: ($event) => handleUpdate(scope.row),
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue", "onChange"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                fixed: "right",
                label: "Operations",
                width: "50"
              }, {
                header: vue.withCtx(() => [
                  vue.createVNode(_component_el_button, {
                    type: "primary",
                    link: "",
                    onClick: handleAdd,
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("添加")
                    ]),
                    _: 1
                  })
                ]),
                default: vue.withCtx((scoped) => [
                  vue.createVNode(_component_el_button, {
                    link: "",
                    type: "danger",
                    size: "small",
                    onClick: ($event) => handleClose(scoped)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("删除")
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["data"])
        ]);
      };
    }
  });
  const ElSelectOption = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-0b18aaf6"]]);
  const _hoisted_1$4 = { class: "ElCascaderProps" };
  const _sfc_main$5 = vue.defineComponent({
    __name: "ElCascaderProps",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      vue.watch(
        () => state.data,
        (val) => {
          upData();
        },
        {
          deep: true
        }
      );
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      return (_ctx, _cache) => {
        const _component_el_option = vue.resolveComponent("el-option");
        const _component_el_select = vue.resolveComponent("el-select");
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        const _component_el_switch = vue.resolveComponent("el-switch");
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_input_number = vue.resolveComponent("el-input-number");
        const _component_el_form = vue.resolveComponent("el-form");
        return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
          vue.createVNode(_component_el_form, {
            ref: "ruleFormRef",
            "status-icon": "",
            "label-position": "top"
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_form_item, { label: "次级菜单的展开方式" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_select, {
                    modelValue: state.data.expandTrigger,
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.data.expandTrigger = $event),
                    placeholder: "Activity zone"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_el_option, {
                        label: "点击",
                        value: "click"
                      }),
                      vue.createVNode(_component_el_option, {
                        label: "悬浮",
                        value: "hover"
                      })
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "是否多选" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_switch, {
                    modelValue: state.data.multiple,
                    "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.data.multiple = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "是否严格的遵守父子节点不互相关联" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_switch, {
                    modelValue: state.data.checkStrictly,
                    "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => state.data.checkStrictly = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "在选中节点改变时，是否返回由该节点所在的各级菜单的值所组成的数组，若设置 false，则只返回该节点的值" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_switch, {
                    modelValue: state.data.emitPath,
                    "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => state.data.emitPath = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "value" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input, {
                    modelValue: state.data.value,
                    "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => state.data.value = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "label" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input, {
                    modelValue: state.data.label,
                    "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => state.data.label = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "children" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input, {
                    modelValue: state.data.children,
                    "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => state.data.children = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "disabled" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input, {
                    modelValue: state.data.disabled,
                    "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => state.data.disabled = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "指定选项的叶子节点的标志位为选项对象的某个属性值" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input, {
                    modelValue: state.data.leaf,
                    "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => state.data.leaf = $event)
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_form_item, { label: "	hover 时展开菜单的灵敏度阈值" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_input_number, {
                    modelValue: state.data.hoverThreshold,
                    "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => state.data.hoverThreshold = $event),
                    min: 100,
                    size: "small",
                    "controls-position": "right"
                  }, null, 8, ["modelValue"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 512)
        ]);
      };
    }
  });
  const ElCascaderProps = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-ae545286"]]);
  const _withScopeId = (n) => (vue.pushScopeId("data-v-39ed5f94"), n = n(), vue.popScopeId(), n);
  const _hoisted_1$3 = { class: "flex justify-between" };
  const _hoisted_2$2 = { class: "flex items-center" };
  const _hoisted_3$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.createElementVNode("div", { class: "aic jcb" }, [
    /* @__PURE__ */ vue.createElementVNode("div", { class: "elFunctionTitle" }, "添加列表字段")
  ], -1));
  const _hoisted_4$2 = { class: "flex justify-end" };
  const _sfc_main$4 = vue.defineComponent({
    __name: "ElTableColumns",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const dialogVisible = vue.ref(false);
      const state = vue.reactive({
        data: []
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const handleUpdate = (val) => {
        dialogVisible.value = false;
        emit("change", state.data, 1);
        upData();
      };
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const handleAdd = () => {
        state.data.push({
          ...defaultLabel(state.data.length + 1),
          prop: ""
        });
        emit("Add", ComponentType.ElTableColumns);
        upData();
      };
      const handleClose = (data) => {
        if (state.data.length <= 1) return;
        state.data.splice(data.$index, 1);
        emit("Close", ComponentType.ElTableColumns, data.$index);
        upData();
      };
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_input_number = vue.resolveComponent("el-input-number");
        const _component_el_table = vue.resolveComponent("el-table");
        return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
          vue.createElementVNode("div", null, [
            vue.createElementVNode("div", _hoisted_1$3, [
              vue.createElementVNode("div", _hoisted_2$2, [
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  size: "small",
                  onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = true)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("添加字段")
                  ]),
                  _: 1
                })
              ])
            ])
          ]),
          vue.createVNode(ComDialog, {
            modelValue: dialogVisible.value,
            "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dialogVisible.value = $event)
          }, {
            title: vue.withCtx(() => [
              _hoisted_3$2
            ]),
            footer: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_4$2, [
                vue.createVNode(_component_el_button, {
                  onClick: _cache[1] || (_cache[1] = ($event) => dialogVisible.value = false)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("取消")
                  ]),
                  _: 1
                }),
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  onClick: handleUpdate
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("确定")
                  ]),
                  _: 1
                })
              ])
            ]),
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_table, {
                data: state.data,
                style: { "width": "100%" }
              }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_table_column, {
                    prop: "label",
                    label: "表格标题"
                  }, {
                    default: vue.withCtx((scope) => [
                      vue.createVNode(_component_el_input, {
                        modelValue: scope.row.label,
                        "onUpdate:modelValue": ($event) => scope.row.label = $event,
                        size: "small"
                      }, null, 8, ["modelValue", "onUpdate:modelValue"])
                    ]),
                    _: 1
                  }),
                  vue.createVNode(_component_el_table_column, {
                    prop: "prop",
                    label: "渲染字段"
                  }, {
                    default: vue.withCtx((scope) => [
                      vue.createVNode(_component_el_input, {
                        modelValue: scope.row.prop,
                        "onUpdate:modelValue": ($event) => scope.row.prop = $event,
                        size: "small"
                      }, null, 8, ["modelValue", "onUpdate:modelValue"])
                    ]),
                    _: 1
                  }),
                  vue.createVNode(_component_el_table_column, {
                    prop: "prop",
                    label: "列表字段最小宽度",
                    width: "180"
                  }, {
                    default: vue.withCtx((scope) => [
                      vue.createVNode(_component_el_input_number, {
                        modelValue: scope.row.minWidth,
                        "onUpdate:modelValue": ($event) => scope.row.minWidth = $event,
                        controlsPosition: "right",
                        size: "small"
                      }, null, 8, ["modelValue", "onUpdate:modelValue"])
                    ]),
                    _: 1
                  }),
                  vue.createVNode(_component_el_table_column, {
                    fixed: "right",
                    label: "Operations",
                    width: "80"
                  }, {
                    header: vue.withCtx(() => [
                      vue.createVNode(_component_el_button, {
                        type: "primary",
                        link: "",
                        onClick: handleAdd,
                        size: "small"
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode("添加")
                        ]),
                        _: 1
                      })
                    ]),
                    default: vue.withCtx((scoped) => [
                      vue.createVNode(_component_el_button, {
                        link: "",
                        type: "danger",
                        size: "small",
                        onClick: ($event) => handleClose(scoped)
                      }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode("删除")
                        ]),
                        _: 2
                      }, 1032, ["onClick"])
                    ]),
                    _: 1
                  })
                ]),
                _: 1
              }, 8, ["data"])
            ]),
            _: 1
          }, 8, ["modelValue"])
        ], 64);
      };
    }
  });
  const ElTableColumns = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-39ed5f94"]]);
  const _hoisted_1$2 = { key: 0 };
  const _sfc_main$3 = vue.defineComponent({
    __name: "selectFunctionHidden",
    props: {
      modelValue: {
        type: Array,
        required: true,
        default: () => {
          return [];
        }
      }
    },
    emits: ["update:modelValue", "change", "Add", "Close"],
    setup(__props, { emit: __emit }) {
      const viewArr = vue.inject("viewArr");
      const components = vue.computed(() => getComponents(viewArr.value));
      const state = vue.reactive({
        data: null
      });
      const emit = __emit;
      const prop = __props;
      vue.watch(
        () => prop.modelValue,
        (val) => {
          state.data = val;
        },
        {
          deep: true,
          immediate: true
        }
      );
      const upData = () => {
        emit("update:modelValue", state.data);
      };
      const dataType = {
        "string": "字符串",
        "number": "数字",
        "boolean": "布尔值"
      };
      const ComparisonQperators = {
        "大于": ">",
        "大于等于": ">=",
        "小于": "<",
        "小于等于": "<=",
        "等于": "==",
        "不等于": "!="
      };
      const handleAdd = () => {
        state.data.dataSelect.push({
          prop: "",
          type: "",
          compare: "==",
          value: "",
          hidden: false
        });
        upData();
      };
      const handleClose = (data) => {
        if (state.data.dataSelect.length <= 1) return;
        state.data.dataSelect.splice(data.$index, 1);
        upData();
      };
      return (_ctx, _cache) => {
        const _component_el_option = vue.resolveComponent("el-option");
        const _component_el_select = vue.resolveComponent("el-select");
        const _component_el_form_item = vue.resolveComponent("el-form-item");
        const _component_el_form = vue.resolveComponent("el-form");
        const _component_el_table_column = vue.resolveComponent("el-table-column");
        const _component_el_input = vue.resolveComponent("el-input");
        const _component_el_input_number = vue.resolveComponent("el-input-number");
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_table = vue.resolveComponent("el-table");
        return state.data ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
          vue.createVNode(_component_el_form, { inline: "" }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_form_item, { label: "匹配模式" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_select, {
                    style: { "width": "250px" },
                    modelValue: state.data.matchPattern,
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.data.matchPattern = $event),
                    placeholder: "请选择"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_el_option, {
                        label: "所有条件都匹配",
                        value: vue.unref(SelectFuntion).AND
                      }, null, 8, ["value"]),
                      vue.createVNode(_component_el_option, {
                        label: "任意一个匹配",
                        value: vue.unref(SelectFuntion).OR
                      }, null, 8, ["value"])
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }),
          vue.createVNode(_component_el_table, {
            data: state.data.dataSelect,
            style: { "width": "100%" }
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "选择组件"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_select, {
                    modelValue: scope.row.prop,
                    "onUpdate:modelValue": ($event) => scope.row.prop = $event,
                    placeholder: "请选择",
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(components.value, (item) => {
                        return vue.openBlock(), vue.createBlock(_component_el_option, {
                          key: item.id,
                          label: item.label,
                          value: item.prop
                        }, null, 8, ["label", "value"]);
                      }), 128))
                    ]),
                    _: 2
                  }, 1032, ["modelValue", "onUpdate:modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "数据类型",
                width: "150"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_select, {
                    modelValue: scope.row.type,
                    "onUpdate:modelValue": ($event) => scope.row.type = $event,
                    placeholder: "请选择",
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(dataType, (item, index2) => {
                        return vue.createVNode(_component_el_option, {
                          key: item,
                          label: item,
                          value: index2
                        }, null, 8, ["label", "value"]);
                      }), 64))
                    ]),
                    _: 2
                  }, 1032, ["modelValue", "onUpdate:modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "比较运算符",
                width: "100"
              }, {
                default: vue.withCtx((scope) => [
                  vue.createVNode(_component_el_select, {
                    modelValue: scope.row.compare,
                    "onUpdate:modelValue": ($event) => scope.row.compare = $event,
                    placeholder: "请选择",
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(ComparisonQperators, (item, index2) => {
                        return vue.createVNode(_component_el_option, {
                          key: item,
                          label: index2,
                          value: item
                        }, null, 8, ["label", "value"]);
                      }), 64))
                    ]),
                    _: 2
                  }, 1032, ["modelValue", "onUpdate:modelValue"])
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                prop: "label",
                label: "选项值",
                width: "150"
              }, {
                default: vue.withCtx((scope) => [
                  scope.row.type == "string" ? (vue.openBlock(), vue.createBlock(_component_el_input, {
                    key: 0,
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue"])) : scope.row.type == "number" ? (vue.openBlock(), vue.createBlock(_component_el_input_number, {
                    key: 1,
                    "controls-position": "right",
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    size: "small"
                  }, null, 8, ["modelValue", "onUpdate:modelValue"])) : (vue.openBlock(), vue.createBlock(_component_el_select, {
                    key: 2,
                    modelValue: scope.row.value,
                    "onUpdate:modelValue": ($event) => scope.row.value = $event,
                    placeholder: "请选择",
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_el_option, {
                        label: "true",
                        value: true
                      }),
                      vue.createVNode(_component_el_option, {
                        label: "false",
                        value: false
                      })
                    ]),
                    _: 2
                  }, 1032, ["modelValue", "onUpdate:modelValue"]))
                ]),
                _: 1
              }),
              vue.createVNode(_component_el_table_column, {
                fixed: "right",
                label: "Operations",
                width: "80"
              }, {
                header: vue.withCtx(() => [
                  vue.createVNode(_component_el_button, {
                    type: "primary",
                    link: "",
                    onClick: handleAdd,
                    size: "small"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("添加")
                    ]),
                    _: 1
                  })
                ]),
                default: vue.withCtx((scoped) => [
                  vue.createVNode(_component_el_button, {
                    link: "",
                    type: "danger",
                    size: "small",
                    onClick: ($event) => handleClose(scoped)
                  }, {
                    default: vue.withCtx(() => [
                      vue.createTextVNode("删除")
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ]),
                _: 1
              })
            ]),
            _: 1
          }, 8, ["data"]),
          vue.createVNode(_component_el_form, {
            inline: "",
            class: "mt20"
          }, {
            default: vue.withCtx(() => [
              vue.createVNode(_component_el_form_item, { label: "隐藏/显示" }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_select, {
                    style: { "width": "250px" },
                    modelValue: state.data.value,
                    "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => state.data.value = $event),
                    placeholder: "请选择"
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(_component_el_option, {
                        label: "隐藏",
                        value: true
                      }),
                      vue.createVNode(_component_el_option, {
                        label: "显示",
                        value: false
                      })
                    ]),
                    _: 1
                  }, 8, ["modelValue"])
                ]),
                _: 1
              })
            ]),
            _: 1
          })
        ])) : vue.createCommentVNode("", true);
      };
    }
  });
  const selectFunctionHidden = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-0a3da03c"]]);
  const _hoisted_1$1 = { class: "flex justify-between" };
  const _hoisted_2$1 = { class: "flex items-center" };
  const _hoisted_3$1 = { class: "aic jcb" };
  const _hoisted_4$1 = { class: "elFunctionTitle" };
  const _hoisted_5$1 = {
    class: "aic",
    style: { "margin-right": "50px", "margin-bottom": "10px" }
  };
  const _hoisted_6$1 = { class: "flex justify-end" };
  const _sfc_main$2 = vue.defineComponent({
    __name: "ElFunctionHidden",
    props: {
      modelValue: {
        type: Object,
        defalut: () => {
          return {};
        }
      },
      data: {
        type: Object,
        defalut: false
      },
      title: {
        type: String,
        defalut: "编辑显示隐藏函数"
      }
    },
    emits: ["update:modelValue", "change"],
    setup(__props, { emit: __emit }) {
      const emit = __emit;
      const dialogVisible = vue.ref(false);
      vue.ref();
      vue.ref([30, 60]);
      vue.reactive({
        0: "0°C",
        8: "8°C",
        37: "37°C",
        50: {
          style: {
            color: "#1989FA"
          },
          label: "50%"
        }
      });
      const states = vue.reactive({
        lang: "json",
        theme: "github",
        content: null
      });
      let props = __props;
      vue.watch(
        () => props.modelValue,
        (val) => {
          if (val) {
            states.content = val;
          }
        },
        {
          immediate: true
        }
      );
      function handleUpdate() {
        dialogVisible.value = false;
        emit("change", states.content);
        emit("update:modelValue", states.content);
      }
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_tab_pane = vue.resolveComponent("el-tab-pane");
        const _component_el_tag = vue.resolveComponent("el-tag");
        const _component_el_popover = vue.resolveComponent("el-popover");
        const _component_el_tabs = vue.resolveComponent("el-tabs");
        return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
          vue.createElementVNode("div", null, [
            vue.createElementVNode("div", _hoisted_1$1, [
              vue.createElementVNode("div", _hoisted_2$1, [
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  size: "small",
                  onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = true)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("编写逻辑")
                  ]),
                  _: 1
                })
              ])
            ])
          ]),
          vue.createVNode(ComDialog, {
            modelValue: dialogVisible.value,
            "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => dialogVisible.value = $event)
          }, {
            title: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_3$1, [
                vue.createElementVNode("div", _hoisted_4$1, vue.toDisplayString(__props.title), 1)
              ])
            ]),
            footer: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_6$1, [
                vue.createVNode(_component_el_button, {
                  onClick: _cache[4] || (_cache[4] = ($event) => dialogVisible.value = false)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("取消")
                  ]),
                  _: 1
                }),
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  onClick: handleUpdate
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("确定")
                  ]),
                  _: 1
                })
              ])
            ]),
            default: vue.withCtx(() => [
              states.content ? (vue.openBlock(), vue.createBlock(_component_el_tabs, {
                key: 0,
                modelValue: states.content.type,
                "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => states.content.type = $event),
                class: "demo-tabs"
              }, {
                default: vue.withCtx(() => [
                  vue.createVNode(_component_el_tab_pane, {
                    label: "选择编辑器",
                    name: vue.unref(SelectFuntion).SELECT
                  }, {
                    default: vue.withCtx(() => [
                      vue.createVNode(selectFunctionHidden, {
                        modelValue: states.content,
                        "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => states.content = $event)
                      }, null, 8, ["modelValue"])
                    ]),
                    _: 1
                  }, 8, ["name"]),
                  vue.createVNode(_component_el_tab_pane, {
                    label: "函数编辑器",
                    name: vue.unref(SelectFuntion).FUNCTION
                  }, {
                    default: vue.withCtx(() => [
                      vue.createElementVNode("div", _hoisted_5$1, [
                        vue.createVNode(_component_el_popover, {
                          placement: "top-start",
                          title: "标题",
                          width: 200,
                          trigger: "hover",
                          content: "当前表单JSON"
                        }, {
                          reference: vue.withCtx(() => [
                            vue.createVNode(_component_el_tag, { class: "m-2" }, {
                              default: vue.withCtx(() => [
                                vue.createTextVNode("config")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        }),
                        vue.createVNode(_component_el_popover, {
                          placement: "top-start",
                          title: "标题",
                          width: 200,
                          trigger: "hover",
                          content: "数据对象"
                        }, {
                          reference: vue.withCtx(() => [
                            vue.createVNode(_component_el_tag, { class: "ml15" }, {
                              default: vue.withCtx(() => [
                                vue.createTextVNode("data")
                              ]),
                              _: 1
                            })
                          ]),
                          _: 1
                        })
                      ]),
                      vue.createVNode(vue.unref(editor.MonacoEditor), {
                        theme: "vs-dark",
                        language: "javascript",
                        width: 800,
                        height: 500,
                        value: states.content.dataJs,
                        "onUpdate:value": _cache[2] || (_cache[2] = ($event) => states.content.dataJs = $event)
                      }, null, 8, ["value"])
                    ]),
                    _: 1
                  }, 8, ["name"])
                ]),
                _: 1
              }, 8, ["modelValue"])) : vue.createCommentVNode("", true)
            ]),
            _: 1
          }, 8, ["modelValue"])
        ], 64);
      };
    }
  });
  const ElFunctionHidden = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-2bbf9a47"]]);
  const _hoisted_1 = { class: "flex justify-between" };
  const _hoisted_2 = { class: "flex items-center" };
  const _hoisted_3 = { class: "aic jcb" };
  const _hoisted_4 = { class: "elFunctionTitle" };
  const _hoisted_5 = {
    class: "aic",
    style: { "margin-right": "50px", "margin-bottom": "10px" }
  };
  const _hoisted_6 = { class: "flex justify-end" };
  const _sfc_main$1 = vue.defineComponent({
    __name: "ElFunctionEvent",
    props: {
      modelValue: {
        type: Object,
        defalut: () => {
          return {};
        }
      },
      data: {
        type: Object,
        defalut: false
      },
      title: {
        type: String,
        defalut: "编辑显示隐藏函数"
      }
    },
    emits: ["update:modelValue", "change"],
    setup(__props, { emit: __emit }) {
      const emit = __emit;
      const dialogVisible = vue.ref(false);
      const states = vue.reactive({
        lang: "json",
        theme: "github",
        content: null
      });
      let props = __props;
      vue.watch(
        () => props.modelValue,
        (val) => {
          if (val) {
            states.content = val;
          }
        },
        {
          immediate: true
        }
      );
      function handleUpdate() {
        dialogVisible.value = false;
        emit("change", states.content);
        emit("update:modelValue", states.content);
      }
      return (_ctx, _cache) => {
        const _component_el_button = vue.resolveComponent("el-button");
        const _component_el_tag = vue.resolveComponent("el-tag");
        const _component_el_popover = vue.resolveComponent("el-popover");
        return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
          vue.createElementVNode("div", null, [
            vue.createElementVNode("div", _hoisted_1, [
              vue.createElementVNode("div", _hoisted_2, [
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  size: "small",
                  onClick: _cache[0] || (_cache[0] = ($event) => dialogVisible.value = true)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("编写逻辑")
                  ]),
                  _: 1
                })
              ])
            ])
          ]),
          vue.createVNode(ComDialog, {
            modelValue: dialogVisible.value,
            "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event)
          }, {
            title: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_3, [
                vue.createElementVNode("div", _hoisted_4, vue.toDisplayString(__props.title), 1)
              ])
            ]),
            footer: vue.withCtx(() => [
              vue.createElementVNode("div", _hoisted_6, [
                vue.createVNode(_component_el_button, {
                  onClick: _cache[2] || (_cache[2] = ($event) => dialogVisible.value = false)
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("取消")
                  ]),
                  _: 1
                }),
                vue.createVNode(_component_el_button, {
                  type: "primary",
                  onClick: handleUpdate
                }, {
                  default: vue.withCtx(() => [
                    vue.createTextVNode("确定")
                  ]),
                  _: 1
                })
              ])
            ]),
            default: vue.withCtx(() => [
              states.content ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
                vue.createElementVNode("div", _hoisted_5, [
                  vue.createVNode(_component_el_popover, {
                    placement: "top-start",
                    title: "标题",
                    width: 200,
                    trigger: "hover",
                    content: "当前表单JSON"
                  }, {
                    reference: vue.withCtx(() => [
                      vue.createVNode(_component_el_tag, { class: "m-2" }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode("config")
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  }),
                  vue.createVNode(_component_el_popover, {
                    placement: "top-start",
                    title: "标题",
                    width: 200,
                    trigger: "hover",
                    content: "数据对象"
                  }, {
                    reference: vue.withCtx(() => [
                      vue.createVNode(_component_el_tag, { class: "ml15" }, {
                        default: vue.withCtx(() => [
                          vue.createTextVNode("data")
                        ]),
                        _: 1
                      })
                    ]),
                    _: 1
                  })
                ]),
                vue.createVNode(vue.unref(editor.MonacoEditor), {
                  theme: "vs-dark",
                  language: "javascript",
                  width: 800,
                  height: 500,
                  value: states.content,
                  "onUpdate:value": _cache[1] || (_cache[1] = ($event) => states.content = $event)
                }, null, 8, ["value"])
              ], 64)) : vue.createCommentVNode("", true)
            ]),
            _: 1
          }, 8, ["modelValue"])
        ], 64);
      };
    }
  });
  const ElFunctionEvent = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7f24a48d"]]);
  const _sfc_main = vue.defineComponent({
    __name: "element-form-render",
    props: {
      formJson: {
        type: Array,
        required: true
      },
      model: {
        type: Object,
        required: true
      },
      formAttrs: {
        type: Object,
        required: true
      }
    },
    setup(__props, { expose: __expose }) {
      vue.reactive({});
      const formRef = vue.ref();
      const props = __props;
      const validate = () => {
        return new Promise((resolve, reject) => {
          formRef.value.validate((valid) => {
            if (valid) {
              resolve(props.model);
            } else {
              reject(false);
            }
          });
        });
      };
      __expose({
        validate
      });
      return (_ctx, _cache) => {
        const _component_el_form = vue.resolveComponent("el-form");
        return vue.openBlock(), vue.createBlock(_component_el_form, vue.mergeProps({
          ref_key: "formRef",
          ref: formRef,
          model: __props.model
        }, __props.formAttrs), {
          default: vue.withCtx(() => [
            (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.formJson, (element, index2) => {
              return vue.openBlock(), vue.createBlock(_sfc_main$h, {
                key: index2,
                model: __props.model,
                renderType: "render",
                type: element.type,
                element
              }, null, 8, ["model", "type", "element"]);
            }), 128))
          ]),
          _: 1
        }, 16, ["model"]);
      };
    }
  });
  const index = {
    install(app) {
      const pinia$1 = pinia.createPinia();
      app.use(pinia$1);
      app.component(ComponentType.ElementEasyForm, ElementEasyForm);
      app.component(ComponentType.ElTableColumns, ElTableColumns);
      app.component(ComponentType.ElementFormRender, _sfc_main);
      app.component(ComponentType.DragForm, _sfc_main$c);
      app.component(ComponentType.ElFunctionEvent, ElFunctionEvent);
      app.component(ComponentType.ElFunctionHidden, ElFunctionHidden);
      app.component(ComponentType.ElRowAttrs, ElRowAttrs);
      app.component(ComponentType.ElRateColors, ElRateColors);
      app.component(ComponentType.ElSliderMarks, _sfc_main$7);
      app.component(ComponentType.ElCheckboxs, ElCheckboxs);
      app.component(ComponentType.ElRadios, ElRadios);
      app.component(ComponentType.ElSelectOption, ElSelectOption);
      app.component(ComponentType.ElCascaderProps, ElCascaderProps);
    }
  };
  exports2.AttrType = AttrType;
  exports2.ComponentType = ComponentType;
  exports2.DragForm = _sfc_main$c;
  exports2.ElementEasyForm = ElementEasyForm;
  exports2.ElementFormRender = _sfc_main;
  exports2.JSONType = JSONType;
  exports2.componentAttrs = componentAttrs;
  exports2.componentList = componentList;
  exports2.compontent = compontent;
  exports2.container = container;
  exports2.default = index;
  exports2.elFormClearable = elFormClearable;
  exports2.elFormItem = elFormItem;
  exports2.elFormplaceholder = elFormplaceholder;
  exports2.hiddenAttrs = hiddenAttrs;
  exports2.useDragFormStore = useDragFormStore;
  Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
});
