mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
/*! For license information please see 2469.ee75b478.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["2469"],{81564:function(n,s,a){"use strict";a.r(s);var t=a("80681");let d=["innerHTML"];s.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'<h1>Calendar \u65E5\u5386</h1>\n<div class="van-doc-card"><h3 id="jie-shao" tabindex="-1">\u4ECB\u7ECD</h3>\n<p>\u65E5\u5386\u7EC4\u4EF6\u7528\u4E8E\u9009\u62E9\u65E5\u671F\u6216\u65E5\u671F\u533A\u95F4\u3002</p>\n</div><div class="van-doc-card"><h3 id="yin-ru" tabindex="-1">\u5F15\u5165</h3>\n<p>\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u6765\u5168\u5C40\u6CE8\u518C\u7EC4\u4EF6\uFF0C\u66F4\u591A\u6CE8\u518C\u65B9\u5F0F\u8BF7\u53C2\u8003<a href="#/zh-CN/advanced-usage#zu-jian-zhu-ce" target="_blank">\u7EC4\u4EF6\u6CE8\u518C</a>\u3002</p>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { createApp } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n<span class="hljs-keyword">import</span> { <span class="hljs-title class_">Calendar</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</span>;\n\n<span class="hljs-keyword">const</span> app = <span class="hljs-title function_">createApp</span>();\napp.<span class="hljs-title function_">use</span>(<span class="hljs-title class_">Calendar</span>);\n</code></pre>\n</div><h2 id="dai-ma-yan-shi" tabindex="-1">\u4EE3\u7801\u6F14\u793A</h2>\n<div class="van-doc-card"><h3 id="xuan-ze-dan-ge-ri-qi" tabindex="-1">\u9009\u62E9\u5355\u4E2A\u65E5\u671F</h3>\n<p>\u4E0B\u9762\u6F14\u793A\u4E86\u7ED3\u5408\u5355\u5143\u683C\u6765\u4F7F\u7528\u65E5\u5386\u7EC4\u4EF6\u7684\u7528\u6CD5\uFF0C\u65E5\u671F\u9009\u62E9\u5B8C\u6210\u540E\u4F1A\u89E6\u53D1 <code>confirm</code> \u4E8B\u4EF6\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"\u9009\u62E9\u5355\u4E2A\u65E5\u671F"</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">"date"</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"show = true"</span> /></span>\n<span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">"onConfirm"</span> /></span>\n</code></pre>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n\n<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {\n <span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {\n <span class="hljs-keyword">const</span> date = <span class="hljs-title function_">ref</span>(<span class="hljs-string">''</span>);\n <span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);\n\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">formatDate</span> = (<span class="hljs-params">date</span>) => <span class="hljs-string">`<span class="hljs-subst">${date.getMonth() + <span class="hljs-number">1</span>}</span>/<span class="hljs-subst">${date.getDate()}</span>`</span>;\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">value</span>) => {\n show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;\n date.<span class="hljs-property">value</span> = <span class="hljs-title function_">formatDate</span>(value);\n };\n\n <span class="hljs-keyword">return</span> {\n date,\n show,\n onConfirm,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="xuan-ze-duo-ge-ri-qi" tabindex="-1">\u9009\u62E9\u591A\u4E2A\u65E5\u671F</h3>\n<p>\u8BBE\u7F6E <code>type</code> \u4E3A <code>multiple</code> \u540E\u53EF\u4EE5\u9009\u62E9\u591A\u4E2A\u65E5\u671F\uFF0C\u6B64\u65F6 <code>confirm</code> \u4E8B\u4EF6\u8FD4\u56DE\u7684 date \u4E3A\u6570\u7EC4\u7ED3\u6784\uFF0C\u6570\u7EC4\u5305\u542B\u82E5\u5E72\u4E2A\u9009\u4E2D\u7684\u65E5\u671F\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"\u9009\u62E9\u591A\u4E2A\u65E5\u671F"</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">"text"</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"show = true"</span> /></span>\n<span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"multiple"</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">"onConfirm"</span> /></span>\n</code></pre>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n\n<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {\n <span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {\n <span class="hljs-keyword">const</span> text = <span class="hljs-title function_">ref</span>(<span class="hljs-string">''</span>);\n <span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);\n\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">dates</span>) => {\n show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;\n text.<span class="hljs-property">value</span> = <span class="hljs-string">`\u9009\u62E9\u4E86 <span class="hljs-subst">${dates.length}</span> \u4E2A\u65E5\u671F`</span>;\n };\n\n <span class="hljs-keyword">return</span> {\n text,\n show,\n onConfirm,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="xuan-ze-ri-qi-qu-jian" tabindex="-1">\u9009\u62E9\u65E5\u671F\u533A\u95F4</h3>\n<p>\u8BBE\u7F6E <code>type</code> \u4E3A <code>range</code> \u540E\u53EF\u4EE5\u9009\u62E9\u65E5\u671F\u533A\u95F4\uFF0C\u6B64\u65F6 <code>confirm</code> \u4E8B\u4EF6\u8FD4\u56DE\u7684 date \u4E3A\u6570\u7EC4\u7ED3\u6784\uFF0C\u6570\u7EC4\u7B2C\u4E00\u9879\u4E3A\u5F00\u59CB\u65F6\u95F4\uFF0C\u7B2C\u4E8C\u9879\u4E3A\u7ED3\u675F\u65F6\u95F4\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"\u9009\u62E9\u65E5\u671F\u533A\u95F4"</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">"date"</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"show = true"</span> /></span>\n<span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"range"</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">"onConfirm"</span> /></span>\n</code></pre>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n\n<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {\n <span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {\n <span class="hljs-keyword">const</span> date = <span class="hljs-title function_">ref</span>(<span class="hljs-string">''</span>);\n <span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);\n\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">formatDate</span> = (<span class="hljs-params">date</span>) => <span class="hljs-string">`<span class="hljs-subst">${date.getMonth() + <span class="hljs-number">1</span>}</span>/<span class="hljs-subst">${date.getDate()}</span>`</span>;\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">values</span>) => {\n <span class="hljs-keyword">const</span> [start, end] = values;\n show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;\n date.<span class="hljs-property">value</span> = <span class="hljs-string">`<span class="hljs-subst">${formatDate(start)}</span> - <span class="hljs-subst">${formatDate(end)}</span>`</span>;\n };\n\n <span class="hljs-keyword">return</span> {\n date,\n show,\n onConfirm,\n };\n },\n};\n</code></pre>\n<blockquote>\n<p>Tips: \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u65E5\u671F\u533A\u95F4\u7684\u8D77\u6B62\u65F6\u95F4\u4E0D\u80FD\u4E3A\u540C\u4E00\u5929\uFF0C\u53EF\u4EE5\u901A\u8FC7\u8BBE\u7F6E allow-same-day \u5C5E\u6027\u6765\u5141\u8BB8\u9009\u62E9\u540C\u4E00\u5929\u3002</p>\n</blockquote>\n</div><div class="van-doc-card"><h3 id="kuai-jie-xuan-ze" tabindex="-1">\u5FEB\u6377\u9009\u62E9</h3>\n<p>\u5C06 <code>show-confirm</code> \u8BBE\u7F6E\u4E3A <code>false</code> \u53EF\u4EE5\u9690\u85CF\u786E\u8BA4\u6309\u94AE\uFF0C\u8FD9\u79CD\u60C5\u51B5\u4E0B\u9009\u62E9\u5B8C\u6210\u540E\u4F1A\u7ACB\u5373\u89E6\u53D1 <code>confirm</code> \u4E8B\u4EF6\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">:show-confirm</span>=<span class="hljs-string">"false"</span> /></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-yan-se" tabindex="-1">\u81EA\u5B9A\u4E49\u989C\u8272</h3>\n<p>\u901A\u8FC7 <code>color</code> \u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49\u65E5\u5386\u7684\u989C\u8272\uFF0C\u5BF9\u9009\u4E2D\u65E5\u671F\u548C\u5E95\u90E8\u6309\u94AE\u751F\u6548\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"#ee0a24"</span> /></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-ri-qi-fan-wei" tabindex="-1">\u81EA\u5B9A\u4E49\u65E5\u671F\u8303\u56F4</h3>\n<p>\u901A\u8FC7 <code>min-date</code> \u548C <code>max-date</code> \u5B9A\u4E49\u65E5\u5386\u7684\u8303\u56F4\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">:min-date</span>=<span class="hljs-string">"minDate"</span> <span class="hljs-attr">:max-date</span>=<span class="hljs-string">"maxDate"</span> /></span>\n</code></pre>\n<pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n\n<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {\n <span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {\n <span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);\n\n <span class="hljs-keyword">return</span> {\n show,\n <span class="hljs-attr">minDate</span>: <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(<span class="hljs-number">2010</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>),\n <span class="hljs-attr">maxDate</span>: <span class="hljs-keyword">new</span> <span class="hljs-title class_">Date</span>(<span class="hljs-number">2010</span>, <span class="hljs-number">0</span>, <span class="hljs-number">31</span>),\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-an-niu-wen-zi" tabindex="-1">\u81EA\u5B9A\u4E49\u6309\u94AE\u6587\u5B57</h3>\n<p>\u901A\u8FC7 <code>confirm-text</code> \u8BBE\u7F6E\u6309\u94AE\u6587\u5B57\uFF0C\u901A\u8FC7 <code>confirm-disabled-text</code> \u8BBE\u7F6E\u6309\u94AE\u7981\u7528\u65F6\u7684\u6587\u5B57\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">type</span>=<span class="hljs-string">"range"</span>\n <span class="hljs-attr">confirm-text</span>=<span class="hljs-string">"\u5B8C\u6210"</span>\n <span class="hljs-attr">confirm-disabled-text</span>=<span class="hljs-string">"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4"</span>\n/></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-ri-qi-wen-an" tabindex="-1">\u81EA\u5B9A\u4E49\u65E5\u671F\u6587\u6848</h3>\n<p>\u901A\u8FC7\u4F20\u5165 <code>formatter</code> \u51FD\u6570\u6765\u5BF9\u65E5\u5386\u4E0A\u6BCF\u4E00\u683C\u7684\u5185\u5BB9\u8FDB\u884C\u683C\u5F0F\u5316\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"range"</span> <span class="hljs-attr">:formatter</span>=<span class="hljs-string">"formatter"</span> /></span>\n</code></pre>\n<pre><code class="language-js"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {\n <span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">formatter</span> = (<span class="hljs-params">day</span>) => {\n <span class="hljs-keyword">const</span> month = day.<span class="hljs-property">date</span>.<span class="hljs-title function_">getMonth</span>() + <span class="hljs-number">1</span>;\n <span class="hljs-keyword">const</span> date = day.<span class="hljs-property">date</span>.<span class="hljs-title function_">getDate</span>();\n\n <span class="hljs-keyword">if</span> (month === <span class="hljs-number">5</span>) {\n <span class="hljs-keyword">if</span> (date === <span class="hljs-number">1</span>) {\n day.<span class="hljs-property">topInfo</span> = <span class="hljs-string">'\u52B3\u52A8\u8282'</span>;\n } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (date === <span class="hljs-number">4</span>) {\n day.<span class="hljs-property">topInfo</span> = <span class="hljs-string">'\u9752\u5E74\u8282'</span>;\n } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (date === <span class="hljs-number">11</span>) {\n day.<span class="hljs-property">text</span> = <span class="hljs-string">'\u4ECA\u5929'</span>;\n }\n }\n\n <span class="hljs-keyword">if</span> (day.<span class="hljs-property">type</span> === <span class="hljs-string">'start'</span>) {\n day.<span class="hljs-property">bottomInfo</span> = <span class="hljs-string">'\u5165\u4F4F'</span>;\n } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (day.<span class="hljs-property">type</span> === <span class="hljs-string">'end'</span>) {\n day.<span class="hljs-property">bottomInfo</span> = <span class="hljs-string">'\u79BB\u5E97'</span>;\n }\n\n <span class="hljs-keyword">return</span> day;\n };\n\n <span class="hljs-keyword">return</span> {\n formatter,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-dan-chu-wei-zhi" tabindex="-1">\u81EA\u5B9A\u4E49\u5F39\u51FA\u4F4D\u7F6E</h3>\n<p>\u901A\u8FC7 <code>position</code> \u5C5E\u6027\u81EA\u5B9A\u4E49\u5F39\u51FA\u5C42\u7684\u5F39\u51FA\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A <code>top</code>\u3001<code>left</code>\u3001<code>right</code>\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">:round</span>=<span class="hljs-string">"false"</span> <span class="hljs-attr">position</span>=<span class="hljs-string">"right"</span> /></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="ri-qi-qu-jian-zui-da-fan-wei" tabindex="-1">\u65E5\u671F\u533A\u95F4\u6700\u5927\u8303\u56F4</h3>\n<p>\u9009\u62E9\u65E5\u671F\u533A\u95F4\u65F6\uFF0C\u53EF\u4EE5\u901A\u8FC7 <code>max-range</code> \u5C5E\u6027\u6765\u6307\u5B9A\u6700\u591A\u53EF\u9009\u5929\u6570\uFF0C\u9009\u62E9\u7684\u8303\u56F4\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\uFF0C\u4F1A\u5F39\u51FA\u76F8\u5E94\u7684\u63D0\u793A\u6587\u6848\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"range"</span> <span class="hljs-attr">:max-range</span>=<span class="hljs-string">"3"</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '500px' }"</span> /></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zi-ding-yi-zhou-qi-shi-ri" tabindex="-1">\u81EA\u5B9A\u4E49\u5468\u8D77\u59CB\u65E5</h3>\n<p>\u901A\u8FC7 <code>first-day-of-week</code> \u5C5E\u6027\u8BBE\u7F6E\u4E00\u5468\u4ECE\u54EA\u5929\u5F00\u59CB\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span> <span class="hljs-attr">first-day-of-week</span>=<span class="hljs-string">"1"</span> /></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="ping-pu-zhan-shi" tabindex="-1">\u5E73\u94FA\u5C55\u793A</h3>\n<p>\u5C06 <code>poppable</code> \u8BBE\u7F6E\u4E3A <code>false</code>\uFF0C\u65E5\u5386\u4F1A\u76F4\u63A5\u5C55\u793A\u5728\u9875\u9762\u5185\uFF0C\u800C\u4E0D\u662F\u4EE5\u5F39\u5C42\u7684\u5F62\u5F0F\u51FA\u73B0\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-calendar</span>\n <span class="hljs-attr">title</span>=<span class="hljs-string">"\u65E5\u5386"</span>\n <span class="hljs-attr">:poppable</span>=<span class="hljs-string">"false"</span>\n <span class="hljs-attr">:show-confirm</span>=<span class="hljs-string">"false"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '500px' }"</span>\n/></span>\n</code></pre>\n</div><h2 id="api" tabindex="-1">API</h2>\n<div class="van-doc-card"><h3 id="props" tabindex="-1">Props</h3>\n<table>\n<thead>\n<tr>\n<th>\u53C2\u6570</th>\n<th>\u8BF4\u660E</th>\n<th>\u7C7B\u578B</th>\n<th>\u9ED8\u8BA4\u503C</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>type</td>\n<td>\u9009\u62E9\u7C7B\u578B:<br><code>single</code> \u8868\u793A\u9009\u62E9\u5355\u4E2A\u65E5\u671F\uFF0C<br><code>multiple</code> \u8868\u793A\u9009\u62E9\u591A\u4E2A\u65E5\u671F\uFF0C<br><code>range</code> \u8868\u793A\u9009\u62E9\u65E5\u671F\u533A\u95F4</td>\n<td><em>string</em></td>\n<td><code>single</code></td>\n</tr>\n<tr>\n<td>title</td>\n<td>\u65E5\u5386\u6807\u9898</td>\n<td><em>string</em></td>\n<td><code>\u65E5\u671F\u9009\u62E9</code></td>\n</tr>\n<tr>\n<td>color</td>\n<td>\u4E3B\u9898\u8272\uFF0C\u5BF9\u5E95\u90E8\u6309\u94AE\u548C\u9009\u4E2D\u65E5\u671F\u751F\u6548</td>\n<td><em>string</em></td>\n<td><code>#1989fa</code></td>\n</tr>\n<tr>\n<td>min-date</td>\n<td>\u53EF\u9009\u62E9\u7684\u6700\u5C0F\u65E5\u671F</td>\n<td><em>Date</em></td>\n<td>\u5F53\u524D\u65E5\u671F</td>\n</tr>\n<tr>\n<td>max-date</td>\n<td>\u53EF\u9009\u62E9\u7684\u6700\u5927\u65E5\u671F</td>\n<td><em>Date</em></td>\n<td>\u5F53\u524D\u65E5\u671F\u7684\u516D\u4E2A\u6708\u540E</td>\n</tr>\n<tr>\n<td>default-date</td>\n<td>\u9ED8\u8BA4\u9009\u4E2D\u7684\u65E5\u671F\uFF0C<code>type</code> \u4E3A <code>multiple</code> \u6216 <code>range</code> \u65F6\u4E3A\u6570\u7EC4\uFF0C\u4F20\u5165 <code>null</code> \u8868\u793A\u9ED8\u8BA4\u4E0D\u9009\u62E9</td>\n<td><em>Date | Date[] | null</em></td>\n<td>\u4ECA\u5929</td>\n</tr>\n<tr>\n<td>row-height</td>\n<td>\u65E5\u671F\u884C\u9AD8</td>\n<td><em>number | string</em></td>\n<td><code>64</code></td>\n</tr>\n<tr>\n<td>formatter</td>\n<td>\u65E5\u671F\u683C\u5F0F\u5316\u51FD\u6570</td>\n<td><em>(day: Day) => Day</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>poppable</td>\n<td>\u662F\u5426\u4EE5\u5F39\u5C42\u7684\u5F62\u5F0F\u5C55\u793A\u65E5\u5386</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>lazy-render</td>\n<td>\u662F\u5426\u53EA\u6E32\u67D3\u53EF\u89C6\u533A\u57DF\u7684\u5185\u5BB9</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>show-mark</td>\n<td>\u662F\u5426\u663E\u793A\u6708\u4EFD\u80CC\u666F\u6C34\u5370</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>show-title</td>\n<td>\u662F\u5426\u5C55\u793A\u65E5\u5386\u6807\u9898</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>show-subtitle</td>\n<td>\u662F\u5426\u5C55\u793A\u65E5\u5386\u526F\u6807\u9898\uFF08\u5E74\u6708\uFF09</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>show-confirm</td>\n<td>\u662F\u5426\u5C55\u793A\u786E\u8BA4\u6309\u94AE</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>readonly</td>\n<td>\u662F\u5426\u4E3A\u53EA\u8BFB\u72B6\u6001\uFF0C\u53EA\u8BFB\u72B6\u6001\u4E0B\u4E0D\u80FD\u9009\u62E9\u65E5\u671F</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>confirm-text</td>\n<td>\u786E\u8BA4\u6309\u94AE\u7684\u6587\u5B57</td>\n<td><em>string</em></td>\n<td><code>\u786E\u5B9A</code></td>\n</tr>\n<tr>\n<td>confirm-disabled-text</td>\n<td>\u786E\u8BA4\u6309\u94AE\u5904\u4E8E\u7981\u7528\u72B6\u6001\u65F6\u7684\u6587\u5B57</td>\n<td><em>string</em></td>\n<td><code>\u786E\u5B9A</code></td>\n</tr>\n<tr>\n<td>first-day-of-week</td>\n<td>\u8BBE\u7F6E\u5468\u8D77\u59CB\u65E5</td>\n<td><em>0-6</em></td>\n<td><code>0</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="calendar-poppable-props" tabindex="-1">Calendar Poppable Props</h3>\n<p>\u5F53 Calendar \u7684 <code>poppable</code> \u4E3A <code>true</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p>\n<table>\n<thead>\n<tr>\n<th>\u53C2\u6570</th>\n<th>\u8BF4\u660E</th>\n<th>\u7C7B\u578B</th>\n<th>\u9ED8\u8BA4\u503C</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>v-model:show</td>\n<td>\u662F\u5426\u663E\u793A\u65E5\u5386\u5F39\u7A97</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>position</td>\n<td>\u5F39\u51FA\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A <code>top</code> <code>right</code> <code>left</code></td>\n<td><em>string</em></td>\n<td><code>bottom</code></td>\n</tr>\n<tr>\n<td>round</td>\n<td>\u662F\u5426\u663E\u793A\u5706\u89D2\u5F39\u7A97</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>close-on-popstate</td>\n<td>\u662F\u5426\u5728\u9875\u9762\u56DE\u9000\u65F6\u81EA\u52A8\u5173\u95ED</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>close-on-click-overlay</td>\n<td>\u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95ED</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>safe-area-inset-top</td>\n<td>\u662F\u5426\u5F00\u542F<a href="#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei" target="_blank">\u9876\u90E8\u5B89\u5168\u533A\u9002\u914D</a></td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>safe-area-inset-bottom</td>\n<td>\u662F\u5426\u5F00\u542F<a href="#/zh-CN/advanced-usage#di-bu-an-quan-qu-gua-pei" target="_blank">\u5E95\u90E8\u5B89\u5168\u533A\u9002\u914D</a></td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>teleport</td>\n<td>\u6307\u5B9A\u6302\u8F7D\u7684\u8282\u70B9\uFF0C\u7B49\u540C\u4E8E Teleport \u7EC4\u4EF6\u7684 <a href="https://cn.vuejs.org/api/built-in-components.html#teleport" target="_blank">to \u5C5E\u6027</a></td>\n<td><em>string | Element</em></td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="calendar-range-props" tabindex="-1">Calendar Range Props</h3>\n<p>\u5F53 Calendar \u7684 <code>type</code> \u4E3A <code>range</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p>\n<table>\n<thead>\n<tr>\n<th>\u53C2\u6570</th>\n<th>\u8BF4\u660E</th>\n<th>\u7C7B\u578B</th>\n<th>\u9ED8\u8BA4\u503C</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>max-range</td>\n<td>\u65E5\u671F\u533A\u95F4\u6700\u591A\u53EF\u9009\u5929\u6570</td>\n<td><em>number | string</em></td>\n<td>\u65E0\u9650\u5236</td>\n</tr>\n<tr>\n<td>range-prompt</td>\n<td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848</td>\n<td><em>string</em></td>\n<td><code>\u6700\u591A\u9009\u62E9 xx \u5929</code></td>\n</tr>\n<tr>\n<td>show-range-prompt</td>\n<td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\uFF0C\u662F\u5426\u5C55\u793A\u63D0\u793A\u6587\u6848</td>\n<td><em>boolean</em></td>\n<td><code>true</code></td>\n</tr>\n<tr>\n<td>allow-same-day</td>\n<td>\u662F\u5426\u5141\u8BB8\u65E5\u671F\u8303\u56F4\u7684\u8D77\u6B62\u65F6\u95F4\u4E3A\u540C\u4E00\u5929</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="calendar-multiple-props" tabindex="-1">Calendar Multiple Props</h3>\n<p>\u5F53 Calendar \u7684 <code>type</code> \u4E3A <code>multiple</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p>\n<table>\n<thead>\n<tr>\n<th>\u53C2\u6570</th>\n<th>\u8BF4\u660E</th>\n<th>\u7C7B\u578B</th>\n<th>\u9ED8\u8BA4\u503C</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>max-range</td>\n<td>\u65E5\u671F\u6700\u591A\u53EF\u9009\u5929\u6570</td>\n<td><em>number | string</em></td>\n<td>\u65E0\u9650\u5236</td>\n</tr>\n<tr>\n<td>range-prompt</td>\n<td>\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848</td>\n<td><em>string</em></td>\n<td><code>\u6700\u591A\u9009\u62E9 xx \u5929</code></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="day-shu-ju-jie-gou" tabindex="-1">Day \u6570\u636E\u7ED3\u6784</h3>\n<p>\u65E5\u5386\u4E2D\u7684\u6BCF\u4E2A\u65E5\u671F\u90FD\u5BF9\u5E94\u4E00\u4E2A Day \u5BF9\u8C61\uFF0C\u901A\u8FC7<code>formatter</code>\u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49 Day \u5BF9\u8C61\u7684\u5185\u5BB9</p>\n<table>\n<thead>\n<tr>\n<th>\u952E\u540D</th>\n<th>\u8BF4\u660E</th>\n<th>\u7C7B\u578B</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>date</td>\n<td>\u65E5\u671F\u5BF9\u5E94\u7684 Date \u5BF9\u8C61</td>\n<td><em>Date</em></td>\n</tr>\n<tr>\n<td>type</td>\n<td>\u65E5\u671F\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A <code>selected</code>\u3001<code>start</code>\u3001<code>middle</code>\u3001<code>end</code>\u3001<code>disabled</code></td>\n<td><em>string</em></td>\n</tr>\n<tr>\n<td>text</td>\n<td>\u4E2D\u95F4\u663E\u793A\u7684\u6587\u5B57</td>\n<td><em>string</em></td>\n</tr>\n<tr>\n<td>topInfo</td>\n<td>\u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td>\n<td><em>string</em></td>\n</tr>\n<tr>\n<td>bottomInfo</td>\n<td>\u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td>\n<td><em>string</em></td>\n</tr>\n<tr>\n<td>className</td>\n<td>\u989D\u5916\u7C7B\u540D</td>\n<td><em>string</em></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="events" tabindex="-1">Events</h3>\n<table>\n<thead>\n<tr>\n<th>\u4E8B\u4EF6\u540D</th>\n<th>\u8BF4\u660E</th>\n<th>\u56DE\u8C03\u53C2\u6570</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>select</td>\n<td>\u70B9\u51FB\u5E76\u9009\u4E2D\u4EFB\u610F\u65E5\u671F\u65F6\u89E6\u53D1</td>\n<td><em>value: Date | Date[]</em></td>\n</tr>\n<tr>\n<td>confirm</td>\n<td>\u65E5\u671F\u9009\u62E9\u5B8C\u6210\u540E\u89E6\u53D1\uFF0C\u82E5 <code>show-confirm</code> \u4E3A <code>true</code>\uFF0C\u5219\u70B9\u51FB\u786E\u8BA4\u6309\u94AE\u540E\u89E6\u53D1</td>\n<td><em>value: Date | Date[]</em></td>\n</tr>\n<tr>\n<td>open</td>\n<td>\u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>close</td>\n<td>\u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>opened</td>\n<td>\u6253\u5F00\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>closed</td>\n<td>\u5173\u95ED\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>unselect</td>\n<td>\u5F53\u65E5\u5386\u7EC4\u4EF6\u7684 <code>type</code> \u4E3A <code>multiple</code> \u65F6\uFF0C\u53D6\u6D88\u9009\u4E2D\u65E5\u671F\u65F6\u89E6\u53D1</td>\n<td><em>value: Date</em></td>\n</tr>\n<tr>\n<td>month-show</td>\n<td>\u5F53\u67D0\u4E2A\u6708\u4EFD\u8FDB\u5165\u53EF\u89C6\u533A\u57DF\u65F6\u89E6\u53D1</td>\n<td><em>{ date: Date, title: string }</em></td>\n</tr>\n<tr>\n<td>over-range</td>\n<td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>click-subtitle</td>\n<td>\u70B9\u51FB\u65E5\u5386\u526F\u6807\u9898\u65F6\u89E6\u53D1</td>\n<td><em>event: MouseEvent</em></td>\n</tr>\n<tr>\n<td>click-disabled-date <code>v4.7.0</code></td>\n<td>\u70B9\u51FB\u7981\u7528\u65E5\u671F\u65F6\u89E6\u53D1</td>\n<td><em>value: Date | Date[]</em></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="slots" tabindex="-1">Slots</h3>\n<table>\n<thead>\n<tr>\n<th>\u540D\u79F0</th>\n<th>\u8BF4\u660E</th>\n<th>\u53C2\u6570</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>title</td>\n<td>\u81EA\u5B9A\u4E49\u6807\u9898</td>\n<td>-</td>\n</tr>\n<tr>\n<td>subtitle</td>\n<td>\u81EA\u5B9A\u4E49\u65E5\u5386\u526F\u6807\u9898</td>\n<td><em>{ text: string, date?: Date }</em></td>\n</tr>\n<tr>\n<td>month-title <code>v4.0.9</code></td>\n<td>\u81EA\u5B9A\u4E49\u6BCF\u4E2A\u6708\u4EFD\u7684\u5C0F\u6807\u9898</td>\n<td><em>{ text: string, date: Date }</em></td>\n</tr>\n<tr>\n<td>footer</td>\n<td>\u81EA\u5B9A\u4E49\u5E95\u90E8\u533A\u57DF\u5185\u5BB9</td>\n<td>-</td>\n</tr>\n<tr>\n<td>confirm-text</td>\n<td>\u81EA\u5B9A\u4E49\u786E\u8BA4\u6309\u94AE\u7684\u5185\u5BB9</td>\n<td><em>{ disabled: boolean }</em></td>\n</tr>\n<tr>\n<td>top-info</td>\n<td>\u81EA\u5B9A\u4E49\u65E5\u671F\u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td>\n<td><em>day: Day</em></td>\n</tr>\n<tr>\n<td>bottom-info</td>\n<td>\u81EA\u5B9A\u4E49\u65E5\u671F\u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td>\n<td><em>day: Day</em></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="fang-fa" tabindex="-1">\u65B9\u6CD5</h3>\n<p>\u901A\u8FC7 ref \u53EF\u4EE5\u83B7\u53D6\u5230 Calendar \u5B9E\u4F8B\u5E76\u8C03\u7528\u5B9E\u4F8B\u65B9\u6CD5\uFF0C\u8BE6\u89C1<a href="#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa" target="_blank">\u7EC4\u4EF6\u5B9E\u4F8B\u65B9\u6CD5</a>\u3002</p>\n<table>\n<thead>\n<tr>\n<th>\u65B9\u6CD5\u540D</th>\n<th>\u8BF4\u660E</th>\n<th>\u53C2\u6570</th>\n<th>\u8FD4\u56DE\u503C</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>reset</td>\n<td>\u5C06\u9009\u4E2D\u7684\u65E5\u671F\u91CD\u7F6E\u5230\u6307\u5B9A\u65E5\u671F\uFF0C\u672A\u4F20\u53C2\u65F6\u4F1A\u91CD\u7F6E\u5230\u9ED8\u8BA4\u65E5\u671F</td>\n<td><em>date?: Date | Date[]</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>scrollToDate</td>\n<td>\u6EDA\u52A8\u5230\u67D0\u4E2A\u65E5\u671F</td>\n<td><em>date: Date</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>getSelectedDate</td>\n<td>\u83B7\u53D6\u9009\u4E2D\u7684\u65E5\u671F</td>\n<td>-</td>\n<td><em>Date | Date[] | null</em></td>\n</tr>\n</tbody>\n</table>\n</div><div class="van-doc-card"><h3 id="lei-xing-ding-yi" tabindex="-1">\u7C7B\u578B\u5B9A\u4E49</h3>\n<p>\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A</p>\n<pre><code class="language-ts"><span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> {\n <span class="hljs-title class_">CalendarType</span>,\n <span class="hljs-title class_">CalendarProps</span>,\n <span class="hljs-title class_">CalendarDayItem</span>,\n <span class="hljs-title class_">CalendarDayType</span>,\n <span class="hljs-title class_">CalendarInstance</span>,\n} <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</span>;\n</code></pre>\n<p><code>CalendarInstance</code> \u662F\u7EC4\u4EF6\u5B9E\u4F8B\u7684\u7C7B\u578B\uFF0C\u7528\u6CD5\u5982\u4E0B\uFF1A</p>\n<pre><code class="language-ts"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">'vue'</span>;\n<span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> { <span class="hljs-title class_">CalendarInstance</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</span>;\n\n<span class="hljs-keyword">const</span> calendarRef = ref<<span class="hljs-title class_">CalendarInstance</span>>();\n\ncalendarRef.<span class="hljs-property">value</span>?.<span class="hljs-title function_">reset</span>();\n</code></pre>\n</div><h2 id="zhu-ti-ding-zhi" tabindex="-1">\u4E3B\u9898\u5B9A\u5236</h2>\n<div class="van-doc-card"><h3 id="yang-shi-bian-liang" tabindex="-1">\u6837\u5F0F\u53D8\u91CF</h3>\n<p>\u7EC4\u4EF6\u63D0\u4F9B\u4E86\u4E0B\u5217 CSS \u53D8\u91CF\uFF0C\u53EF\u7528\u4E8E\u81EA\u5B9A\u4E49\u6837\u5F0F\uFF0C\u4F7F\u7528\u65B9\u6CD5\u8BF7\u53C2\u8003 <a href="#/zh-CN/config-provider" target="_blank">ConfigProvider \u7EC4\u4EF6</a>\u3002</p>\n<table>\n<thead>\n<tr>\n<th>\u540D\u79F0</th>\n<th>\u9ED8\u8BA4\u503C</th>\n<th>\u63CF\u8FF0</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>--van-calendar-background</td>\n<td><em>var(--van-background-2)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-popup-height</td>\n<td><em>80%</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-header-shadow</td>\n<td><em>0 2px 10px rgba(125, 126, 128, 0.16)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-header-title-height</td>\n<td><em>44px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-header-title-font-size</td>\n<td><em>var(--van-font-size-lg)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-header-subtitle-font-size</td>\n<td><em>var(--van-font-size-md)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-weekdays-height</td>\n<td><em>30px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-weekdays-font-size</td>\n<td><em>var(--van-font-size-sm)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-month-title-font-size</td>\n<td><em>var(--van-font-size-md)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-month-mark-color</td>\n<td><em>fade(var(--van-gray-2), 80%)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-month-mark-font-size</td>\n<td><em>160px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-day-height</td>\n<td><em>64px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-day-font-size</td>\n<td><em>var(--van-font-size-lg)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-day-margin-bottom</td>\n<td><em>4px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-range-edge-color</td>\n<td><em>var(--van-white)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-range-edge-background</td>\n<td><em>var(--van-primary-color)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-range-middle-color</td>\n<td><em>var(--van-primary-color)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-range-middle-background-opacity</td>\n<td><em>0.1</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-selected-day-size</td>\n<td><em>54px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-selected-day-color</td>\n<td><em>var(--van-white)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-info-font-size</td>\n<td><em>var(--van-font-size-xs)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-info-line-height</td>\n<td><em>var(--van-line-height-xs)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-selected-day-background</td>\n<td><em>var(--van-primary-color)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-day-disabled-color</td>\n<td><em>var(--van-text-color-3)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-confirm-button-height</td>\n<td><em>36px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-calendar-confirm-button-margin</td>\n<td><em>7px 0</em></td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id="chang-jian-wen-ti" tabindex="-1">\u5E38\u89C1\u95EE\u9898</h2>\n<div class="van-doc-card"><h3 id="ru-he-zai-formatter-zhong-shi-yong-yi-bu-fan-hui-de-shu-ju" tabindex="-1">\u5982\u4F55\u5728 formatter \u4E2D\u4F7F\u7528\u5F02\u6B65\u8FD4\u56DE\u7684\u6570\u636E\uFF1F</h3>\n<p>\u5982\u679C\u9700\u8981\u5728 formatter \u4E2D\u4F7F\u7528\u5F02\u6B65\u8FD4\u56DE\u7684\u6570\u636E\uFF0C\u53EF\u4EE5\u4F7F\u7528\u8BA1\u7B97\u5C5E\u6027\u52A8\u6001\u521B\u5EFA formatter \u51FD\u6570\uFF0C\u793A\u4F8B\u5982\u4E0B\uFF1A</p>\n<pre><code class="language-js"><span class="hljs-keyword">const</span> asyncData = <span class="hljs-title function_">ref</span>();\n\n<span class="hljs-keyword">const</span> formatter = <span class="hljs-title function_">computed</span>(<span class="hljs-function">() =></span> {\n <span class="hljs-keyword">if</span> (!asyncData.<span class="hljs-property">value</span>) {\n <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">day</span>) =></span> day;\n }\n <span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">day</span>) =></span> {\n day.<span class="hljs-property">bottomInfo</span> = asyncData.<span class="hljs-property">value</span>;\n <span class="hljs-keyword">return</span> day;\n };\n});\n\n<span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =></span> {\n asyncData.<span class="hljs-property">value</span> = <span class="hljs-string">'\u540E\u7AEF\u6587\u6848'</span>;\n}, <span class="hljs-number">3000</span>);\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zai-ios-xi-tong-shang-chu-shi-hua-zu-jian-shi-bai" tabindex="-1">\u5728 iOS \u7CFB\u7EDF\u4E0A\u521D\u59CB\u5316\u7EC4\u4EF6\u5931\u8D25\uFF1F</h3>\n<p>\u5982\u679C\u4F60\u9047\u5230\u4E86\u5728 iOS \u4E0A\u65E0\u6CD5\u6E32\u67D3\u7EC4\u4EF6\u7684\u95EE\u9898\uFF0C\u8BF7\u786E\u8BA4\u5728\u521B\u5EFA Date \u5BF9\u8C61\u65F6\u6CA1\u6709\u4F7F\u7528<code>new Date(\'2020-01-01\')</code>\u8FD9\u6837\u7684\u5199\u6CD5\uFF0CiOS \u4E0D\u652F\u6301\u4EE5\u4E2D\u5212\u7EBF\u5206\u9694\u7684\u65E5\u671F\u683C\u5F0F\uFF0C\u6B63\u786E\u5199\u6CD5\u662F<code>new Date(\'2020/01/01\')</code>\u3002</p>\n<p>\u5BF9\u6B64\u95EE\u9898\u7684\u8BE6\u7EC6\u89E3\u91CA\uFF1A<a href="https://stackoverflow.com/questions/13363673/javascript-date-is-invalid-on-ios" target="_blank">stackoverflow</a>\u3002</p>\n</div>'},null,8,d))}}}]); |