mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
/*! For license information please see 9393.13d4be4f.js.LICENSE.txt */
|
|
(self.webpackChunk=self.webpackChunk||[]).push([["9393"],{47399:function(s,n,a){"use strict";a.r(n);var t=a("80681");let l=["innerHTML"];n.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'<h1>Popup \u5F39\u51FA\u5C42</h1>\n<div class="van-doc-card"><h3 id="jie-shao" tabindex="-1">\u4ECB\u7ECD</h3>\n<p>\u5F39\u51FA\u5C42\u5BB9\u5668\uFF0C\u7528\u4E8E\u5C55\u793A\u5F39\u7A97\u3001\u4FE1\u606F\u63D0\u793A\u7B49\u5185\u5BB9\uFF0C\u652F\u6301\u591A\u4E2A\u5F39\u51FA\u5C42\u53E0\u52A0\u5C55\u793A\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_">Popup</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_">Popup</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="ji-chu-yong-fa" tabindex="-1">\u57FA\u7840\u7528\u6CD5</h3>\n<p>\u901A\u8FC7 <code>v-model:show</code> \u63A7\u5236\u5F39\u51FA\u5C42\u662F\u5426\u5C55\u793A\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">"\u5C55\u793A\u5F39\u51FA\u5C42"</span> <span class="hljs-attr">is-link</span> @<span class="hljs-attr">click</span>=<span class="hljs-string">"showPopup"</span> /></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ padding: '64px' }"</span>></span>\u5185\u5BB9<span class="hljs-tag"></<span class="hljs-name">van-popup</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 <span class="hljs-keyword">const</span> <span class="hljs-title function_">showPopup</span> = (<span class="hljs-params"></span>) => {\n show.<span class="hljs-property">value</span> = <span class="hljs-literal">true</span>;\n };\n <span class="hljs-keyword">return</span> {\n show,\n showPopup,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="dan-chu-wei-zhi" tabindex="-1">\u5F39\u51FA\u4F4D\u7F6E</h3>\n<p>\u901A\u8FC7 <code>position</code> \u5C5E\u6027\u8BBE\u7F6E\u5F39\u7A97\u7684\u5F39\u51FA\u4F4D\u7F6E\uFF0C\u9ED8\u8BA4\u4E3A\u5C45\u4E2D\u5F39\u51FA\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u4E3A <code>top</code>\u3001<code>bottom</code>\u3001<code>left</code>\u3001<code>right</code>\u3002</p>\n<ul>\n<li>\u5F53\u5F39\u7A97\u4ECE\u9876\u90E8\u6216\u5E95\u90E8\u5F39\u51FA\u65F6\uFF0C\u9ED8\u8BA4\u5BBD\u5EA6\u4E0E\u5C4F\u5E55\u5BBD\u5EA6\u4FDD\u6301\u4E00\u81F4\uFF0C\u5F39\u7A97\u9AD8\u5EA6\u53D6\u51B3\u4E8E\u5185\u5BB9\u7684\u9AD8\u5EA6\u3002</li>\n<li>\u5F53\u5F39\u7A97\u4ECE\u5DE6\u4FA7\u6216\u53F3\u4FA7\u5F39\u51FA\u65F6\uFF0C\u9ED8\u8BA4\u4E0D\u8BBE\u7F6E\u5BBD\u5EA6\u548C\u9AD8\u5EA6\uFF0C\u5F39\u7A97\u7684\u5BBD\u9AD8\u53D6\u51B3\u4E8E\u5185\u5BB9\u7684\u5BBD\u9AD8\u3002</li>\n</ul>\n<pre><code class="language-html"><span class="hljs-comment"><!-- \u9876\u90E8\u5F39\u51FA --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showTop"</span> <span class="hljs-attr">position</span>=<span class="hljs-string">"top"</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span> /></span>\n\n<span class="hljs-comment"><!-- \u5E95\u90E8\u5F39\u51FA --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showBottom"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n/></span>\n\n<span class="hljs-comment"><!-- \u5DE6\u4FA7\u5F39\u51FA --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showLeft"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"left"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ width: '30%', height: '100%' }"</span>\n/></span>\n\n<span class="hljs-comment"><!-- \u53F3\u4FA7\u5F39\u51FA --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showRight"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"right"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ width: '30%', height: '100%' }"</span>\n/></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="guan-bi-tu-biao" tabindex="-1">\u5173\u95ED\u56FE\u6807</h3>\n<p>\u8BBE\u7F6E <code>closeable</code> \u5C5E\u6027\u540E\uFF0C\u4F1A\u5728\u5F39\u51FA\u5C42\u7684\u53F3\u4E0A\u89D2\u663E\u793A\u5173\u95ED\u56FE\u6807\uFF0C\u5E76\u4E14\u53EF\u4EE5\u901A\u8FC7 <code>close-icon</code> \u5C5E\u6027\u81EA\u5B9A\u4E49\u56FE\u6807\uFF0C\u4F7F\u7528 <code>close-icon-position</code> \u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49\u56FE\u6807\u4F4D\u7F6E\u3002</p>\n<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">closeable</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n/></span>\n<span class="hljs-comment"><!-- \u81EA\u5B9A\u4E49\u56FE\u6807 --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">closeable</span>\n <span class="hljs-attr">close-icon</span>=<span class="hljs-string">"close"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n/></span>\n<span class="hljs-comment"><!-- \u56FE\u6807\u4F4D\u7F6E --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">closeable</span>\n <span class="hljs-attr">close-icon-position</span>=<span class="hljs-string">"top-left"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n/></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="yuan-jiao-dan-chuang" tabindex="-1">\u5706\u89D2\u5F39\u7A97</h3>\n<p>\u8BBE\u7F6E <code>round</code> \u5C5E\u6027\u540E\uFF0C\u5F39\u7A97\u4F1A\u6839\u636E\u5F39\u51FA\u4F4D\u7F6E\u6DFB\u52A0\u4E0D\u540C\u7684\u5706\u89D2\u6837\u5F0F\u3002</p>\n<pre><code class="language-html"><span class="hljs-comment"><!-- \u5706\u89D2\u5F39\u7A97\uFF08\u5C45\u4E2D\uFF09 --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showCenter"</span> <span class="hljs-attr">round</span> <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ padding: '64px' }"</span> /></span>\n\n<span class="hljs-comment"><!-- \u5706\u89D2\u5F39\u7A97\uFF08\u5E95\u90E8\uFF09 --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"showBottom"</span>\n <span class="hljs-attr">round</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n/></span>\n</code></pre>\n</div><div class="van-doc-card"><h3 id="jian-ting-dian-ji-shi-jian" tabindex="-1">\u76D1\u542C\u70B9\u51FB\u4E8B\u4EF6</h3>\n<p>Popup \u652F\u6301\u4EE5\u4E0B\u70B9\u51FB\u4E8B\u4EF6\uFF1A</p>\n<ul>\n<li><code>click</code>: \u70B9\u51FB\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1\u3002</li>\n<li><code>click-overlay</code>: \u70B9\u51FB\u906E\u7F69\u5C42\u65F6\u89E6\u53D1\u3002</li>\n<li><code>click-close-icon</code>: \u70B9\u51FB\u5173\u95ED\u56FE\u6807\u65F6\u89E6\u53D1\u3002</li>\n</ul>\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">"\u76D1\u542C\u70B9\u51FB\u4E8B\u4EF6"</span> <span class="hljs-attr">is-link</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-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n <span class="hljs-attr">closeable</span>\n @<span class="hljs-attr">click-overlay</span>=<span class="hljs-string">"onClickOverlay"</span>\n @<span class="hljs-attr">click-close-icon</span>=<span class="hljs-string">"onClickCloseIcon"</span>\n/></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<span class="hljs-keyword">import</span> { showToast } <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</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 <span class="hljs-keyword">const</span> <span class="hljs-title function_">onClickOverlay</span> = (<span class="hljs-params"></span>) => {\n <span class="hljs-title function_">showToast</span>(<span class="hljs-string">'click-overlay'</span>);\n };\n <span class="hljs-keyword">const</span> <span class="hljs-title function_">onClickCloseIcon</span> = (<span class="hljs-params"></span>) => {\n <span class="hljs-title function_">showToast</span>(<span class="hljs-string">'click-close-icon'</span>);\n };\n <span class="hljs-keyword">return</span> {\n show,\n onClickOverlay,\n onClickCloseIcon,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="jian-ting-xian-shi-shi-jian" tabindex="-1">\u76D1\u542C\u663E\u793A\u4E8B\u4EF6</h3>\n<p>\u5F53 Popup \u88AB\u6253\u5F00\u6216\u5173\u95ED\u65F6\uFF0C\u4F1A\u89E6\u53D1\u4EE5\u4E0B\u4E8B\u4EF6\uFF1A</p>\n<ul>\n<li><code>open</code>: \u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u7ACB\u5373\u89E6\u53D1\u3002</li>\n<li><code>opened</code>: \u6253\u5F00\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1\u3002</li>\n<li><code>close</code>: \u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u7ACB\u5373\u89E6\u53D1\u3002</li>\n<li><code>closed</code>: \u5173\u95ED\u5F39\u51FA\u5C42\u4E14\u52A8\u753B\u7ED3\u675F\u540E\u89E6\u53D1\u3002</li>\n</ul>\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">"\u76D1\u542C\u663E\u793A\u4E8B\u4EF6"</span> <span class="hljs-attr">is-link</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-popup</span>\n <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span>\n <span class="hljs-attr">position</span>=<span class="hljs-string">"bottom"</span>\n <span class="hljs-attr">:style</span>=<span class="hljs-string">"{ height: '30%' }"</span>\n @<span class="hljs-attr">open</span>=<span class="hljs-string">"showToast('open')"</span>\n @<span class="hljs-attr">opened</span>=<span class="hljs-string">"showToast('opened')"</span>\n @<span class="hljs-attr">close</span>=<span class="hljs-string">"showToast('close')"</span>\n @<span class="hljs-attr">closed</span>=<span class="hljs-string">"showToast('closed')"</span>\n/></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<span class="hljs-keyword">import</span> { showToast } <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</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 <span class="hljs-keyword">return</span> {\n show,\n showToast,\n };\n },\n};\n</code></pre>\n</div><div class="van-doc-card"><h3 id="zhi-ding-gua-zai-wei-zhi" tabindex="-1">\u6307\u5B9A\u6302\u8F7D\u4F4D\u7F6E</h3>\n<p>\u5F39\u51FA\u5C42\u9ED8\u8BA4\u6302\u8F7D\u5230\u7EC4\u4EF6\u6807\u7B7E\u6240\u5728\u4F4D\u7F6E\uFF0C\u53EF\u4EE5\u901A\u8FC7 <code>teleport</code> \u5C5E\u6027\u6307\u5B9A\u6302\u8F7D\u4F4D\u7F6E\u3002</p>\n<pre><code class="language-html"><span class="hljs-comment"><!-- \u6302\u8F7D\u5230 body \u8282\u70B9\u4E0B --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">teleport</span>=<span class="hljs-string">"body"</span> /></span>\n\n<span class="hljs-comment"><!-- \u6302\u8F7D\u5230 #app \u8282\u70B9\u4E0B --></span>\n<span class="hljs-tag"><<span class="hljs-name">van-popup</span> <span class="hljs-attr">v-model:show</span>=<span class="hljs-string">"show"</span> <span class="hljs-attr">teleport</span>=<span class="hljs-string">"#app"</span> /></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>v-model:show</td>\n<td>\u662F\u5426\u663E\u793A\u5F39\u51FA\u5C42</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>overlay</td>\n<td>\u662F\u5426\u663E\u793A\u906E\u7F69\u5C42</td>\n<td><em>boolean</em></td>\n<td><code>true</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>bottom</code> <code>right</code> <code>left</code></td>\n<td><em>string</em></td>\n<td><code>center</code></td>\n</tr>\n<tr>\n<td>overlay-class</td>\n<td>\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u7C7B\u540D</td>\n<td><em>string | Array | object</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>overlay-style</td>\n<td>\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u6837\u5F0F</td>\n<td><em>object</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>duration</td>\n<td>\u52A8\u753B\u65F6\u957F\uFF0C\u5355\u4F4D\u79D2\uFF0C\u8BBE\u7F6E\u4E3A 0 \u53EF\u4EE5\u7981\u7528\u52A8\u753B</td>\n<td><em>number | string</em></td>\n<td><code>0.3</code></td>\n</tr>\n<tr>\n<td>z-index</td>\n<td>\u5C06\u5F39\u7A97\u7684 z-index \u5C42\u7EA7\u8BBE\u7F6E\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u503C</td>\n<td><em>number | string</em></td>\n<td><code>2000+</code></td>\n</tr>\n<tr>\n<td>round</td>\n<td>\u662F\u5426\u663E\u793A\u5706\u89D2</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>lock-scroll</td>\n<td>\u662F\u5426\u9501\u5B9A\u80CC\u666F\u6EDA\u52A8</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\u5728\u663E\u793A\u5F39\u5C42\u65F6\u624D\u6E32\u67D3\u8282\u70B9</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>false</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>closeable</td>\n<td>\u662F\u5426\u663E\u793A\u5173\u95ED\u56FE\u6807</td>\n<td><em>boolean</em></td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>close-icon</td>\n<td>\u5173\u95ED\u56FE\u6807\u540D\u79F0\u6216\u56FE\u7247\u94FE\u63A5\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 <a href="#/zh-CN/icon#props" target="_blank">name \u5C5E\u6027</a></td>\n<td><em>string</em></td>\n<td><code>cross</code></td>\n</tr>\n<tr>\n<td>close-icon-position</td>\n<td>\u5173\u95ED\u56FE\u6807\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A <code>top-left</code><br><code>bottom-left</code> <code>bottom-right</code></td>\n<td><em>string</em></td>\n<td><code>top-right</code></td>\n</tr>\n<tr>\n<td>before-close</td>\n<td>\u5173\u95ED\u524D\u7684\u56DE\u8C03\u51FD\u6570\uFF0C\u8FD4\u56DE <code>false</code> \u53EF\u963B\u6B62\u5173\u95ED\uFF0C\u652F\u6301\u8FD4\u56DE Promise</td>\n<td><em>(action: string) => boolean | Promise<boolean></em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>icon-prefix</td>\n<td>\u56FE\u6807\u7C7B\u540D\u524D\u7F00\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 <a href="#/zh-CN/icon#props" target="_blank">class-prefix \u5C5E\u6027</a></td>\n<td><em>string</em></td>\n<td><code>van-icon</code></td>\n</tr>\n<tr>\n<td>transition</td>\n<td>\u52A8\u753B\u7C7B\u540D\uFF0C\u7B49\u4EF7\u4E8E <a href="https://cn.vuejs.org/api/built-in-components.html#transition" target="_blank">transition</a> \u7684 <code>name</code> \u5C5E\u6027</td>\n<td><em>string</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>transition-appear</td>\n<td>\u662F\u5426\u5728\u521D\u59CB\u6E32\u67D3\u65F6\u542F\u7528\u8FC7\u6E21\u52A8\u753B</td>\n<td><em>boolean</em></td>\n<td><code>false</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<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>false</code></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>click</td>\n<td>\u70B9\u51FB\u5F39\u51FA\u5C42\u65F6\u89E6\u53D1</td>\n<td><em>event: MouseEvent</em></td>\n</tr>\n<tr>\n<td>click-overlay</td>\n<td>\u70B9\u51FB\u906E\u7F69\u5C42\u65F6\u89E6\u53D1</td>\n<td><em>event: MouseEvent</em></td>\n</tr>\n<tr>\n<td>click-close-icon</td>\n<td>\u70B9\u51FB\u5173\u95ED\u56FE\u6807\u65F6\u89E6\u53D1</td>\n<td><em>event: MouseEvent</em></td>\n</tr>\n<tr>\n<td>open</td>\n<td>\u6253\u5F00\u5F39\u51FA\u5C42\u65F6\u7ACB\u5373\u89E6\u53D1</td>\n<td>-</td>\n</tr>\n<tr>\n<td>close</td>\n<td>\u5173\u95ED\u5F39\u51FA\u5C42\u65F6\u7ACB\u5373\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</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</tr>\n</thead>\n<tbody>\n<tr>\n<td>default</td>\n<td>\u5F39\u7A97\u5185\u5BB9</td>\n</tr>\n<tr>\n<td>overlay-content</td>\n<td>\u906E\u7F69\u5C42\u7684\u5185\u5BB9</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_">PopupProps</span>,\n <span class="hljs-title class_">PopupPosition</span>,\n <span class="hljs-title class_">PopupInstance</span>,\n <span class="hljs-title class_">PopupCloseIconPosition</span>,\n} <span class="hljs-keyword">from</span> <span class="hljs-string">'vant'</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-popup-background</td>\n<td><em>var(--van-background-2)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-transition</td>\n<td><em>transform var(--van-duration-base)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-round-radius</td>\n<td><em>16px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-close-icon-size</td>\n<td><em>22px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-close-icon-color</td>\n<td><em>var(--van-gray-5)</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-close-icon-margin</td>\n<td><em>16px</em></td>\n<td>-</td>\n</tr>\n<tr>\n<td>--van-popup-close-icon-z-index</td>\n<td><em>1</em></td>\n<td>-</td>\n</tr>\n</tbody>\n</table>\n</div>'},null,8,l))}}}]); |