/*! For license information please see 6535.1dcfe2af.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["6535"],{36533: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:'
\u7528\u4E8E\u6807\u8BB0\u5173\u952E\u8BCD\u548C\u6982\u62EC\u4E3B\u8981\u5185\u5BB9\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 { Tag } from 'vant';\n\nconst app = createApp();\napp.use(Tag);\n
\n\u901A\u8FC7 type
\u5C5E\u6027\u63A7\u5236\u6807\u7B7E\u989C\u8272\u3002
<van-tag type="primary">\u6807\u7B7E</van-tag>\n<van-tag type="success">\u6807\u7B7E</van-tag>\n<van-tag type="danger">\u6807\u7B7E</van-tag>\n<van-tag type="warning">\u6807\u7B7E</van-tag>\n
\n\u8BBE\u7F6E plain
\u5C5E\u6027\u8BBE\u7F6E\u4E3A\u7A7A\u5FC3\u6837\u5F0F\u3002
<van-tag plain type="primary">\u6807\u7B7E</van-tag>\n
\n\u901A\u8FC7 round
\u8BBE\u7F6E\u4E3A\u5706\u89D2\u6837\u5F0F\u3002
<van-tag round type="primary">\u6807\u7B7E</van-tag>\n
\n\u901A\u8FC7 mark
\u8BBE\u7F6E\u4E3A\u6807\u8BB0\u6837\u5F0F(\u534A\u5706\u89D2)\u3002
<van-tag mark type="primary">\u6807\u7B7E</van-tag>\n
\n\u6DFB\u52A0 closeable
\u5C5E\u6027\u8868\u793A\u6807\u7B7E\u662F\u53EF\u5173\u95ED\u7684\uFF0C\u5173\u95ED\u6807\u7B7E\u65F6\u4F1A\u89E6\u53D1 close
\u4E8B\u4EF6\uFF0C\u5728 close
\u4E8B\u4EF6\u4E2D\u53EF\u4EE5\u6267\u884C\u9690\u85CF\u6807\u7B7E\u7684\u903B\u8F91\u3002
<van-tag :show="show" closeable size="medium" type="primary" @close="close">\n \u6807\u7B7E\n</van-tag>\n
\nimport { ref } from 'vue';\n\nexport default {\n setup() {\n const show = ref(true);\n const close = () => {\n show.value = false;\n };\n\n return {\n show,\n close,\n };\n },\n};\n
\n\u901A\u8FC7 size
\u5C5E\u6027\u8C03\u6574\u6807\u7B7E\u5927\u5C0F\u3002
<van-tag type="primary">\u6807\u7B7E</van-tag>\n<van-tag type="primary" size="medium">\u6807\u7B7E</van-tag>\n<van-tag type="primary" size="large">\u6807\u7B7E</van-tag>\n
\n\u901A\u8FC7 color
\u548C text-color
\u5C5E\u6027\u8BBE\u7F6E\u6807\u7B7E\u989C\u8272\u3002
<van-tag color="#7232dd">\u6807\u7B7E</van-tag>\n<van-tag color="#ffe1e1" text-color="#ad0000">\u6807\u7B7E</van-tag>\n<van-tag color="#7232dd" plain>\u6807\u7B7E</van-tag>\n
\n\u53C2\u6570 | \n\u8BF4\u660E | \n\u7C7B\u578B | \n\u9ED8\u8BA4\u503C | \n
---|---|---|---|
type | \n\u7C7B\u578B\uFF0C\u53EF\u9009\u503C\u4E3A primary success danger warning | \nstring | \ndefault | \n
size | \n\u5927\u5C0F, \u53EF\u9009\u503C\u4E3A large medium | \nstring | \n- | \n
color | \n\u6807\u7B7E\u989C\u8272 | \nstring | \n- | \n
show | \n\u662F\u5426\u5C55\u793A\u6807\u7B7E | \nboolean | \ntrue | \n
plain | \n\u662F\u5426\u4E3A\u7A7A\u5FC3\u6837\u5F0F | \nboolean | \nfalse | \n
round | \n\u662F\u5426\u4E3A\u5706\u89D2\u6837\u5F0F | \nboolean | \nfalse | \n
mark | \n\u662F\u5426\u4E3A\u6807\u8BB0\u6837\u5F0F | \nboolean | \nfalse | \n
text-color | \n\u6587\u672C\u989C\u8272\uFF0C\u4F18\u5148\u7EA7\u9AD8\u4E8E color \u5C5E\u6027 | \nstring | \nwhite | \n
closeable | \n\u662F\u5426\u4E3A\u53EF\u5173\u95ED\u6807\u7B7E | \nboolean | \nfalse | \n
\u540D\u79F0 | \n\u8BF4\u660E | \n
---|---|
default | \n\u6807\u7B7E\u663E\u793A\u5185\u5BB9 | \n
\u4E8B\u4EF6\u540D | \n\u8BF4\u660E | \n\u56DE\u8C03\u53C2\u6570 | \n
---|---|---|
click | \n\u70B9\u51FB\u65F6\u89E6\u53D1 | \nevent: MouseEvent | \n
close | \n\u5173\u95ED\u6807\u7B7E\u65F6\u89E6\u53D1 | \nevent: MouseEvent | \n
\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A
\nimport type { TagSize, TagType, TagProps } from 'vant';\n
\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-tag-padding | \n0 var(--van-padding-base) | \n- | \n
--van-tag-text-color | \nvar(--van-white) | \n- | \n
--van-tag-font-size | \nvar(--van-font-size-sm) | \n- | \n
--van-tag-radius | \n2px | \n- | \n
--van-tag-line-height | \n16px | \n- | \n
--van-tag-medium-padding | \n2px 6px | \n- | \n
--van-tag-large-padding | \nvar(--van-padding-base) var(--van-padding-xs) | \n- | \n
--van-tag-large-radius | \nvar(--van-radius-md) | \n- | \n
--van-tag-large-font-size | \nvar(--van-font-size-md) | \n- | \n
--van-tag-round-radius | \nvar(--van-radius-max) | \n- | \n
--van-tag-danger-color | \nvar(--van-danger-color) | \n- | \n
--van-tag-primary-color | \nvar(--van-primary-color) | \n- | \n
--van-tag-success-color | \nvar(--van-success-color) | \n- | \n
--van-tag-warning-color | \nvar(--van-warning-color) | \n- | \n
--van-tag-default-color | \nvar(--van-gray-6) | \n- | \n
--van-tag-plain-background | \nvar(--van-background-2) | \n- | \n