import{a as s,e as i,o as c,b as v,g as p,F as a,H as y,l as d,X as V}from"./@vue.e84e1286.js";import{p as _}from"./preview.2bfe2f00.js";import"./bus.f1893518.js";import"./mitt.550594b0.js";/* empty css */import"./index.c8cfbd6c.js";import"./vue-router.54876e93.js";const f={__name:"demo1",setup(u){const o=s("2022-08-30"),r=n=>{console.log(n)};return(n,l)=>{const t=i("m-date-picker");return c(),v(t,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=e=>o.value=e),placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",onOnChange:r},null,8,["modelValue"])}}},k={__name:"demo2",setup(u){const o=s("2022-08-30");return(r,n)=>{const l=i("m-date-picker");return c(),v(l,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=t=>o.value=t),format:"yyyy\u5E74MM\u6708dd\u65E5",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F"},null,8,["modelValue"])}}},g={__name:"demo3",setup(u){const o=s("2022-08-30");return(r,n)=>{const l=i("m-date-picker");return c(),v(l,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=t=>o.value=t),disabled:"",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F"},null,8,["modelValue"])}}};const b={__name:"demo4",setup(u){const o=s([]),r=s([]);return(n,l)=>{const t=i("m-date-picker");return c(),p(y,null,[a(t,{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=e=>o.value=e),type:"daterange",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F"},null,8,["modelValue"]),a(t,{class:"date",modelValue:r.value,"onUpdate:modelValue":l[1]||(l[1]=e=>r.value=e),type:"daterange",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F","unlink-panels":""},null,8,["modelValue"])],64)}}};const x={__name:"demo5",setup(u){const o=s(),r=s([]),n=l=>{console.log(l)};return(l,t)=>{const e=i("m-date-picker");return c(),p(y,null,[a(e,{modelValue:o.value,"onUpdate:modelValue":t[0]||(t[0]=m=>o.value=m),placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",confirm:"",onOnConfirm:n},null,8,["modelValue"]),a(e,{class:"date",modelValue:r.value,"onUpdate:modelValue":t[1]||(t[1]=m=>r.value=m),type:"daterange",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",confirm:""},null,8,["modelValue"])],64)}}};const N={__name:"demo6",setup(u){const o=s(""),r=s([]),n=[{text:"\u4ECA\u5929",value:()=>new Date},{text:"\u6628\u5929",value:()=>{const t=new Date;return t.setTime(t.getTime()-3600*1e3*24),t}},{text:"\u4E00\u5468\u524D",value:()=>{const t=new Date;return t.setTime(t.getTime()-3600*1e3*24*7),t}}],l=[{text:"\u6700\u8FD1\u4E00\u5468",value:()=>{const t=new Date,e=new Date;return e.setTime(e.getTime()-3600*1e3*24*7),[e,t]}},{text:"\u6700\u8FD1\u4E00\u4E2A\u6708",value:()=>{const t=new Date,e=new Date;return e.setTime(e.getTime()-3600*1e3*24*30),[e,t]}},{text:"\u6700\u8FD1\u4E09\u4E2A\u6708",value:()=>{const t=new Date,e=new Date;return e.setTime(e.getTime()-3600*1e3*24*90),[e,t]}}];return(t,e)=>{const m=i("m-date-picker");return c(),p(y,null,[a(m,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=h=>o.value=h),placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",shortcuts:n},null,8,["modelValue"]),a(m,{class:"date",modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=h=>r.value=h),type:"daterange",placeholder:"\u8BF7\u9009\u62E9\u65E5\u671F",shortcuts:l},null,8,["modelValue"])],64)}}},D={class:"markdown-body"},w=d("h1",null,"DatePicker \u65E5\u671F\u9009\u62E9\u5668",-1),T=d("h4",null,"\u7528\u4E8E\u9009\u62E9\u65E5\u671F",-1),U=d("br",null,null,-1),M=d("h2",null,"\u57FA\u7840\u7528\u6CD5",-1),$={class:"source"},C=d("h2",null,"\u65E5\u671F\u683C\u5F0F",-1),B=d("h4",null,"\u8BBE\u7F6E\u5C5E\u6027 format \u53EF\u4EE5\u6539\u53D8\u65E5\u671F\u7684\u663E\u793A\u683C\u5F0F\u3002",-1),P=d("h4",null,"\u6CE8\u610F\uFF0Cformat \u53EA\u662F\u6539\u53D8\u663E\u793A\u7684\u683C\u5F0F\uFF0C\u5E76\u975E\u6539\u53D8 value \u503C\u3002",-1),E={class:"source"},F=d("h2",null,"\u7981\u7528\u72B6\u6001",-1),O=d("h4",null,"\u53EF\u4EE5\u8BBE\u7F6E disabled \u5C5E\u6027\u6765\u5B9E\u73B0\u7981\u7528\u72B6\u6001",-1),A={class:"source"},H=d("h2",null,"\u65E5\u671F\u8303\u56F4",-1),S=d("h4",null,"\u8BBE\u7F6Etype \u4E3A daterange \u53EF\u5F00\u542F\u65E5\u671F\u8303\u56F4\u9009\u62E9",-1),X=d("h4",null,"\u5728\u9009\u62E9\u65E5\u671F\u8303\u56F4\u65F6\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u5DE6\u53F3\u9762\u677F\u4F1A\u8054\u52A8\u3002\u5982\u679C\u5E0C\u671B\u4E24\u4E2A\u9762\u677F\u5404\u81EA\u72EC\u7ACB\u5207\u6362\u5F53\u524D\u6708\u4EFD\uFF0C\u53EF\u4EE5\u4F7F\u7528unlink-panels\u5C5E\u6027\u89E3\u9664\u8054\u52A8\u3002",-1),j={class:"source"},q=d("h2",null,"\u5E26\u6709\u786E\u8BA4\u64CD\u4F5C",-1),z=d("h4",null,"\u8BBE\u7F6E\u5C5E\u6027 confirm\uFF0C\u9009\u62E9\u5668\u4F1A\u6709\u6E05\u7A7A\u548C\u786E\u5B9A\u6309\u94AE\u3002\u786E\u8BA4\u6309\u94AE\u5E76\u6CA1\u6709\u5F71\u54CD\u65E5\u671F\u7684\u6B63\u5E38\u9009\u62E9\u3002",-1),G={class:"source"},I=d("h2",null,"\u5FEB\u6377\u65B9\u5F0F",-1),J=d("h4",null,"\u8BBE\u7F6E\u5C5E\u6027 shortcuts \u53EF\u4EE5\u8BBE\u7F6E\u5FEB\u6377\u9009\u9879\uFF0C\u8BE6\u89C1\u793A\u4F8B\u4EE3\u7801\u3002",-1),K={class:"source"},L=V("

DatePicker Attributes

\u53C2\u6570\u8BF4\u660E\u7C7B\u578B\u53EF\u9009\u503C\u9ED8\u8BA4\u503C
v-model\u7ED1\u5B9A\u503Cstring / array\u2014\u2014
type\u7C7B\u578B\uFF0C\u652F\u6301\u9009\u62E9\u5355\u4E2A\u65E5\u671F\u6216\u8005\u9009\u62E9\u65E5\u671F\u8303\u56F4stringdate / daterange\u2014
placeholder\u9009\u62E9\u65F6\u7684\u5360\u4F4D\u7B26string\u2014\u2014
readonly\u5B8C\u5168\u53EA\u8BFB\uFF0C\u5F00\u542F\u540E\u4E0D\u4F1A\u5F39\u51FA\u9009\u62E9\u5668boolean\u2014false
disabled\u7981\u7528boolean\u2014false
format\u65E5\u671F\u683C\u5F0F\u5316string\u5E74\uFF1Ayyyy\uFF0C\u6708\uFF1AMM\uFF0C\u65E5\uFF1Add\u2018yyyy-MM-dd\u2019
separator\u9009\u62E9\u8303\u56F4\u65F6\u7684\u5206\u9694\u7B26string\u2014\u2018-\u2019
unlink-panels\u5728\u8303\u56F4\u9009\u62E9\u5668\u91CC\u53D6\u6D88\u4E24\u4E2A\u65E5\u671F\u9762\u677F\u4E4B\u95F4\u7684\u8054\u52A8boolean\u2014false
confirm\u662F\u5426\u663E\u793A\u5E95\u90E8\u63A7\u5236\u680Fboolean\u2014false
clearable\u662F\u5426\u663E\u793A\u6E05\u9664\u6309\u94AEboolean\u2014true
shortcuts\u8BBE\u7F6E\u5FEB\u6377\u9009\u9879\uFF0C\u9700\u8981\u4F20\u5165\u6570\u7EC4\u5BF9\u8C61[{ text: string, value: function }]\u2014\u2014

DatePicker Events

\u4E8B\u4EF6\u540D\u8BF4\u660E\u53C2\u6570
on-change\u65E5\u671F\u53D1\u751F\u53D8\u5316\u65F6\u89E6\u53D1\u683C\u5F0F\u5316\u540E\u7684\u65E5\u671F
on-confirm\u70B9\u51FB\u786E\u5B9A\u6309\u94AE\u65F6\u89E6\u53D1\u683C\u5F0F\u5316\u540E\u7684\u65E5\u671F
on-clear\u5728\u6E05\u7A7A\u65E5\u671F\u65F6\u89E6\u53D1\u2014
",6),dt={__name:"doc",setup(u,{expose:o}){return o({frontmatter:{}}),(n,l)=>(c(),p("div",D,[w,T,U,M,d("div",$,[a(f)]),a(_,{compName:"date-picker",demoName:"demo1"}),C,B,P,d("div",E,[a(k)]),a(_,{compName:"date-picker",demoName:"demo2"}),F,O,d("div",A,[a(g)]),a(_,{compName:"date-picker",demoName:"demo3"}),H,S,X,d("div",j,[a(b)]),a(_,{compName:"date-picker",demoName:"demo4"}),q,z,d("div",G,[a(x)]),a(_,{compName:"date-picker",demoName:"demo5"}),I,J,d("div",K,[a(N)]),a(_,{compName:"date-picker",demoName:"demo6"}),L]))}};export{dt as default};