/*! For license information please see 3687.c99b59ad.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["3687"],{88454:function(n,s,t){"use strict";t.r(s);var a=t("80681");let d=["innerHTML"];s.default={setup:()=>({html:""}),render:()=>((0,a.wg)(),(0,a.iD)("div",{class:"van-doc-markdown-body",innerHTML:'

Toast \u8F7B\u63D0\u793A

\n

\u4ECB\u7ECD

\n

\u5728\u9875\u9762\u4E2D\u95F4\u5F39\u51FA\u9ED1\u8272\u534A\u900F\u660E\u63D0\u793A\uFF0C\u7528\u4E8E\u6D88\u606F\u901A\u77E5\u3001\u52A0\u8F7D\u63D0\u793A\u3001\u64CD\u4F5C\u7ED3\u679C\u63D0\u793A\u7B49\u573A\u666F\u3002

\n

\u5F15\u5165

\n

\u901A\u8FC7\u4EE5\u4E0B\u65B9\u5F0F\u6765\u5168\u5C40\u6CE8\u518C\u7EC4\u4EF6\uFF0C\u66F4\u591A\u6CE8\u518C\u65B9\u5F0F\u8BF7\u53C2\u8003\u7EC4\u4EF6\u6CE8\u518C\u3002

\n
import { createApp } from 'vue';\nimport { Toast } from 'vant';\n\nconst app = createApp();\napp.use(Toast);\n
\n

\u51FD\u6570\u8C03\u7528

\n

\u4E3A\u4E86\u4FBF\u4E8E\u4F7F\u7528 Toast\uFF0CVant \u63D0\u4F9B\u4E86\u4E00\u7CFB\u5217\u8F85\u52A9\u51FD\u6570\uFF0C\u901A\u8FC7\u8F85\u52A9\u51FD\u6570\u53EF\u4EE5\u5FEB\u901F\u5524\u8D77\u5168\u5C40\u7684 Toast \u7EC4\u4EF6\u3002

\n

\u6BD4\u5982\u4F7F\u7528 showToast \u51FD\u6570\uFF0C\u8C03\u7528\u540E\u4F1A\u76F4\u63A5\u5728\u9875\u9762\u4E2D\u6E32\u67D3\u5BF9\u5E94\u7684\u8F7B\u63D0\u793A\u3002

\n
import { showToast } from 'vant';\n\nshowToast('\u63D0\u793A\u5185\u5BB9');\n
\n

\u4EE3\u7801\u6F14\u793A

\n

\u6587\u5B57\u63D0\u793A

\n

\u4F7F\u7528 showToast \u65B9\u6CD5\u5728\u5C4F\u5E55\u4E2D\u95F4\u5C55\u793A\u4E00\u6761\u6587\u5B57\u63D0\u793A\u3002

\n
import { showToast } from 'vant';\n\nshowToast('\u63D0\u793A\u5185\u5BB9');\n
\n

\u52A0\u8F7D\u63D0\u793A

\n

\u4F7F\u7528 showLoadingToast \u65B9\u6CD5\u5C55\u793A\u52A0\u8F7D\u63D0\u793A\uFF0C\u901A\u8FC7 forbidClick \u9009\u9879\u53EF\u4EE5\u7981\u7528\u80CC\u666F\u70B9\u51FB\u3002

\n
import { showLoadingToast } from 'vant';\n\nshowLoadingToast({\n  message: '\u52A0\u8F7D\u4E2D...',\n  forbidClick: true,\n});\n
\n

\u6210\u529F/\u5931\u8D25\u63D0\u793A

\n

\u4F7F\u7528 showSuccessToast \u65B9\u6CD5\u5C55\u793A\u6210\u529F\u63D0\u793A\uFF0C\u4F7F\u7528 showFailToast \u65B9\u6CD5\u5C55\u793A\u5931\u8D25\u63D0\u793A\u3002

\n
import { showSuccessToast, showFailToast } from 'vant';\n\nshowSuccessToast('\u6210\u529F\u6587\u6848');\nshowFailToast('\u5931\u8D25\u6587\u6848');\n
\n

\u81EA\u5B9A\u4E49\u56FE\u6807

\n

\u901A\u8FC7 icon \u9009\u9879\u53EF\u4EE5\u81EA\u5B9A\u4E49\u56FE\u6807\uFF0C\u652F\u6301\u4F20\u5165\u56FE\u6807\u540D\u79F0\u6216\u56FE\u7247\u94FE\u63A5\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 name \u5C5E\u6027\u3002

\n
import { showToast } from 'vant';\n\nshowToast({\n  message: '\u81EA\u5B9A\u4E49\u56FE\u6807',\n  icon: 'like-o',\n});\n\nshowToast({\n  message: '\u81EA\u5B9A\u4E49\u56FE\u7247',\n  icon: 'https://fastly.jsdelivr.net/npm/@vant/assets/logo.png',\n});\n
\n

\u901A\u8FC7 loadingType \u5C5E\u6027\u53EF\u4EE5\u81EA\u5B9A\u4E49\u52A0\u8F7D\u56FE\u6807\u7C7B\u578B\u3002

\n
import { showLoadingToast } from 'vant';\n\nshowLoadingToast({\n  message: '\u52A0\u8F7D\u4E2D...',\n  forbidClick: true,\n  loadingType: 'spinner',\n});\n
\n

\u81EA\u5B9A\u4E49\u4F4D\u7F6E

\n

Toast \u9ED8\u8BA4\u6E32\u67D3\u5728\u5C4F\u5E55\u6B63\u4E2D\u4F4D\u7F6E\uFF0C\u901A\u8FC7 position \u5C5E\u6027\u53EF\u4EE5\u63A7\u5236 Toast \u5C55\u793A\u7684\u4F4D\u7F6E\u3002

\n
import { showToast } from 'vant';\n\nshowToast({\n  message: '\u9876\u90E8\u5C55\u793A',\n  position: 'top',\n});\n\nshowToast({\n  message: '\u5E95\u90E8\u5C55\u793A',\n  position: 'bottom',\n});\n
\n

\u6587\u5B57\u6362\u884C\u65B9\u5F0F

\n

\u901A\u8FC7 wordBreak \u9009\u9879\u53EF\u4EE5\u63A7\u5236 Toast \u4E2D\u7684\u6587\u5B57\u8FC7\u957F\u65F6\u7684\u622A\u65AD\u65B9\u5F0F\uFF0C\u9ED8\u8BA4\u503C\u4E3A break-all\uFF0C\u53EF\u9009\u503C\u4E3A break-word \u548C normal\u3002

\n
import { showToast } from 'vant';\n\n// \u6362\u884C\u65F6\u622A\u65AD\u5355\u8BCD\nshowToast({\n  message: 'This message will contain a incomprehensibilities long word.',\n  wordBreak: 'break-all',\n});\n\n// \u6362\u884C\u65F6\u4E0D\u622A\u65AD\u5355\u8BCD\nshowToast({\n  message: 'This message will contain a incomprehensibilities long word.',\n  wordBreak: 'break-word',\n});\n
\n

\u52A8\u6001\u66F4\u65B0\u63D0\u793A

\n

\u6267\u884C Toast \u65B9\u6CD5\u65F6\u4F1A\u8FD4\u56DE\u5BF9\u5E94\u7684 Toast \u5B9E\u4F8B\uFF0C\u901A\u8FC7\u4FEE\u6539\u5B9E\u4F8B\u4E0A\u7684 message \u5C5E\u6027\u53EF\u4EE5\u5B9E\u73B0\u52A8\u6001\u66F4\u65B0\u63D0\u793A\u7684\u6548\u679C\u3002

\n
import { showLoadingToast, closeToast } from 'vant';\n\nconst toast = showLoadingToast({\n  duration: 0,\n  forbidClick: true,\n  message: '\u5012\u8BA1\u65F6 3 \u79D2',\n});\n\nlet second = 3;\nconst timer = setInterval(() => {\n  second--;\n  if (second) {\n    toast.message = `\u5012\u8BA1\u65F6 ${second} \u79D2`;\n  } else {\n    clearInterval(timer);\n    closeToast();\n  }\n}, 1000);\n
\n

\u5355\u4F8B\u6A21\u5F0F

\n

Toast \u9ED8\u8BA4\u91C7\u7528\u5355\u4F8B\u6A21\u5F0F\uFF0C\u5373\u540C\u4E00\u65F6\u95F4\u53EA\u4F1A\u5B58\u5728\u4E00\u4E2A Toast\uFF0C\u5982\u679C\u9700\u8981\u5728\u540C\u4E00\u65F6\u95F4\u5F39\u51FA\u591A\u4E2A Toast\uFF0C\u53EF\u4EE5\u53C2\u8003\u4E0B\u9762\u7684\u793A\u4F8B\uFF1A

\n
import { showToast, showSuccessToast, allowMultipleToast } from 'vant';\n\nallowMultipleToast();\n\nconst toast1 = showToast('\u7B2C\u4E00\u4E2A Toast');\nconst toast2 = showSuccessToast('\u7B2C\u4E8C\u4E2A Toast');\n\ntoast1.close();\ntoast2.close();\n
\n

\u4FEE\u6539\u9ED8\u8BA4\u914D\u7F6E

\n

\u901A\u8FC7 setToastDefaultOptions \u51FD\u6570\u53EF\u4EE5\u5168\u5C40\u4FEE\u6539 showToast \u7B49\u65B9\u6CD5\u7684\u9ED8\u8BA4\u914D\u7F6E\u3002

\n
import { setToastDefaultOptions, resetToastDefaultOptions } from 'vant';\n\nsetToastDefaultOptions({ duration: 2000 });\n\nsetToastDefaultOptions('loading', { forbidClick: true });\n\nresetToastDefaultOptions();\n\nresetToastDefaultOptions('loading');\n
\n

\u4F7F\u7528 Toast \u7EC4\u4EF6

\n

\u5982\u679C\u4F60\u9700\u8981\u5728 Toast \u5185\u5D4C\u5165\u7EC4\u4EF6\u6216\u5176\u4ED6\u81EA\u5B9A\u4E49\u5185\u5BB9\uFF0C\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528 Toast \u7EC4\u4EF6\uFF0C\u5E76\u4F7F\u7528 message \u63D2\u69FD\u8FDB\u884C\u5B9A\u5236\u3002\u4F7F\u7528\u524D\u9700\u8981\u901A\u8FC7 app.use \u7B49\u65B9\u5F0F\u6CE8\u518C\u7EC4\u4EF6\u3002

\n
<van-toast v-model:show="show" style="padding: 0">\n  <template #message>\n    <van-image :src="image" width="200" height="140" style="display: block" />\n  </template>\n</van-toast>\n
\n
import { ref } from 'vue';\n\nexport default {\n  setup() {\n    const show = ref(false);\n    return { show };\n  },\n};\n
\n

API

\n

\u65B9\u6CD5

\n

Vant \u4E2D\u5BFC\u51FA\u4E86\u4EE5\u4E0B Toast \u76F8\u5173\u7684\u8F85\u52A9\u51FD\u6570\uFF1A

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u65B9\u6CD5\u540D\u8BF4\u660E\u53C2\u6570\u8FD4\u56DE\u503C
showToast\u5C55\u793A\u6587\u5B57\u63D0\u793AToastOptions | stringToast \u5B9E\u4F8B
showLoadingToast\u5C55\u793A\u52A0\u8F7D\u63D0\u793AToastOptions | stringToast \u5B9E\u4F8B
showSuccessToast\u5C55\u793A\u6210\u529F\u63D0\u793AToastOptions | stringToast \u5B9E\u4F8B
showFailToast\u5C55\u793A\u5931\u8D25\u63D0\u793AToastOptions | stringToast \u5B9E\u4F8B
closeToast\u5173\u95ED\u5F53\u524D\u5C55\u793A\u7684\u63D0\u793AcloseAll: booleanvoid
allowMultipleToast\u5141\u8BB8\u540C\u65F6\u5B58\u5728\u591A\u4E2A Toast-void
setToastDefaultOptions\u4FEE\u6539\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u5F71\u54CD\u6240\u6709\u7684 showToast \u8C03\u7528\u3002\u4F20\u5165 type \u53EF\u4EE5\u4FEE\u6539\u6307\u5B9A\u7C7B\u578B Toast \u7684\u9ED8\u8BA4\u914D\u7F6Etype | ToastOptionsvoid
resetToastDefaultOptions\u91CD\u7F6E\u9ED8\u8BA4\u914D\u7F6E\uFF0C\u5F71\u54CD\u6240\u6709\u7684 showToast \u8C03\u7528\u3002\u4F20\u5165 type \u53EF\u4EE5\u91CD\u7F6E\u6307\u5B9A\u7C7B\u578B Toast \u7684\u9ED8\u8BA4\u914D\u7F6Etypevoid
\n

ToastOptions \u6570\u636E\u7ED3\u6784

\n

\u8C03\u7528 showToast \u7B49\u65B9\u6CD5\u65F6\uFF0C\u652F\u6301\u4F20\u5165\u4EE5\u4E0B\u9009\u9879\uFF1A

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u53C2\u6570\u8BF4\u660E\u7C7B\u578B\u9ED8\u8BA4\u503C
type\u63D0\u793A\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A loading success fail htmlToastTypetext
position\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A top bottomToastPositionmiddle
message\u6587\u672C\u5185\u5BB9\uFF0C\u652F\u6301\u901A\u8FC7\\n\u6362\u884Cstring\'\'
wordBreak\u6587\u672C\u5185\u5BB9\u7684\u6362\u884C\u65B9\u5F0F\uFF0C\u53EF\u9009\u503C\u4E3A normal break-all break-wordToastWordBreak\'break-all\'
icon\u81EA\u5B9A\u4E49\u56FE\u6807\uFF0C\u652F\u6301\u4F20\u5165\u56FE\u6807\u540D\u79F0\u6216\u56FE\u7247\u94FE\u63A5\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 name \u5C5E\u6027string-
iconSize\u56FE\u6807\u5927\u5C0F\uFF0C\u5982 20px 2em\uFF0C\u9ED8\u8BA4\u5355\u4F4D\u4E3A pxnumber | string36px
iconPrefix\u56FE\u6807\u7C7B\u540D\u524D\u7F00\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 class-prefix \u5C5E\u6027stringvan-icon
overlay\u662F\u5426\u663E\u793A\u80CC\u666F\u906E\u7F69\u5C42booleanfalse
forbidClick\u662F\u5426\u7981\u6B62\u80CC\u666F\u70B9\u51FBbooleanfalse
closeOnClick\u662F\u5426\u5728\u70B9\u51FB\u540E\u5173\u95EDbooleanfalse
closeOnClickOverlay\u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95EDbooleanfalse
loadingType\u52A0\u8F7D\u56FE\u6807\u7C7B\u578B, \u53EF\u9009\u503C\u4E3A spinnerstringcircular
duration\u5C55\u793A\u65F6\u957F(ms)\uFF0C\u503C\u4E3A 0 \u65F6\uFF0Ctoast \u4E0D\u4F1A\u6D88\u5931number2000
className\u81EA\u5B9A\u4E49\u7C7B\u540Dstring | Array | object-
overlayClass\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u7C7B\u540Dstring | Array | object-
overlayStyle\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u6837\u5F0Fobject-
transition\u52A8\u753B\u7C7B\u540D\uFF0C\u7B49\u4EF7\u4E8E transition \u7684name\u5C5E\u6027stringvan-fade
teleport\u6307\u5B9A\u6302\u8F7D\u7684\u8282\u70B9\uFF0C\u7B49\u540C\u4E8E Teleport \u7EC4\u4EF6\u7684 to \u5C5E\u6027string | Elementbody
z-index\u5C06\u7EC4\u4EF6\u7684 z-index \u5C42\u7EA7\u8BBE\u7F6E\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u503Cnumber | string2000+
onClose\u5173\u95ED\u65F6\u7684\u56DE\u8C03\u51FD\u6570Function-
onOpened\u5B8C\u5168\u5C55\u793A\u540E\u7684\u56DE\u8C03\u51FD\u6570Function-
\n

Props

\n

\u901A\u8FC7\u7EC4\u4EF6\u8C03\u7528 Toast \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B Props\uFF1A

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u53C2\u6570\u8BF4\u660E\u7C7B\u578B\u9ED8\u8BA4\u503C
type\u63D0\u793A\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A loading success fail htmlToastTypetext
position\u4F4D\u7F6E\uFF0C\u53EF\u9009\u503C\u4E3A top bottomToastPositionmiddle
message\u6587\u672C\u5185\u5BB9\uFF0C\u652F\u6301\u901A\u8FC7\\n\u6362\u884Cstring\'\'
word-break\u6587\u672C\u5185\u5BB9\u7684\u6362\u884C\u65B9\u5F0F\uFF0C\u53EF\u9009\u503C\u4E3A normal break-all break-wordToastWordBreak\'break-all\'
icon\u81EA\u5B9A\u4E49\u56FE\u6807\uFF0C\u652F\u6301\u4F20\u5165\u56FE\u6807\u540D\u79F0\u6216\u56FE\u7247\u94FE\u63A5\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 name \u5C5E\u6027string-
icon-size\u56FE\u6807\u5927\u5C0F\uFF0C\u5982 20px 2em\uFF0C\u9ED8\u8BA4\u5355\u4F4D\u4E3A pxnumber | string36px
icon-prefix\u56FE\u6807\u7C7B\u540D\u524D\u7F00\uFF0C\u7B49\u540C\u4E8E Icon \u7EC4\u4EF6\u7684 class-prefix \u5C5E\u6027stringvan-icon
overlay\u662F\u5426\u663E\u793A\u80CC\u666F\u906E\u7F69\u5C42booleanfalse
forbid-click\u662F\u5426\u7981\u6B62\u80CC\u666F\u70B9\u51FBbooleanfalse
close-on-click\u662F\u5426\u5728\u70B9\u51FB\u540E\u5173\u95EDbooleanfalse
close-on-click-overlay\u662F\u5426\u5728\u70B9\u51FB\u906E\u7F69\u5C42\u540E\u5173\u95EDbooleanfalse
loading-type\u52A0\u8F7D\u56FE\u6807\u7C7B\u578B, \u53EF\u9009\u503C\u4E3A spinnerstringcircular
duration\u5C55\u793A\u65F6\u957F(ms)\uFF0C\u503C\u4E3A 0 \u65F6\uFF0Ctoast \u4E0D\u4F1A\u6D88\u5931number2000
class-name\u81EA\u5B9A\u4E49\u7C7B\u540Dstring | Array | object-
overlay-class\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u7C7B\u540Dstring | Array | object-
overlay-style\u81EA\u5B9A\u4E49\u906E\u7F69\u5C42\u6837\u5F0Fobject-
transition\u52A8\u753B\u7C7B\u540D\uFF0C\u7B49\u4EF7\u4E8E transition \u7684name\u5C5E\u6027stringvan-fade
teleport\u6307\u5B9A\u6302\u8F7D\u7684\u8282\u70B9\uFF0C\u7B49\u540C\u4E8E Teleport \u7EC4\u4EF6\u7684 to \u5C5E\u6027string | Elementbody
z-index\u5C06\u7EC4\u4EF6\u7684 z-index \u5C42\u7EA7\u8BBE\u7F6E\u4E3A\u4E00\u4E2A\u56FA\u5B9A\u503Cnumber | string2000+
\n

Events

\n

\u901A\u8FC7\u7EC4\u4EF6\u8C03\u7528 Toast \u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B\u4E8B\u4EF6\uFF1A

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u4E8B\u4EF6\u540D\u8BF4\u660E\u56DE\u8C03\u53C2\u6570
close\u5173\u95ED\u65F6\u7684\u56DE\u8C03\u51FD\u6570-
opened\u5B8C\u5168\u5C55\u793A\u540E\u7684\u56DE\u8C03\u51FD\u6570-
\n

Slots

\n

\u4F7F\u7528 Toast \u7EC4\u4EF6\u65F6\uFF0C\u652F\u6301\u4EE5\u4E0B\u63D2\u69FD\uFF1A

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u8BF4\u660E
message\u81EA\u5B9A\u4E49\u6587\u672C\u5185\u5BB9
\n

\u7C7B\u578B\u5B9A\u4E49

\n

\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A

\n
import type {\n  ToastType,\n  ToastProps,\n  ToastOptions,\n  ToastPosition,\n  ToastWordBreak,\n  ToastWrapperInstance,\n} from 'vant';\n
\n

\u4E3B\u9898\u5B9A\u5236

\n

\u6837\u5F0F\u53D8\u91CF

\n

\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 ConfigProvider \u7EC4\u4EF6\u3002

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u9ED8\u8BA4\u503C\u63CF\u8FF0
--van-toast-max-width70%-
--van-toast-font-sizevar(--van-font-size-md)-
--van-toast-text-colorvar(--van-white)-
--van-toast-loading-icon-colorvar(--van-white)-
--van-toast-line-heightvar(--van-line-height-md)-
--van-toast-radiusvar(--van-radius-lg)-
--van-toast-backgroundfade(var(--van-black), 70%)-
--van-toast-icon-size36px-
--van-toast-text-min-width96px-
--van-toast-text-paddingvar(--van-padding-xs) var(--van-padding-sm)-
--van-toast-default-paddingvar(--van-padding-md)-
--van-toast-default-width88px-
--van-toast-default-min-height88px-
--van-toast-position-top-distance20%-
--van-toast-position-bottom-distance20%-
\n

\u5E38\u89C1\u95EE\u9898

\n

\u5F15\u7528 showToast \u65F6\u51FA\u73B0\u7F16\u8BD1\u62A5\u9519\uFF1F

\n

\u5982\u679C\u5F15\u7528 showToast \u65B9\u6CD5\u65F6\u51FA\u73B0\u4EE5\u4E0B\u62A5\u9519\uFF0C\u8BF4\u660E\u9879\u76EE\u4E2D\u4F7F\u7528\u4E86 babel-plugin-import \u63D2\u4EF6\uFF0C\u5BFC\u81F4\u4EE3\u7801\u88AB\u9519\u8BEF\u7F16\u8BD1\u3002

\n
These dependencies were not found:\n\n* vant/es/show-toast in ./src/xxx.js\n* vant/es/show-toast/style in ./src/xxx.js\n
\n

Vant \u4ECE 4.0 \u7248\u672C\u5F00\u59CB\u4E0D\u518D\u652F\u6301 babel-plugin-import \u63D2\u4EF6\uFF0C\u8BF7\u53C2\u8003 \u8FC1\u79FB\u6307\u5357 \u79FB\u9664\u8BE5\u63D2\u4EF6\u3002

\n
'},null,8,d))}}}]);