vant/v3/assets/README.zh-CN.b2812dfe.js
2024-04-20 08:49:23 +00:00

163 lines
37 KiB
JavaScript

import{o as a,a as t,y as n}from"./vue-libs.b44bc779.js";const d={class:"van-doc-markdown-body"},e=n(`<h1>Calendar \u65E5\u5386</h1><div class="van-doc-card"><h3 id="jie-shao" tabindex="-1">\u4ECB\u7ECD</h3><p>\u65E5\u5386\u7EC4\u4EF6\u7528\u4E8E\u9009\u62E9\u65E5\u671F\u6216\u65E5\u671F\u533A\u95F4\u3002</p></div><div class="van-doc-card"><h3 id="yin-ru" tabindex="-1">\u5F15\u5165</h3><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><pre><code class="language-js"><span class="hljs-keyword">import</span> { createApp } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<span class="hljs-keyword">import</span> { <span class="hljs-title class_">Calendar</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vant&#39;</span>;
<span class="hljs-keyword">const</span> app = <span class="hljs-title function_">createApp</span>();
app.<span class="hljs-title function_">use</span>(<span class="hljs-title class_">Calendar</span>);
</code></pre></div><h2 id="dai-ma-yan-shi" tabindex="-1">\u4EE3\u7801\u6F14\u793A</h2><div class="van-doc-card"><h3 id="xuan-ze-dan-ge-ri-qi" tabindex="-1">\u9009\u62E9\u5355\u4E2A\u65E5\u671F</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">&quot;\u9009\u62E9\u5355\u4E2A\u65E5\u671F&quot;</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">&quot;date&quot;</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">&quot;show = true&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">&quot;onConfirm&quot;</span> /&gt;</span>
</code></pre><pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> date = <span class="hljs-title function_">ref</span>(<span class="hljs-string">&#39;&#39;</span>);
<span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);
<span class="hljs-keyword">const</span> <span class="hljs-title function_">formatDate</span> = (<span class="hljs-params">date</span>) =&gt; <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>;
<span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">value</span>) =&gt; {
show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;
date.<span class="hljs-property">value</span> = <span class="hljs-title function_">formatDate</span>(value);
};
<span class="hljs-keyword">return</span> {
date,
show,
onConfirm,
};
},
};
</code></pre></div><div class="van-doc-card"><h3 id="xuan-ze-duo-ge-ri-qi" tabindex="-1">\u9009\u62E9\u591A\u4E2A\u65E5\u671F</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">&quot;\u9009\u62E9\u591A\u4E2A\u65E5\u671F&quot;</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">&quot;text&quot;</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">&quot;show = true&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;multiple&quot;</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">&quot;onConfirm&quot;</span> /&gt;</span>
</code></pre><pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> text = <span class="hljs-title function_">ref</span>(<span class="hljs-string">&#39;&#39;</span>);
<span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);
<span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">dates</span>) =&gt; {
show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;
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>;
};
<span class="hljs-keyword">return</span> {
text,
show,
onConfirm,
};
},
};
</code></pre></div><div class="van-doc-card"><h3 id="xuan-ze-ri-qi-qu-jian" tabindex="-1">\u9009\u62E9\u65E5\u671F\u533A\u95F4</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-cell</span> <span class="hljs-attr">title</span>=<span class="hljs-string">&quot;\u9009\u62E9\u65E5\u671F\u533A\u95F4&quot;</span> <span class="hljs-attr">:value</span>=<span class="hljs-string">&quot;date&quot;</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">&quot;show = true&quot;</span> /&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;range&quot;</span> @<span class="hljs-attr">confirm</span>=<span class="hljs-string">&quot;onConfirm&quot;</span> /&gt;</span>
</code></pre><pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> date = <span class="hljs-title function_">ref</span>(<span class="hljs-string">&#39;&#39;</span>);
<span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);
<span class="hljs-keyword">const</span> <span class="hljs-title function_">formatDate</span> = (<span class="hljs-params">date</span>) =&gt; <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>;
<span class="hljs-keyword">const</span> <span class="hljs-title function_">onConfirm</span> = (<span class="hljs-params">values</span>) =&gt; {
<span class="hljs-keyword">const</span> [start, end] = values;
show.<span class="hljs-property">value</span> = <span class="hljs-literal">false</span>;
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>;
};
<span class="hljs-keyword">return</span> {
date,
show,
onConfirm,
};
},
};
</code></pre><blockquote><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></blockquote></div><div class="van-doc-card"><h3 id="kuai-jie-xuan-ze" tabindex="-1">\u5FEB\u6377\u9009\u62E9</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">:show-confirm</span>=<span class="hljs-string">&quot;false&quot;</span> /&gt;</span>
</code></pre></div><div class="van-doc-card"><h3 id="zi-ding-yi-yan-se" tabindex="-1">\u81EA\u5B9A\u4E49\u989C\u8272</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">color</span>=<span class="hljs-string">&quot;#1989fa&quot;</span> /&gt;</span>
</code></pre></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><p>\u901A\u8FC7 <code>min-date</code> \u548C <code>max-date</code> \u5B9A\u4E49\u65E5\u5386\u7684\u8303\u56F4\u3002</p><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">:min-date</span>=<span class="hljs-string">&quot;minDate&quot;</span> <span class="hljs-attr">:max-date</span>=<span class="hljs-string">&quot;maxDate&quot;</span> /&gt;</span>
</code></pre><pre><code class="language-js"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> show = <span class="hljs-title function_">ref</span>(<span class="hljs-literal">false</span>);
<span class="hljs-keyword">return</span> {
show,
<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>),
<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>),
};
},
};
</code></pre></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><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span>
<span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span>
<span class="hljs-attr">type</span>=<span class="hljs-string">&quot;range&quot;</span>
<span class="hljs-attr">confirm-text</span>=<span class="hljs-string">&quot;\u5B8C\u6210&quot;</span>
<span class="hljs-attr">confirm-disabled-text</span>=<span class="hljs-string">&quot;\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4&quot;</span>
/&gt;</span>
</code></pre></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><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;range&quot;</span> <span class="hljs-attr">:formatter</span>=<span class="hljs-string">&quot;formatter&quot;</span> /&gt;</span>
</code></pre><pre><code class="language-js"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
<span class="hljs-title function_">setup</span>(<span class="hljs-params"></span>) {
<span class="hljs-keyword">const</span> <span class="hljs-title function_">formatter</span> = (<span class="hljs-params">day</span>) =&gt; {
<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>;
<span class="hljs-keyword">const</span> date = day.<span class="hljs-property">date</span>.<span class="hljs-title function_">getDate</span>();
<span class="hljs-keyword">if</span> (month === <span class="hljs-number">5</span>) {
<span class="hljs-keyword">if</span> (date === <span class="hljs-number">1</span>) {
day.<span class="hljs-property">topInfo</span> = <span class="hljs-string">&#39;\u52B3\u52A8\u8282&#39;</span>;
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (date === <span class="hljs-number">4</span>) {
day.<span class="hljs-property">topInfo</span> = <span class="hljs-string">&#39;\u9752\u5E74\u8282&#39;</span>;
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (date === <span class="hljs-number">11</span>) {
day.<span class="hljs-property">text</span> = <span class="hljs-string">&#39;\u4ECA\u5929&#39;</span>;
}
}
<span class="hljs-keyword">if</span> (day.<span class="hljs-property">type</span> === <span class="hljs-string">&#39;start&#39;</span>) {
day.<span class="hljs-property">bottomInfo</span> = <span class="hljs-string">&#39;\u5165\u4F4F&#39;</span>;
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (day.<span class="hljs-property">type</span> === <span class="hljs-string">&#39;end&#39;</span>) {
day.<span class="hljs-property">bottomInfo</span> = <span class="hljs-string">&#39;\u79BB\u5E97&#39;</span>;
}
<span class="hljs-keyword">return</span> day;
};
<span class="hljs-keyword">return</span> {
formatter,
};
},
};
</code></pre></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><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">&quot;show&quot;</span> <span class="hljs-attr">:round</span>=<span class="hljs-string">&quot;false&quot;</span> <span class="hljs-attr">position</span>=<span class="hljs-string">&quot;right&quot;</span> /&gt;</span>
</code></pre></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><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">type</span>=<span class="hljs-string">&quot;range&quot;</span> <span class="hljs-attr">:max-range</span>=<span class="hljs-string">&quot;3&quot;</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">&quot;{ height: &#39;500px&#39; }&quot;</span> /&gt;</span>
</code></pre></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><p>\u901A\u8FC7 <code>first-day-of-week</code> \u5C5E\u6027\u8BBE\u7F6E\u4E00\u5468\u4ECE\u54EA\u5929\u5F00\u59CB\u3002</p><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span> <span class="hljs-attr">first-day-of-week</span>=<span class="hljs-string">&quot;1&quot;</span> /&gt;</span>
</code></pre></div><div class="van-doc-card"><h3 id="ping-pu-zhan-shi" tabindex="-1">\u5E73\u94FA\u5C55\u793A</h3><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><pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">van-calendar</span>
<span class="hljs-attr">title</span>=<span class="hljs-string">&quot;\u65E5\u5386&quot;</span>
<span class="hljs-attr">:poppable</span>=<span class="hljs-string">&quot;false&quot;</span>
<span class="hljs-attr">:show-confirm</span>=<span class="hljs-string">&quot;false&quot;</span>
<span class="hljs-attr">:style</span>=<span class="hljs-string">&quot;{ height: &#39;500px&#39; }&quot;</span>
/&gt;</span>
</code></pre></div><h2 id="api" tabindex="-1">API</h2><div class="van-doc-card"><h3 id="props" tabindex="-1">Props</h3><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u9ED8\u8BA4\u503C</th></tr></thead><tbody><tr><td>type</td><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><td><em>string</em></td><td><code>single</code></td></tr><tr><td>title</td><td>\u65E5\u5386\u6807\u9898</td><td><em>string</em></td><td><code>\u65E5\u671F\u9009\u62E9</code></td></tr><tr><td>color</td><td>\u4E3B\u9898\u8272\uFF0C\u5BF9\u5E95\u90E8\u6309\u94AE\u548C\u9009\u4E2D\u65E5\u671F\u751F\u6548</td><td><em>string</em></td><td><code>#ee0a24</code></td></tr><tr><td>min-date</td><td>\u53EF\u9009\u62E9\u7684\u6700\u5C0F\u65E5\u671F</td><td><em>Date</em></td><td>\u5F53\u524D\u65E5\u671F</td></tr><tr><td>max-date</td><td>\u53EF\u9009\u62E9\u7684\u6700\u5927\u65E5\u671F</td><td><em>Date</em></td><td>\u5F53\u524D\u65E5\u671F\u7684\u516D\u4E2A\u6708\u540E</td></tr><tr><td>default-date</td><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><td><em>Date | Date[] | null</em></td><td>\u4ECA\u5929</td></tr><tr><td>row-height</td><td>\u65E5\u671F\u884C\u9AD8</td><td><em>number | string</em></td><td><code>64</code></td></tr><tr><td>formatter</td><td>\u65E5\u671F\u683C\u5F0F\u5316\u51FD\u6570</td><td><em>(day: Day) =&gt; Day</em></td><td>-</td></tr><tr><td>poppable</td><td>\u662F\u5426\u4EE5\u5F39\u5C42\u7684\u5F62\u5F0F\u5C55\u793A\u65E5\u5386</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>lazy-render</td><td>\u662F\u5426\u53EA\u6E32\u67D3\u53EF\u89C6\u533A\u57DF\u7684\u5185\u5BB9</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>show-mark</td><td>\u662F\u5426\u663E\u793A\u6708\u4EFD\u80CC\u666F\u6C34\u5370</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>show-title</td><td>\u662F\u5426\u5C55\u793A\u65E5\u5386\u6807\u9898</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>show-subtitle</td><td>\u662F\u5426\u5C55\u793A\u65E5\u5386\u526F\u6807\u9898\uFF08\u5E74\u6708\uFF09</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>show-confirm</td><td>\u662F\u5426\u5C55\u793A\u786E\u8BA4\u6309\u94AE</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>readonly</td><td>\u662F\u5426\u4E3A\u53EA\u8BFB\u72B6\u6001\uFF0C\u53EA\u8BFB\u72B6\u6001\u4E0B\u4E0D\u80FD\u9009\u62E9\u65E5\u671F</td><td><em>boolean</em></td><td><code>false</code></td></tr><tr><td>confirm-text</td><td>\u786E\u8BA4\u6309\u94AE\u7684\u6587\u5B57</td><td><em>string</em></td><td><code>\u786E\u5B9A</code></td></tr><tr><td>confirm-disabled-text</td><td>\u786E\u8BA4\u6309\u94AE\u5904\u4E8E\u7981\u7528\u72B6\u6001\u65F6\u7684\u6587\u5B57</td><td><em>string</em></td><td><code>\u786E\u5B9A</code></td></tr><tr><td>first-day-of-week</td><td>\u8BBE\u7F6E\u5468\u8D77\u59CB\u65E5</td><td><em>0-6</em></td><td><code>0</code></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="calendar-poppable-props" tabindex="-1">Calendar Poppable Props</h3><p>\u5F53 Calendar \u7684 <code>poppable</code> \u4E3A <code>true</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u9ED8\u8BA4\u503C</th></tr></thead><tbody><tr><td>v-model:show</td><td>\u662F\u5426\u663E\u793A\u65E5\u5386\u5F39\u7A97</td><td><em>boolean</em></td><td><code>false</code></td></tr><tr><td>position</td><td>\u5F39\u51FA\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A <code>top</code> <code>right</code> <code>left</code></td><td><em>string</em></td><td><code>bottom</code></td></tr><tr><td>round</td><td>\u662F\u5426\u663E\u793A\u5706\u89D2\u5F39\u7A97</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>close-on-popstate</td><td>\u662F\u5426\u5728\u9875\u9762\u56DE\u9000\u65F6\u81EA\u52A8\u5173\u95ED</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>close-on-click-overlay</td><td>\u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95ED</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>safe-area-inset-top</td><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><td><em>boolean</em></td><td><code>false</code></td></tr><tr><td>safe-area-inset-bottom</td><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><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>teleport</td><td>\u6307\u5B9A\u6302\u8F7D\u7684\u8282\u70B9\uFF0C\u7B49\u540C\u4E8E Teleport \u7EC4\u4EF6\u7684 <a href="https://v3.cn.vuejs.org/api/built-in-components.html#teleport" target="_blank">to \u5C5E\u6027</a></td><td><em>string | Element</em></td><td>-</td></tr></tbody></table></div><div class="van-doc-card"><h3 id="calendar-range-props" tabindex="-1">Calendar Range Props</h3><p>\u5F53 Calendar \u7684 <code>type</code> \u4E3A <code>range</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u9ED8\u8BA4\u503C</th></tr></thead><tbody><tr><td>max-range</td><td>\u65E5\u671F\u533A\u95F4\u6700\u591A\u53EF\u9009\u5929\u6570</td><td><em>number | string</em></td><td>\u65E0\u9650\u5236</td></tr><tr><td>range-prompt</td><td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848</td><td><em>string</em></td><td><code>\u6700\u591A\u9009\u62E9 xx \u5929</code></td></tr><tr><td>show-range-prompt</td><td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\uFF0C\u662F\u5426\u5C55\u793A\u63D0\u793A\u6587\u6848</td><td><em>boolean</em></td><td><code>true</code></td></tr><tr><td>allow-same-day</td><td>\u662F\u5426\u5141\u8BB8\u65E5\u671F\u8303\u56F4\u7684\u8D77\u6B62\u65F6\u95F4\u4E3A\u540C\u4E00\u5929</td><td><em>boolean</em></td><td><code>false</code></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="calendar-multiple-props" tabindex="-1">Calendar Multiple Props</h3><p>\u5F53 Calendar \u7684 <code>type</code> \u4E3A <code>multiple</code> \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B props:</p><table><thead><tr><th>\u53C2\u6570</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th><th>\u9ED8\u8BA4\u503C</th></tr></thead><tbody><tr><td>max-range</td><td>\u65E5\u671F\u6700\u591A\u53EF\u9009\u5929\u6570</td><td><em>number | string</em></td><td>\u65E0\u9650\u5236</td></tr><tr><td>range-prompt</td><td>\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u7684\u63D0\u793A\u6587\u6848</td><td><em>string</em></td><td><code>\u6700\u591A\u9009\u62E9 xx \u5929</code></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="day-shu-ju-jie-gou" tabindex="-1">Day \u6570\u636E\u7ED3\u6784</h3><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><table><thead><tr><th>\u952E\u540D</th><th>\u8BF4\u660E</th><th>\u7C7B\u578B</th></tr></thead><tbody><tr><td>date</td><td>\u65E5\u671F\u5BF9\u5E94\u7684 Date \u5BF9\u8C61</td><td><em>Date</em></td></tr><tr><td>type</td><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><td><em>string</em></td></tr><tr><td>text</td><td>\u4E2D\u95F4\u663E\u793A\u7684\u6587\u5B57</td><td><em>string</em></td></tr><tr><td>topInfo</td><td>\u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td><td><em>string</em></td></tr><tr><td>bottomInfo</td><td>\u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td><td><em>string</em></td></tr><tr><td>className</td><td>\u989D\u5916\u7C7B\u540D</td><td><em>string</em></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="events" tabindex="-1">Events</h3><table><thead><tr><th>\u4E8B\u4EF6\u540D</th><th>\u8BF4\u660E</th><th>\u56DE\u8C03\u53C2\u6570</th></tr></thead><tbody><tr><td>select</td><td>\u70B9\u51FB\u5E76\u9009\u4E2D\u4EFB\u610F\u65E5\u671F\u65F6\u89E6\u53D1</td><td><em>value: Date | Date[]</em></td></tr><tr><td>confirm</td><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><td><em>value: Date | Date[]</em></td></tr><tr><td>open</td><td>\u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1</td><td>-</td></tr><tr><td>close</td><td>\u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1</td><td>-</td></tr><tr><td>opened</td><td>\u6253\u5F00\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1</td><td>-</td></tr><tr><td>closed</td><td>\u5173\u95ED\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1</td><td>-</td></tr><tr><td>unselect</td><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><td><em>value: Date</em></td></tr><tr><td>month-show</td><td>\u5F53\u67D0\u4E2A\u6708\u4EFD\u8FDB\u5165\u53EF\u89C6\u533A\u57DF\u65F6\u89E6\u53D1</td><td><em>{ date: Date, title: string }</em></td></tr><tr><td>over-range</td><td>\u8303\u56F4\u9009\u62E9\u8D85\u8FC7\u6700\u591A\u53EF\u9009\u5929\u6570\u65F6\u89E6\u53D1</td><td>-</td></tr><tr><td>click-subtitle <code>v3.1.3</code></td><td>\u70B9\u51FB\u65E5\u5386\u526F\u6807\u9898\u65F6\u89E6\u53D1</td><td><em>event: MouseEvent</em></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="slots" tabindex="-1">Slots</h3><table><thead><tr><th>\u540D\u79F0</th><th>\u8BF4\u660E</th><th>\u53C2\u6570</th></tr></thead><tbody><tr><td>title</td><td>\u81EA\u5B9A\u4E49\u6807\u9898</td><td>-</td></tr><tr><td>subtitle <code>v3.1.3</code></td><td>\u81EA\u5B9A\u4E49\u65E5\u5386\u526F\u6807\u9898</td><td>-</td></tr><tr><td>footer</td><td>\u81EA\u5B9A\u4E49\u5E95\u90E8\u533A\u57DF\u5185\u5BB9</td><td>-</td></tr><tr><td>confirm-text <code>v3.2.6</code></td><td>\u81EA\u5B9A\u4E49\u786E\u8BA4\u6309\u94AE\u7684\u5185\u5BB9</td><td><em>{ disabled: boolean }</em></td></tr><tr><td>top-info <code>v3.0.17</code></td><td>\u81EA\u5B9A\u4E49\u65E5\u671F\u4E0A\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td><td><em>day: Day</em></td></tr><tr><td>bottom-info <code>v3.0.17</code></td><td>\u81EA\u5B9A\u4E49\u65E5\u671F\u4E0B\u65B9\u7684\u63D0\u793A\u4FE1\u606F</td><td><em>day: Day</em></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="fang-fa" tabindex="-1">\u65B9\u6CD5</h3><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><table><thead><tr><th>\u65B9\u6CD5\u540D</th><th>\u8BF4\u660E</th><th>\u53C2\u6570</th><th>\u8FD4\u56DE\u503C</th></tr></thead><tbody><tr><td>reset</td><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><td><em>date?: Date | Date[]</em></td><td>-</td></tr><tr><td>scrollToDate</td><td>\u6EDA\u52A8\u5230\u67D0\u4E2A\u65E5\u671F</td><td><em>date: Date</em></td><td>-</td></tr><tr><td>getSelectedDate</td><td>\u83B7\u53D6\u9009\u4E2D\u7684\u65E5\u671F</td><td>-</td><td><em>Date | Date[] | null</em></td></tr></tbody></table></div><div class="van-doc-card"><h3 id="lei-xing-ding-yi" tabindex="-1">\u7C7B\u578B\u5B9A\u4E49</h3><p>\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A</p><pre><code class="language-ts"><span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> {
<span class="hljs-title class_">CalendarType</span>,
<span class="hljs-title class_">CalendarProps</span>,
<span class="hljs-title class_">CalendarDayItem</span>,
<span class="hljs-title class_">CalendarDayType</span>,
<span class="hljs-title class_">CalendarInstance</span>,
} <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vant&#39;</span>;
</code></pre><p><code>CalendarInstance</code> \u662F\u7EC4\u4EF6\u5B9E\u4F8B\u7684\u7C7B\u578B\uFF0C\u7528\u6CD5\u5982\u4E0B\uFF1A</p><pre><code class="language-ts"><span class="hljs-keyword">import</span> { ref } <span class="hljs-keyword">from</span> <span class="hljs-string">&#39;vue&#39;</span>;
<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">&#39;vant&#39;</span>;
<span class="hljs-keyword">const</span> calendarRef = ref&lt;<span class="hljs-title class_">CalendarInstance</span>&gt;();
calendarRef.<span class="hljs-property">value</span>?.<span class="hljs-title function_">reset</span>();
</code></pre></div><h2 id="zhu-ti-ding-zhi" tabindex="-1">\u4E3B\u9898\u5B9A\u5236</h2><div class="van-doc-card"><h3 id="yang-shi-bian-liang" tabindex="-1">\u6837\u5F0F\u53D8\u91CF</h3><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><table><thead><tr><th>\u540D\u79F0</th><th>\u9ED8\u8BA4\u503C</th><th>\u63CF\u8FF0</th></tr></thead><tbody><tr><td>--van-calendar-background-color</td><td><em>var(--van-background-color-light)</em></td><td>-</td></tr><tr><td>--van-calendar-popup-height</td><td><em>80%</em></td><td>-</td></tr><tr><td>--van-calendar-header-box-shadow</td><td><em>0 2px 10px rgba(125, 126, 128, 0.16)</em></td><td>-</td></tr><tr><td>--van-calendar-header-title-height</td><td><em>44px</em></td><td>-</td></tr><tr><td>--van-calendar-header-title-font-size</td><td><em>var(--van-font-size-lg)</em></td><td>-</td></tr><tr><td>--van-calendar-header-subtitle-font-size</td><td><em>var(--van-font-size-md)</em></td><td>-</td></tr><tr><td>--van-calendar-weekdays-height</td><td><em>30px</em></td><td>-</td></tr><tr><td>--van-calendar-weekdays-font-size</td><td><em>var(--van-font-size-sm)</em></td><td>-</td></tr><tr><td>--van-calendar-month-title-font-size</td><td><em>var(--van-font-size-md)</em></td><td>-</td></tr><tr><td>--van-calendar-month-mark-color</td><td><em>fade(var(--van-gray-2), 80%)</em></td><td>-</td></tr><tr><td>--van-calendar-month-mark-font-size</td><td><em>160px</em></td><td>-</td></tr><tr><td>--van-calendar-day-height</td><td><em>64px</em></td><td>-</td></tr><tr><td>--van-calendar-day-font-size</td><td><em>var(--van-font-size-lg)</em></td><td>-</td></tr><tr><td>--van-calendar-day-margin-bottom</td><td><em>4px</em></td><td>-</td></tr><tr><td>--van-calendar-range-edge-color</td><td><em>var(--van-white)</em></td><td>-</td></tr><tr><td>--van-calendar-range-edge-background-color</td><td><em>var(--van-danger-color)</em></td><td>-</td></tr><tr><td>--van-calendar-range-middle-color</td><td><em>var(--van-danger-color)</em></td><td>-</td></tr><tr><td>--van-calendar-range-middle-background-opacity</td><td><em>0.1</em></td><td>-</td></tr><tr><td>--van-calendar-selected-day-size</td><td><em>54px</em></td><td>-</td></tr><tr><td>--van-calendar-selected-day-color</td><td><em>var(--van-white)</em></td><td>-</td></tr><tr><td>--van-calendar-info-font-size</td><td><em>var(--van-font-size-xs)</em></td><td>-</td></tr><tr><td>--van-calendar-info-line-height</td><td><em>var(--van-line-height-xs)</em></td><td>-</td></tr><tr><td>--van-calendar-selected-day-background-color</td><td><em>var(--van-danger-color)</em></td><td>-</td></tr><tr><td>--van-calendar-day-disabled-color</td><td><em>var(--van-text-color-3)</em></td><td>-</td></tr><tr><td>--van-calendar-confirm-button-height</td><td><em>36px</em></td><td>-</td></tr><tr><td>--van-calendar-confirm-button-margin</td><td><em>7px 0</em></td><td>-</td></tr></tbody></table></div><h2 id="chang-jian-wen-ti" tabindex="-1">\u5E38\u89C1\u95EE\u9898</h2><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><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><pre><code class="language-js"><span class="hljs-keyword">const</span> asyncData = <span class="hljs-title function_">ref</span>();
<span class="hljs-keyword">const</span> formatter = <span class="hljs-title function_">computed</span>(<span class="hljs-function">() =&gt;</span> {
<span class="hljs-keyword">if</span> (!asyncData.<span class="hljs-property">value</span>) {
<span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">day</span>) =&gt;</span> day;
}
<span class="hljs-keyword">return</span> <span class="hljs-function">(<span class="hljs-params">day</span>) =&gt;</span> {
day.<span class="hljs-property">bottomInfo</span> = asyncData.<span class="hljs-property">value</span>;
<span class="hljs-keyword">return</span> day;
};
});
<span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> {
asyncData.<span class="hljs-property">value</span> = <span class="hljs-string">&#39;\u540E\u7AEF\u6587\u6848&#39;</span>;
}, <span class="hljs-number">3000</span>);
</code></pre></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><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(&#39;2020-01-01&#39;)</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(&#39;2020/01/01&#39;)</code>\u3002</p><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></div>`,31),l=[e],i={__name:"README.zh-CN",setup(p,{expose:s}){return s({frontmatter:{}}),(o,c)=>(a(),t("div",d,l))}};export{i as default};