/*! For license information please see 2495.2e82cb32.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["2495"],{92395:function(s,a,n){"use strict";n.r(a);var t=n("80681");let l=["innerHTML"];a.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'
\u9009\u9879\u5361\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u5728\u4E0D\u540C\u7684\u5185\u5BB9\u533A\u57DF\u4E4B\u95F4\u8FDB\u884C\u5207\u6362\u3002
\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
\nimport { createApp } from 'vue';\nimport { Tab, Tabs } from 'vant';\n\nconst app = createApp();\napp.use(Tab);\napp.use(Tabs);\n
\n\u901A\u8FC7 v-model:active
\u7ED1\u5B9A\u5F53\u524D\u6FC0\u6D3B\u6807\u7B7E\u5BF9\u5E94\u7684\u7D22\u5F15\u503C\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u542F\u7528\u7B2C\u4E00\u4E2A\u6807\u7B7E\u3002
<van-tabs v-model:active="active">\n <van-tab title="\u6807\u7B7E 1">\u5185\u5BB9 1</van-tab>\n <van-tab title="\u6807\u7B7E 2">\u5185\u5BB9 2</van-tab>\n <van-tab title="\u6807\u7B7E 3">\u5185\u5BB9 3</van-tab>\n <van-tab title="\u6807\u7B7E 4">\u5185\u5BB9 4</van-tab>\n</van-tabs>\n
\nimport { ref } from 'vue';\n\nexport default {\n setup() {\n const active = ref(0);\n return { active };\n },\n};\n
\n\u5728\u6807\u7B7E\u6307\u5B9A name
\u5C5E\u6027\u7684\u60C5\u51B5\u4E0B\uFF0Cv-model:active
\u7684\u503C\u4E3A\u5F53\u524D\u6807\u7B7E\u7684 name
\uFF08\u6B64\u65F6\u65E0\u6CD5\u901A\u8FC7\u7D22\u5F15\u503C\u6765\u5339\u914D\u6807\u7B7E\uFF09\u3002
<van-tabs v-model:active="activeName">\n <van-tab title="\u6807\u7B7E 1" name="a">\u5185\u5BB9 1</van-tab>\n <van-tab title="\u6807\u7B7E 2" name="b">\u5185\u5BB9 2</van-tab>\n <van-tab title="\u6807\u7B7E 3" name="c">\u5185\u5BB9 3</van-tab>\n</van-tabs>\n
\nimport { ref } from 'vue';\n\nexport default {\n setup() {\n const activeName = ref('b');\n return { activeName };\n },\n};\n
\n\u6807\u7B7E\u6570\u91CF\u8D85\u8FC7 5 \u4E2A\u65F6\uFF0C\u6807\u7B7E\u680F\u53EF\u4EE5\u5728\u6C34\u5E73\u65B9\u5411\u4E0A\u6EDA\u52A8\uFF0C\u5207\u6362\u65F6\u4F1A\u81EA\u52A8\u5C06\u5F53\u524D\u6807\u7B7E\u5C45\u4E2D\u3002
\n<van-tabs v-model:active="active">\n <van-tab v-for="index in 8" :title="'\u6807\u7B7E ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u8BBE\u7F6E disabled
\u5C5E\u6027\u5373\u53EF\u7981\u7528\u6807\u7B7E\u3002
<van-tabs v-model:active="active">\n <van-tab title="\u6807\u7B7E 1">\u5185\u5BB9 1</van-tab>\n <van-tab title="\u6807\u7B7E 2" disabled>\u5185\u5BB9 2</van-tab>\n <van-tab title="\u6807\u7B7E 3">\u5185\u5BB9 3</van-tab>\n</van-tabs>\n
\nTab
\u652F\u6301\u4E24\u79CD\u6837\u5F0F\u98CE\u683C\uFF1Aline
\u548Ccard
\uFF0C\u9ED8\u8BA4\u4E3A line
\u6837\u5F0F\uFF0C\u53EF\u4EE5\u901A\u8FC7 type
\u5C5E\u6027\u5207\u6362\u6837\u5F0F\u98CE\u683C\u3002
<van-tabs v-model:active="active" type="card">\n <van-tab title="\u6807\u7B7E 1">\u5185\u5BB9 1</van-tab>\n <van-tab title="\u6807\u7B7E 2">\u5185\u5BB9 2</van-tab>\n <van-tab title="\u6807\u7B7E 3">\u5185\u5BB9 3</van-tab>\n</van-tabs>\n
\n\u70B9\u51FB\u6807\u7B7E\u9875\u65F6\uFF0C\u4F1A\u89E6\u53D1 click-tab
\u4E8B\u4EF6\u3002
<van-tabs v-model:active="active" @click-tab="onClickTab">\n <van-tab title="\u6807\u7B7E 1">\u5185\u5BB9 1</van-tab>\n <van-tab title="\u6807\u7B7E 2">\u5185\u5BB9 2</van-tab>\n</van-tabs>\n
\nimport { ref } from 'vue';\nimport { showToast } from 'vant';\n\nexport default {\n setup() {\n const active = ref(0);\n const onClickTab = ({ title }) => showToast(title);\n return {\n active,\n onClickTab,\n };\n },\n};\n
\n\u901A\u8FC7 sticky
\u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u7C98\u6027\u5E03\u5C40\uFF0C\u7C98\u6027\u5E03\u5C40\u4E0B\uFF0C\u6807\u7B7E\u9875\u6EDA\u52A8\u5230\u9876\u90E8\u65F6\u4F1A\u81EA\u52A8\u5438\u9876\u3002
<van-tabs v-model:active="active" sticky>\n <van-tab v-for="index in 4" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\n\nTips: \u5982\u679C\u9875\u9762\u9876\u90E8\u6709\u5176\u4ED6\u5185\u5BB9\uFF0C\u53EF\u4EE5\u901A\u8FC7 offset-top \u5C5E\u6027\u8BBE\u7F6E\u5438\u9876\u65F6\u4E0E\u9876\u90E8\u7684\u8DDD\u79BB\u3002
\n
\u901A\u8FC7 shrink
\u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u6536\u7F29\u5E03\u5C40\uFF0C\u5F00\u542F\u540E\uFF0C\u6240\u6709\u7684\u6807\u7B7E\u4F1A\u5411\u5DE6\u4FA7\u6536\u7F29\u5BF9\u9F50\u3002
<van-tabs v-model:active="active" shrink>\n <van-tab v-for="index in 4" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u901A\u8FC7 title
\u63D2\u69FD\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6807\u7B7E\u5185\u5BB9\u3002
<van-tabs v-model:active="active">\n <van-tab v-for="index in 2">\n <template #title> <van-icon name="more-o" />\u9009\u9879 </template>\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u901A\u8FC7 animated
\u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u5207\u6362\u6807\u7B7E\u5185\u5BB9\u65F6\u7684\u8F6C\u573A\u52A8\u753B\u3002
<van-tabs v-model:active="active" animated>\n <van-tab v-for="index in 4" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u901A\u8FC7 swipeable
\u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u6ED1\u52A8\u5207\u6362\u6807\u7B7E\u9875\u3002
<van-tabs v-model:active="active" swipeable>\n <van-tab v-for="index in 4" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u901A\u8FC7 scrollspy
\u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u6EDA\u52A8\u5BFC\u822A\u6A21\u5F0F\uFF0C\u8BE5\u6A21\u5F0F\u4E0B\uFF0C\u5185\u5BB9\u5C06\u4F1A\u5E73\u94FA\u5C55\u793A\u3002
<van-tabs v-model:active="active" scrollspy sticky>\n <van-tab v-for="index in 8" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\n\u901A\u8FC7 before-change
\u5C5E\u6027\u53EF\u4EE5\u5728\u5207\u6362\u6807\u7B7E\u524D\u6267\u884C\u7279\u5B9A\u7684\u903B\u8F91\u3002
<van-tabs v-model:active="active" :before-change="beforeChange">\n <van-tab v-for="index in 4" :title="'\u9009\u9879 ' + index">\n \u5185\u5BB9 {{ index }}\n </van-tab>\n</van-tabs>\n
\nimport { ref } from 'vue';\n\nexport default {\n setup() {\n const active = ref(0);\n const beforeChange = (index) => {\n // \u8FD4\u56DE false \u8868\u793A\u963B\u6B62\u6B64\u6B21\u5207\u6362\n if (index === 1) {\n return false;\n }\n\n // \u8FD4\u56DE Promise \u6765\u6267\u884C\u5F02\u6B65\u903B\u8F91\n return new Promise((resolve) => {\n // \u5728 resolve \u51FD\u6570\u4E2D\u8FD4\u56DE true \u6216 false\n setTimeout(() => resolve(index !== 3), 1000);\n });\n };\n\n return {\n beforeChange,\n };\n },\n};\n
\n\n\nTips: \u901A\u8FC7\u624B\u52BF\u6ED1\u52A8\u4E0D\u4F1A\u89E6\u53D1 before-change \u5C5E\u6027\u3002
\n
\u901A\u8FC7\u5C06 showHeader
\u5C5E\u6027\u8BBE\u7F6E\u4E3A false
\uFF0C\u53EF\u4EE5\u4E0D\u6E32\u67D3 Tabs \u7684\u6807\u9898\u680F\u3002\u5728\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u4E00\u4E9B\u81EA\u5B9A\u4E49\u7EC4\u4EF6\u6765\u63A7\u5236 Tabs \u7684 active
\u5C5E\u6027\u3002
<van-tabs v-model:active="active" :show-header="false">\n <van-tab v-for="index in 4"> \u5185\u5BB9 {{ index }} </van-tab>\n</van-tabs>\n
\n\u53C2\u6570 | \n\u8BF4\u660E | \n\u7C7B\u578B | \n\u9ED8\u8BA4\u503C | \n
---|---|---|---|
v-model:active | \n\u7ED1\u5B9A\u5F53\u524D\u9009\u4E2D\u6807\u7B7E\u7684\u6807\u8BC6\u7B26 | \nnumber | string | \n0 | \n
type | \n\u6837\u5F0F\u98CE\u683C\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A card | \nstring | \nline | \n
color | \n\u6807\u7B7E\u4E3B\u9898\u8272 | \nstring | \n#1989fa | \n
background | \n\u6807\u7B7E\u680F\u80CC\u666F\u8272 | \nstring | \nwhite | \n
duration | \n\u52A8\u753B\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2\uFF0C\u8BBE\u7F6E\u4E3A 0 \u53EF\u4EE5\u7981\u7528\u52A8\u753B | \nnumber | string | \n0.3 | \n
line-width | \n\u5E95\u90E8\u6761\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4\u5355\u4F4D px | \nnumber | string | \n40px | \n
line-height | \n\u5E95\u90E8\u6761\u9AD8\u5EA6\uFF0C\u9ED8\u8BA4\u5355\u4F4D px | \nnumber | string | \n3px | \n
animated | \n\u662F\u5426\u5F00\u542F\u5207\u6362\u6807\u7B7E\u5185\u5BB9\u65F6\u7684\u8F6C\u573A\u52A8\u753B | \nboolean | \nfalse | \n
border | \n\u662F\u5426\u663E\u793A\u6807\u7B7E\u680F\u5916\u8FB9\u6846\uFF0C\u4EC5\u5728 type="line" \u65F6\u6709\u6548 | \nboolean | \nfalse | \n
ellipsis | \n\u662F\u5426\u7701\u7565\u8FC7\u957F\u7684\u6807\u9898\u6587\u5B57 | \nboolean | \ntrue | \n
sticky | \n\u662F\u5426\u4F7F\u7528\u7C98\u6027\u5E03\u5C40 | \nboolean | \nfalse | \n
shrink | \n\u662F\u5426\u5F00\u542F\u5DE6\u4FA7\u6536\u7F29\u5E03\u5C40 | \nboolean | \nfalse | \n
swipeable | \n\u662F\u5426\u5F00\u542F\u624B\u52BF\u5DE6\u53F3\u6ED1\u52A8\u5207\u6362 | \nboolean | \nfalse | \n
lazy-render | \n\u662F\u5426\u5F00\u542F\u5EF6\u8FDF\u6E32\u67D3\uFF08\u9996\u6B21\u5207\u6362\u5230\u6807\u7B7E\u65F6\u624D\u89E6\u53D1\u5185\u5BB9\u6E32\u67D3\uFF09 | \nboolean | \ntrue | \n
scrollspy | \n\u662F\u5426\u5F00\u542F\u6EDA\u52A8\u5BFC\u822A | \nboolean | \nfalse | \n
show-header v4.7.3 | \n\u662F\u5426\u663E\u793A\u6807\u9898\u680F | \nboolean | \ntrue | \n
offset-top | \n\u7C98\u6027\u5E03\u5C40\u4E0B\u5438\u9876\u65F6\u4E0E\u9876\u90E8\u7684\u8DDD\u79BB\uFF0C\u652F\u6301 px vw vh rem \u5355\u4F4D\uFF0C\u9ED8\u8BA4 px | \nnumber | string | \n0 | \n
swipe-threshold | \n\u6EDA\u52A8\u9608\u503C\uFF0C\u6807\u7B7E\u6570\u91CF\u8D85\u8FC7\u9608\u503C\u4E14\u603B\u5BBD\u5EA6\u8D85\u8FC7\u6807\u7B7E\u680F\u5BBD\u5EA6\u65F6\u5F00\u59CB\u6A2A\u5411\u6EDA\u52A8 | \nnumber | string | \n5 | \n
title-active-color | \n\u6807\u9898\u9009\u4E2D\u6001\u989C\u8272 | \nstring | \n- | \n
title-inactive-color | \n\u6807\u9898\u9ED8\u8BA4\u6001\u989C\u8272 | \nstring | \n- | \n
before-change | \n\u5207\u6362\u6807\u7B7E\u524D\u7684\u56DE\u8C03\u51FD\u6570\uFF0C\u8FD4\u56DE false \u53EF\u963B\u6B62\u5207\u6362\uFF0C\u652F\u6301\u8FD4\u56DE Promise | \n(name: number | string) => boolean | Promise<boolean> | \n- | \n
\u53C2\u6570 | \n\u8BF4\u660E | \n\u7C7B\u578B | \n\u9ED8\u8BA4\u503C | \n
---|---|---|---|
title | \n\u6807\u9898 | \nstring | \n- | \n
disabled | \n\u662F\u5426\u7981\u7528\u6807\u7B7E | \nboolean | \nfalse | \n
dot | \n\u662F\u5426\u5728\u6807\u9898\u53F3\u4E0A\u89D2\u663E\u793A\u5C0F\u7EA2\u70B9 | \nboolean | \nfalse | \n
badge | \n\u56FE\u6807\u53F3\u4E0A\u89D2\u5FBD\u6807\u7684\u5185\u5BB9 | \nnumber | string | \n- | \n
name | \n\u6807\u7B7E\u540D\u79F0\uFF0C\u4F5C\u4E3A\u5339\u914D\u7684\u6807\u8BC6\u7B26 | \nnumber | string | \n\u6807\u7B7E\u7684\u7D22\u5F15\u503C | \n
url | \n\u70B9\u51FB\u540E\u8DF3\u8F6C\u7684\u94FE\u63A5\u5730\u5740 | \nstring | \n- | \n
to | \n\u70B9\u51FB\u540E\u8DF3\u8F6C\u7684\u76EE\u6807\u8DEF\u7531\u5BF9\u8C61\uFF0C\u7B49\u540C\u4E8E Vue Router \u7684 to \u5C5E\u6027 | \nstring | object | \n- | \n
replace | \n\u662F\u5426\u5728\u8DF3\u8F6C\u65F6\u66FF\u6362\u5F53\u524D\u9875\u9762\u5386\u53F2 | \nboolean | \nfalse | \n
title-style | \n\u81EA\u5B9A\u4E49\u6807\u9898\u6837\u5F0F | \nstring | Array | object | \n- | \n
title-class | \n\u81EA\u5B9A\u4E49\u6807\u9898\u7C7B\u540D | \nstring | Array | object | \n- | \n
show-zero-badge | \n\u5F53 badge \u4E3A\u6570\u5B57 0 \u65F6\uFF0C\u662F\u5426\u5C55\u793A\u5FBD\u6807 | \nboolean | \ntrue | \n
\u4E8B\u4EF6\u540D | \n\u8BF4\u660E | \n\u56DE\u8C03\u53C2\u6570 | \n
---|---|---|
click-tab | \n\u70B9\u51FB\u6807\u7B7E\u65F6\u89E6\u53D1 | \n{ name: string | number, title: string, event: MouseEvent, disabled: boolean } | \n
change | \n\u5F53\u524D\u6FC0\u6D3B\u7684\u6807\u7B7E\u6539\u53D8\u65F6\u89E6\u53D1 | \nname: string | number, title: string | \n
rendered | \n\u6807\u7B7E\u5185\u5BB9\u9996\u6B21\u6E32\u67D3\u65F6\u89E6\u53D1\uFF08\u4EC5\u5728\u5F00\u542F\u5EF6\u8FDF\u6E32\u67D3\u540E\u89E6\u53D1\uFF09 | \nname: string | number, title: string | \n
scroll | \n\u6EDA\u52A8\u65F6\u89E6\u53D1\uFF0C\u4EC5\u5728 sticky \u6A21\u5F0F\u4E0B\u751F\u6548 | \n{ scrollTop: number, isFixed: boolean } | \n
\n\n\u63D0\u793A\uFF1Aclick \u548C disabled \u4E8B\u4EF6\u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 click-tab \u4E8B\u4EF6\u4EE3\u66FF\u3002
\n
\u901A\u8FC7 ref \u53EF\u4EE5\u83B7\u53D6\u5230 Tabs \u5B9E\u4F8B\u5E76\u8C03\u7528\u5B9E\u4F8B\u65B9\u6CD5\uFF0C\u8BE6\u89C1\u7EC4\u4EF6\u5B9E\u4F8B\u65B9\u6CD5\u3002
\n\u65B9\u6CD5\u540D | \n\u8BF4\u660E | \n\u53C2\u6570 | \n\u8FD4\u56DE\u503C | \n
---|---|---|---|
resize | \n\u5916\u5C42\u5143\u7D20\u5927\u5C0F\u6216\u7EC4\u4EF6\u663E\u793A\u72B6\u6001\u53D8\u5316\u65F6\uFF0C\u53EF\u4EE5\u8C03\u7528\u6B64\u65B9\u6CD5\u6765\u89E6\u53D1\u91CD\u7ED8 | \n- | \n- | \n
scrollTo | \n\u6EDA\u52A8\u5230\u6307\u5B9A\u7684\u6807\u7B7E\u9875\uFF0C\u5728\u6EDA\u52A8\u5BFC\u822A\u6A21\u5F0F\u4E0B\u53EF\u7528 | \nname: string | number | \n- | \n
\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A
\nimport type { TabProps, TabsType, TabsProps, TabsInstance } from 'vant';\n
\nTabsInstance
\u662F\u7EC4\u4EF6\u5B9E\u4F8B\u7684\u7C7B\u578B\uFF0C\u7528\u6CD5\u5982\u4E0B\uFF1A
import { ref } from 'vue';\nimport type { TabsInstance } from 'vant';\n\nconst tabsRef = ref<TabsInstance>();\n\ntabsRef.value?.scrollTo(0);\n
\n\u540D\u79F0 | \n\u8BF4\u660E | \n
---|---|
nav-left | \n\u6807\u7B7E\u680F\u5DE6\u4FA7\u5185\u5BB9 | \n
nav-right | \n\u6807\u7B7E\u680F\u53F3\u4FA7\u5185\u5BB9 | \n
nav-bottom | \n\u6807\u7B7E\u680F\u4E0B\u65B9\u5185\u5BB9 | \n
\u540D\u79F0 | \n\u8BF4\u660E | \n
---|---|
default | \n\u6807\u7B7E\u9875\u5185\u5BB9 | \n
title | \n\u81EA\u5B9A\u4E49\u6807\u9898 | \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\u540D\u79F0 | \n\u9ED8\u8BA4\u503C | \n\u63CF\u8FF0 | \n
---|---|---|
--van-tab-text-color | \nvar(--van-gray-7) | \n- | \n
--van-tab-active-text-color | \nvar(--van-text-color) | \n- | \n
--van-tab-disabled-text-color | \nvar(--van-text-color-3) | \n- | \n
--van-tab-font-size | \nvar(--van-font-size-md) | \n- | \n
--van-tab-line-height | \nvar(--van-line-height-md) | \n- | \n
--van-tabs-default-color | \nvar(--van-primary-color) | \n- | \n
--van-tabs-line-height | \n44px | \n- | \n
--van-tabs-card-height | \n30px | \n- | \n
--van-tabs-nav-background | \nvar(--van-background-2) | \n- | \n
--van-tabs-bottom-bar-width | \n40px | \n- | \n
--van-tabs-bottom-bar-height | \n3px | \n- | \n
--van-tabs-bottom-bar-color | \nvar(--van-primary-color) | \n- | \n
Tabs \u7EC4\u4EF6\u5728\u6302\u8F7D\u65F6\uFF0C\u4F1A\u83B7\u53D6\u81EA\u8EAB\u7684\u5BBD\u5EA6\uFF0C\u5E76\u8BA1\u7B97\u51FA\u5E95\u90E8\u6761\u7684\u4F4D\u7F6E\u3002\u5982\u679C\u7EC4\u4EF6\u4E00\u5F00\u59CB\u5904\u4E8E\u9690\u85CF\u72B6\u6001\uFF0C\u5219\u83B7\u53D6\u5230\u7684\u5BBD\u5EA6\u6C38\u8FDC\u4E3A 0\uFF0C\u56E0\u6B64\u65E0\u6CD5\u5C55\u793A\u5E95\u90E8\u6761\u4F4D\u7F6E\u3002
\n\u65B9\u6CD5\u4E00\uFF0C\u5982\u679C\u662F\u4F7F\u7528 v-show
\u6765\u63A7\u5236\u7EC4\u4EF6\u5C55\u793A\u7684\uFF0C\u5219\u66FF\u6362\u4E3A v-if
\u5373\u53EF\u89E3\u51B3\u6B64\u95EE\u9898\uFF1A
<!-- Before -->\n<van-tabs v-show="show" />\n<!-- After -->\n<van-tabs v-if="show" />\n
\n\u65B9\u6CD5\u4E8C\uFF0C\u8C03\u7528\u7EC4\u4EF6\u7684 resize \u65B9\u6CD5\u6765\u4E3B\u52A8\u89E6\u53D1\u91CD\u7ED8\uFF1A
\n<van-tabs v-show="show" ref="tabs" />\n
\nthis.$refs.tabs.resize();\n
\n