1 |
- import{s as x,a as r,f as P,p as g}from"./utils.3d9f83cd.js";import{P as k}from"./index.53518914.js";import{t as v,N as C,w as n,d as V,R as S,y as H,Z as i,aW as s,c as M,E as N,am as T,D as y}from"./index.1c621181.js";const[I]=v("time-picker"),R=C({},x,{minHour:n(0),maxHour:n(23),minMinute:n(0),maxMinute:n(59),minSecond:n(0),maxSecond:n(59),columnsType:{type:Array,default:()=>["hour","minute"]}});var p=V({name:I,props:R,emits:["confirm","cancel","change","update:modelValue"],setup(a,{emit:o,slots:l}){const m=S(a.modelValue),u=H(()=>a.columnsType.map(e=>{const{filter:t,formatter:c}=a;switch(e){case"hour":return r(+a.minHour,+a.maxHour,e,c,t);case"minute":return r(+a.minMinute,+a.maxMinute,e,c,t);case"second":return r(+a.minSecond,+a.maxSecond,e,c,t);default:return[]}}));i(m,e=>{s(e,a.modelValue)||o("update:modelValue",e)}),i(()=>a.modelValue,e=>{e=P(e,u.value),s(e,m.value)||(m.value=e)},{immediate:!0});const d=(...e)=>o("change",...e),f=(...e)=>o("cancel",...e),h=(...e)=>o("confirm",...e);return()=>M(k,N({modelValue:m.value,"onUpdate:modelValue":e=>m.value=e,columns:u.value,onChange:d,onCancel:f,onConfirm:h},T(a,g)),l)}});const K=y(p);export{K as T};
|