/*! 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:'

Tab \u6807\u7B7E\u9875

\n

\u4ECB\u7ECD

\n

\u9009\u9879\u5361\u7EC4\u4EF6\uFF0C\u7528\u4E8E\u5728\u4E0D\u540C\u7684\u5185\u5BB9\u533A\u57DF\u4E4B\u95F4\u8FDB\u884C\u5207\u6362\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 { Tab, Tabs } from 'vant';\n\nconst app = createApp();\napp.use(Tab);\napp.use(Tabs);\n
\n

\u4EE3\u7801\u6F14\u793A

\n

\u57FA\u7840\u7528\u6CD5

\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

\n
<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
\n
import { ref } from 'vue';\n\nexport default {\n  setup() {\n    const active = ref(0);\n    return { active };\n  },\n};\n
\n

\u901A\u8FC7\u540D\u79F0\u5339\u914D

\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

\n
<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
\n
import { ref } from 'vue';\n\nexport default {\n  setup() {\n    const activeName = ref('b');\n    return { activeName };\n  },\n};\n
\n

\u6807\u7B7E\u680F\u6EDA\u52A8

\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

\u7981\u7528\u6807\u7B7E

\n

\u8BBE\u7F6E disabled \u5C5E\u6027\u5373\u53EF\u7981\u7528\u6807\u7B7E\u3002

\n
<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
\n

\u6837\u5F0F\u98CE\u683C

\n

Tab \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

\n
<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\u4E8B\u4EF6

\n

\u70B9\u51FB\u6807\u7B7E\u9875\u65F6\uFF0C\u4F1A\u89E6\u53D1 click-tab \u4E8B\u4EF6\u3002

\n
<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
\n
import { 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

\u7C98\u6027\u5E03\u5C40

\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

\n
<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

Tips: \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
\n

\u6536\u7F29\u5E03\u5C40

\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

\n
<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

\u81EA\u5B9A\u4E49\u6807\u7B7E

\n

\u901A\u8FC7 title \u63D2\u69FD\u53EF\u4EE5\u81EA\u5B9A\u4E49\u6807\u7B7E\u5185\u5BB9\u3002

\n
<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

\u5207\u6362\u52A8\u753B

\n

\u901A\u8FC7 animated \u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u5207\u6362\u6807\u7B7E\u5185\u5BB9\u65F6\u7684\u8F6C\u573A\u52A8\u753B\u3002

\n
<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

\u6ED1\u52A8\u5207\u6362

\n

\u901A\u8FC7 swipeable \u5C5E\u6027\u53EF\u4EE5\u5F00\u542F\u6ED1\u52A8\u5207\u6362\u6807\u7B7E\u9875\u3002

\n
<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

\u6EDA\u52A8\u5BFC\u822A

\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

\n
<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

\u5F02\u6B65\u5207\u6362

\n

\u901A\u8FC7 before-change \u5C5E\u6027\u53EF\u4EE5\u5728\u5207\u6362\u6807\u7B7E\u524D\u6267\u884C\u7279\u5B9A\u7684\u903B\u8F91\u3002

\n
<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
\n
import { 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

Tips: \u901A\u8FC7\u624B\u52BF\u6ED1\u52A8\u4E0D\u4F1A\u89E6\u53D1 before-change \u5C5E\u6027\u3002

\n
\n

\u9690\u85CF\u6807\u9898\u680F

\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

\n
<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

API

\n

Tabs Props

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
v-model:active\u7ED1\u5B9A\u5F53\u524D\u9009\u4E2D\u6807\u7B7E\u7684\u6807\u8BC6\u7B26number | string0
type\u6837\u5F0F\u98CE\u683C\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A cardstringline
color\u6807\u7B7E\u4E3B\u9898\u8272string#1989fa
background\u6807\u7B7E\u680F\u80CC\u666F\u8272stringwhite
duration\u52A8\u753B\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2\uFF0C\u8BBE\u7F6E\u4E3A 0 \u53EF\u4EE5\u7981\u7528\u52A8\u753Bnumber | string0.3
line-width\u5E95\u90E8\u6761\u5BBD\u5EA6\uFF0C\u9ED8\u8BA4\u5355\u4F4D pxnumber | string40px
line-height\u5E95\u90E8\u6761\u9AD8\u5EA6\uFF0C\u9ED8\u8BA4\u5355\u4F4D pxnumber | string3px
animated\u662F\u5426\u5F00\u542F\u5207\u6362\u6807\u7B7E\u5185\u5BB9\u65F6\u7684\u8F6C\u573A\u52A8\u753Bbooleanfalse
border\u662F\u5426\u663E\u793A\u6807\u7B7E\u680F\u5916\u8FB9\u6846\uFF0C\u4EC5\u5728 type="line" \u65F6\u6709\u6548booleanfalse
ellipsis\u662F\u5426\u7701\u7565\u8FC7\u957F\u7684\u6807\u9898\u6587\u5B57booleantrue
sticky\u662F\u5426\u4F7F\u7528\u7C98\u6027\u5E03\u5C40booleanfalse
shrink\u662F\u5426\u5F00\u542F\u5DE6\u4FA7\u6536\u7F29\u5E03\u5C40booleanfalse
swipeable\u662F\u5426\u5F00\u542F\u624B\u52BF\u5DE6\u53F3\u6ED1\u52A8\u5207\u6362booleanfalse
lazy-render\u662F\u5426\u5F00\u542F\u5EF6\u8FDF\u6E32\u67D3\uFF08\u9996\u6B21\u5207\u6362\u5230\u6807\u7B7E\u65F6\u624D\u89E6\u53D1\u5185\u5BB9\u6E32\u67D3\uFF09booleantrue
scrollspy\u662F\u5426\u5F00\u542F\u6EDA\u52A8\u5BFC\u822Abooleanfalse
show-header v4.7.3\u662F\u5426\u663E\u793A\u6807\u9898\u680Fbooleantrue
offset-top\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 pxnumber | string0
swipe-threshold\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\u52A8number | string5
title-active-color\u6807\u9898\u9009\u4E2D\u6001\u989C\u8272string-
title-inactive-color\u6807\u9898\u9ED8\u8BA4\u6001\u989C\u8272string-
before-change\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(name: number | string) => boolean | Promise<boolean>-
\n

Tab Props

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\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
title\u6807\u9898string-
disabled\u662F\u5426\u7981\u7528\u6807\u7B7Ebooleanfalse
dot\u662F\u5426\u5728\u6807\u9898\u53F3\u4E0A\u89D2\u663E\u793A\u5C0F\u7EA2\u70B9booleanfalse
badge\u56FE\u6807\u53F3\u4E0A\u89D2\u5FBD\u6807\u7684\u5185\u5BB9number | string-
name\u6807\u7B7E\u540D\u79F0\uFF0C\u4F5C\u4E3A\u5339\u914D\u7684\u6807\u8BC6\u7B26number | string\u6807\u7B7E\u7684\u7D22\u5F15\u503C
url\u70B9\u51FB\u540E\u8DF3\u8F6C\u7684\u94FE\u63A5\u5730\u5740string-
to\u70B9\u51FB\u540E\u8DF3\u8F6C\u7684\u76EE\u6807\u8DEF\u7531\u5BF9\u8C61\uFF0C\u7B49\u540C\u4E8E Vue Router \u7684 to \u5C5E\u6027string | object-
replace\u662F\u5426\u5728\u8DF3\u8F6C\u65F6\u66FF\u6362\u5F53\u524D\u9875\u9762\u5386\u53F2booleanfalse
title-style\u81EA\u5B9A\u4E49\u6807\u9898\u6837\u5F0Fstring | Array | object-
title-class\u81EA\u5B9A\u4E49\u6807\u9898\u7C7B\u540Dstring | Array | object-
show-zero-badge\u5F53 badge \u4E3A\u6570\u5B57 0 \u65F6\uFF0C\u662F\u5426\u5C55\u793A\u5FBD\u6807booleantrue
\n

Tabs Events

\n\n\n\n\n\n\n\n\n\n\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
click-tab\u70B9\u51FB\u6807\u7B7E\u65F6\u89E6\u53D1{ name: string | number, title: string, event: MouseEvent, disabled: boolean }
change\u5F53\u524D\u6FC0\u6D3B\u7684\u6807\u7B7E\u6539\u53D8\u65F6\u89E6\u53D1name: string | number, title: string
rendered\u6807\u7B7E\u5185\u5BB9\u9996\u6B21\u6E32\u67D3\u65F6\u89E6\u53D1\uFF08\u4EC5\u5728\u5F00\u542F\u5EF6\u8FDF\u6E32\u67D3\u540E\u89E6\u53D1\uFF09name: string | number, title: string
scroll\u6EDA\u52A8\u65F6\u89E6\u53D1\uFF0C\u4EC5\u5728 sticky \u6A21\u5F0F\u4E0B\u751F\u6548{ scrollTop: number, isFixed: boolean }
\n
\n

\u63D0\u793A\uFF1Aclick \u548C disabled \u4E8B\u4EF6\u5DF2\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528 click-tab \u4E8B\u4EF6\u4EE3\u66FF\u3002

\n
\n

Tabs \u65B9\u6CD5

\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\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
resize\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--
scrollTo\u6EDA\u52A8\u5230\u6307\u5B9A\u7684\u6807\u7B7E\u9875\uFF0C\u5728\u6EDA\u52A8\u5BFC\u822A\u6A21\u5F0F\u4E0B\u53EF\u7528name: string | number-
\n

\u7C7B\u578B\u5B9A\u4E49

\n

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

\n
import type { TabProps, TabsType, TabsProps, TabsInstance } from 'vant';\n
\n

TabsInstance \u662F\u7EC4\u4EF6\u5B9E\u4F8B\u7684\u7C7B\u578B\uFF0C\u7528\u6CD5\u5982\u4E0B\uFF1A

\n
import { ref } from 'vue';\nimport type { TabsInstance } from 'vant';\n\nconst tabsRef = ref<TabsInstance>();\n\ntabsRef.value?.scrollTo(0);\n
\n

Tabs Slots

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u8BF4\u660E
nav-left\u6807\u7B7E\u680F\u5DE6\u4FA7\u5185\u5BB9
nav-right\u6807\u7B7E\u680F\u53F3\u4FA7\u5185\u5BB9
nav-bottom\u6807\u7B7E\u680F\u4E0B\u65B9\u5185\u5BB9
\n

Tab Slots

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\u540D\u79F0\u8BF4\u660E
default\u6807\u7B7E\u9875\u5185\u5BB9
title\u81EA\u5B9A\u4E49\u6807\u9898
\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
\u540D\u79F0\u9ED8\u8BA4\u503C\u63CF\u8FF0
--van-tab-text-colorvar(--van-gray-7)-
--van-tab-active-text-colorvar(--van-text-color)-
--van-tab-disabled-text-colorvar(--van-text-color-3)-
--van-tab-font-sizevar(--van-font-size-md)-
--van-tab-line-heightvar(--van-line-height-md)-
--van-tabs-default-colorvar(--van-primary-color)-
--van-tabs-line-height44px-
--van-tabs-card-height30px-
--van-tabs-nav-backgroundvar(--van-background-2)-
--van-tabs-bottom-bar-width40px-
--van-tabs-bottom-bar-height3px-
--van-tabs-bottom-bar-colorvar(--van-primary-color)-
\n

\u5E38\u89C1\u95EE\u9898

\n

\u7EC4\u4EF6\u4ECE\u9690\u85CF\u72B6\u6001\u5207\u6362\u5230\u663E\u793A\u72B6\u6001\u65F6\uFF0C\u5E95\u90E8\u6761\u4F4D\u7F6E\u9519\u8BEF\uFF1F

\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

\u89E3\u51B3\u65B9\u6CD5

\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

\n
<!-- 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
\n
this.$refs.tabs.resize();\n
\n
'},null,8,l))}}}]);