/*! For license information please see 545.bb452477.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["545"],{92410:function(n,s,a){"use strict";a.r(s);var t=a("80681");let d=["innerHTML"];s.default={setup:()=>({html:""}),render:()=>((0,t.wg)(),(0,t.iD)("div",{class:"van-doc-markdown-body",innerHTML:'
\u5728\u9875\u9762\u4E0A\u6DFB\u52A0\u7279\u5B9A\u7684\u6587\u5B57\u6216\u56FE\u6848\u4F5C\u4E3A\u6C34\u5370\uFF0C\u53EF\u7528\u4E8E\u9632\u6B62\u4FE1\u606F\u76D7\u7528\u3002\u8BF7\u5347\u7EA7 vant
\u5230 >= 4.2.0 \u7248\u672C\u6765\u4F7F\u7528\u8BE5\u7EC4\u4EF6\u3002
\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 { Watermark } from 'vant';\n\nconst app = createApp();\napp.use(Watermark);\n
\n\u901A\u8FC7 content
\u5C5E\u6027\u6765\u8BBE\u7F6E\u6C34\u5370\u7684\u6587\u5B57\u3002
<van-watermark content="Vant" />\n
\n\u901A\u8FC7 image
\u5C5E\u6027\u6765\u8BBE\u7F6E\u6C34\u5370\u56FE\u7247\uFF0C\u5E76\u4F7F\u7528 opacity
\u6765\u8C03\u6574\u6C34\u5370\u7684\u6574\u4F53\u900F\u660E\u5EA6\u3002
<van-watermark\n image="https://fastly.jsdelivr.net/npm/@vant/assets/vant-watermark.png"\n opacity="0.2"\n/>\n
\n\u901A\u8FC7 gap-x
\u548C gap-y
\u5C5E\u6027\u6765\u63A7\u5236\u591A\u4E2A\u91CD\u590D\u6C34\u5370\u4E4B\u95F4\u7684\u95F4\u9694\u3002
<van-watermark\n image="https://fastly.jsdelivr.net/npm/@vant/assets/vant-watermark.png"\n :gap-x="30"\n :gap-y="10"\n opacity="0.2"\n/>\n
\n\u901A\u8FC7 rotate
\u5C5E\u6027\u6765\u63A7\u5236\u6C34\u5370\u7684\u503E\u659C\u89D2\u5EA6\uFF0C\u9ED8\u8BA4\u503C\u4E3A-22
\u3002
<van-watermark\n image="https://fastly.jsdelivr.net/npm/@vant/assets/vant-watermark.png"\n rotate="22"\n opacity="0.2"\n/>\n
\n\u901A\u8FC7 full-page
\u5C5E\u6027\u6765\u63A7\u5236\u6C34\u5370\u7684\u663E\u793A\u8303\u56F4\u3002
<van-watermark\n image="https://fastly.jsdelivr.net/npm/@vant/assets/vant-watermark.png"\n opacity="0.2"\n :full-page="true"\n/>\n
\n\u901A\u8FC7 content
\u63D2\u69FD\u53EF\u4EE5\u76F4\u63A5\u4F20\u5165 HTML \u4F5C\u4E3A\u6C34\u5370\u3002HTML \u4E2D\u7684\u6837\u5F0F\u4EC5\u652F\u6301\u884C\u5185\u6837\u5F0F\uFF0C\u540C\u65F6\u4E0D\u652F\u6301\u4F20\u5165\u81EA\u95ED\u5408\u6807\u7B7E\u3002
<van-watermark :width="150">\n <template #content>\n <div style="background: linear-gradient(45deg, #000 0, #000 50%, #fff 50%)">\n <p style="mix-blend-mode: difference; color: #fff">Vant watermark</p>\n </div>\n </template>\n</van-watermark>\n
\n\u53C2\u6570 | \n\u8BF4\u660E | \n\u7C7B\u578B | \n\u9ED8\u8BA4\u503C | \n
---|---|---|---|
width | \n\u6C34\u5370\u5BBD\u5EA6 | \nnumber | \n100 | \n
height | \n\u6C34\u5370\u9AD8\u5EA6 | \nnumber | \n100 | \n
z-index | \n\u6C34\u5370\u7684 z-index | \nnumber | string | \n100 | \n
content | \n\u6587\u5B57\u6C34\u5370\u7684\u5185\u5BB9 | \nstring | \n- | \n
image | \n\u56FE\u7247\u6C34\u5370\u7684\u5185\u5BB9\uFF0C\u5982\u679C\u4E0E content \u540C\u65F6\u4F20\u5165\uFF0C\u4F18\u5148\u4F7F\u7528\u56FE\u7247\u6C34\u5370 | \nstring | \n- | \n
rotate | \n\u6C34\u5370\u7684\u65CB\u8F6C\u89D2\u5EA6 | \nnumber | string | \n-22 | \n
full-page | \n\u6C34\u5370\u662F\u5426\u5168\u5C4F\u663E\u793A | \nboolean | \nfalse | \n
gap-x | \n\u6C34\u5370\u4E4B\u95F4\u7684\u6C34\u5E73\u95F4\u9694 | \nnumber | \n0 | \n
gap-y | \n\u6C34\u5370\u4E4B\u95F4\u7684\u5782\u76F4\u95F4\u9694 | \nnumber | \n0 | \n
text-color | \n\u6587\u5B57\u6C34\u5370\u7684\u989C\u8272 | \nstring | \n#dcdee0 | \n
opacity | \n\u6C34\u5370\u7684\u900F\u660E\u5EA6 | \nnumber | string | \n- | \n
\u540D\u79F0 | \n\u8BF4\u660E | \n
---|---|
content | \nHTML \u6C34\u5370\u7684\u5185\u5BB9\uFF0C\u4EC5\u652F\u6301\u884C\u5185\u6837\u5F0F\uFF0C\u540C\u65F6\u4E0D\u652F\u6301\u4F20\u5165\u81EA\u95ED\u5408\u6807\u7B7E\uFF0C\u4F18\u5148\u7EA7\u9AD8\u4E8E content \u6216 image \u5C5E\u6027 | \n
\u7EC4\u4EF6\u5BFC\u51FA\u4EE5\u4E0B\u7C7B\u578B\u5B9A\u4E49\uFF1A
\nimport type { WaterProps } 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-watermark-z-index | \n100 | \n\u6839\u8282\u70B9\u7684 z-index \u5C42\u7EA7 | \n