import{a5 as h,a6 as j,W as C}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.170379627897325.js";import"./index.170379627897316.js";import"./index.170379627897317.js";import{o as y}from"./comm.1703796278973.js";import{d as M,k as m,m as U,o as B,c as J,a as r,b as c,u,M as p}from"./vue.1703796278973.js";const R=M({__name:"index",props:{value:{type:Object,default:()=>({time:0,unit:"seconds"})}},emits:["cancel","save"],setup(v,{emit:l}){var i;const a=v,d={seconds:"秒",minutes:"分",hours:"小时"},e=m(a.value.time),o=m(((i=a.value)==null?void 0:i.unit)||"seconds");U(()=>a.value,t=>{e.value=(t==null?void 0:t.time)||0,o.value=(t==null?void 0:t.unit)||"seconds"},{immediate:!0,deep:!0});const _=()=>{l("cancel")},f=()=>{u(e)?l("save",{time:e.value,unit:o.value},{name:`${e.value} ${d[o.value]}后，执行后续动作`}):y("请输入时间","error")};return(t,s)=>{const b=h,x=j,k=C;return B(),J(k,{title:"延迟执行",visible:"",width:400,onCancel:_,onOk:f,maskClosable:!1},{default:r(()=>[c(x,{style:{"max-width":"220px"},placeholder:"请输入时间",value:u(e),"onUpdate:value":s[1]||(s[1]=n=>p(e)?e.value=n:null),precision:3,min:.001,max:65535},{addonAfter:r(()=>[c(b,{options:[{label:"秒",value:"seconds"},{label:"分",value:"minutes"},{label:"小时",value:"hours"}],value:u(o),"onUpdate:value":s[0]||(s[0]=n=>p(o)?o.value=n:null)},null,8,["value"])]),_:1},8,["value","min"])]),_:1})}}});export{R as _};
