"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BB7fFseo.cjs"),g=require("./TableSetting-DL3OlRIG.cjs"),c=u=>(e.pushScopeId("data-v-72927d96"),u=u(),e.popScopeId(),u),p={class:"show-count"},V=c(()=>e.createBaseVNode("div",{class:"left"},"默认显示",-1)),_={class:"right"},f={class:"limit-wrapper"},h=c(()=>e.createBaseVNode("div",{class:"limit-title"},"填写限制",-1)),x={class:"limit-content"},N={class:"limit-item"},A={class:"limit-item"},W=e.defineComponent({__name:"DynamicTableSetting",setup(u){const o=e.ref(e.activeWidgetAttrs.value.count),i=e.ref(e.activeWidgetAttrs.value.min),l=e.ref(e.activeWidgetAttrs.value.max),s=e.computed(()=>e.activeWidgetAttrs.value.options.items.find(a=>a.isActive)),r=()=>{const a=+o.value,t=+l.value;if(t&&a>t){e.activeWidgetAttrs.value.count=t,o.value=t;return}a||(o.value=1),e.activeWidgetAttrs.value.count=a||1},v=()=>{const a=+i.value,t=+l.value;a>t&&t?([i.value,l.value]=[l.value,i.value],e.activeWidgetAttrs.value.min=+i.value,e.activeWidgetAttrs.value.max=+l.value):e.activeWidgetAttrs.value.min=a,e.activeWidgetAttrs.value.required=a>0},m=()=>{const a=+l.value,t=+i.value,n=+o.value;if(a<t)[i.value,l.value]=[l.value,i.value],e.activeWidgetAttrs.value.min=+i.value,e.activeWidgetAttrs.value.max=+l.value;else{const d=a<n?n:a;e.activeWidgetAttrs.value.max=d,l.value=d}e.activeWidgetAttrs.value.required=a>0};return(a,t)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dynamic-table-setting",{"hidden-item":!s.value}])},[e.createBaseVNode("div",p,[V,e.createBaseVNode("div",_,[e.createVNode(e.unref(e.ElInput),{type:"number",modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=n=>o.value=n),onChange:r},null,8,["modelValue"]),e.createTextVNode(" 组 ")])]),e.createBaseVNode("div",f,[h,e.createBaseVNode("div",x,[e.createBaseVNode("div",N,[e.createTextVNode(" 最少"),e.createVNode(e.unref(e.ElInput),{type:"number",modelValue:i.value,"onUpdate:modelValue":t[1]||(t[1]=n=>i.value=n),modelModifiers:{number:!0},mix:0,max:l.value,onChange:v},null,8,["modelValue","max"]),e.createTextVNode("组 ")]),e.createBaseVNode("div",A,[e.createTextVNode(" 最多"),e.createVNode(e.unref(e.ElInput),{type:"number",modelValue:l.value,"onUpdate:modelValue":t[2]||(t[2]=n=>l.value=n),modelModifiers:{number:!0},min:i.value,onChange:m},null,8,["modelValue","min"]),e.createTextVNode("组 ")])])]),e.createVNode(g.default)],2)),[[e.vShow,s.value]])}}),b=e._export_sfc(W,[["__scopeId","data-v-72927d96"]]);exports.default=b;
