qmw-form-design
Version:
表单设计器
2 lines (1 loc) • 2.33 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./formDesign-CKi4FcB_.js"),u=["onClick"],g=["onClick"],m={__name:"rowColWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},pWidget:{},pWidgetModifiers:{}}),emits:["update:widgetList","update:pWidget"],setup(d){const o=e.useModel(d,"widgetList"),r=e.useModel(d,"pWidget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(d.style),class:"row-widget"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,style:e.normalizeStyle(i.style),class:e.normalizeClass(["col-widget",e.unref(n).setAreaClass(i)]),onClick:e.withModifiers(t=>{e.unref(n).onClickFormWidget(t,i,o.value)},["stop"])},[e.createVNode(l._sfc_main,{widget:i},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:i,widgetList:o.value,widgetIndex:s,pWidget:r.value},null,8,["widget","widgetList","widgetIndex","pWidget"]),e.createVNode(e.unref(l.lo),{modelValue:i.children,"onUpdate:modelValue":t=>i.children=t,animation:"150",group:"formContainer",onAdd:t=>{e.unref(n).addWidget(t,i.children,i)},onEnd:e.unref(n).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.children,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(c=>{e.unref(n).onClickFormWidget(c,t,i.children)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(l._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:t,widgetList:i.children,widgetIndex:a,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style),pWidget:t},null,8,["widgetList","style","pWidget"]))],10,g))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onAdd","onEnd"])],14,u))),128))],4))}};exports.default=m;