"use strict";const e=require("./main-BB7fFseo.cjs"),d=require("./index-YwS-u3iG.cjs"),c={class:"range"},p={class:"text"},v={class:"text"},f=e.defineComponent({__name:"NumRange",props:e.mergeModels({labels:{default:()=>["最少","最多"]},min:{},max:{},label:{},tips:{},wrap:{type:Boolean},custom:{type:Boolean},is_title:{type:Boolean}},{min:{},minModifiers:{},max:{},maxModifiers:{}}),emits:["update:min","update:max"],setup(o){const s=o,a=e.useModel(o,"min"),l=e.useModel(o,"max"),i=e.computed(()=>Math.max(a.value??0,0)),m=()=>{typeof a.value=="number"&&typeof l.value=="number"&&a.value>l.value&&(l.value=a.value)},r=()=>{typeof l.value=="number"&&typeof a.value=="number"&&l.value<a.value&&(a.value=l.value)};return(u,t)=>(e.openBlock(),e.createBlock(d.Row,e.normalizeProps(e.guardReactiveProps(s)),{default:e.withCtx(()=>[e.createBaseVNode("div",c,[e.createBaseVNode("span",p,e.toDisplayString(u.labels[0]),1),e.createVNode(e.unref(e.ElInput),{type:"number",class:"input",min:0,max:l.value,modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=n=>a.value=n),modelModifiers:{number:!0},onBlur:m},null,8,["max","modelValue"]),e.createBaseVNode("span",v,e.toDisplayString(u.labels[1]),1),e.createVNode(e.unref(e.ElInput),{type:"number",class:"input",min:i.value,modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=n=>l.value=n),modelModifiers:{number:!0},onBlur:r},null,8,["min","modelValue"])])]),_:1},16))}}),x=e._export_sfc(f,[["__scopeId","data-v-aa5668ca"]]);exports.NumRangeRow=x;
