Watermark
Watermark: a tiled layer over the protected content (pointer-events: none, not selectable). Text and image modes.
Platform differences (registered): this port uses a uniform CSS grid tiling (no canvas tile on H5 or mini-program); cell layout comes from the share-core layoutWatermarkCells pure function.
Basic usage
vue
<template>
<lh-watermark content="lh-ui 家族" :font-size="16" :gap-x="120">
<view class="content">
<text>受保护的内容</text>
</view>
</lh-watermark>
</template>Image watermark & fullscreen
image takes precedence over content; fullscreen covers the viewport (fixed):
vue
<lh-watermark image="/logo.png" :opacity="0.2" fullscreen />Prop
| Prop | Description | Type | Default |
|---|---|---|---|
| content | string | string | — |
| image | string | string | — |
| opacity | number | number | 0.15 |
| rotate | number | number | -22 |
| gapX | number | number | 100 |
| gapY | number | number | — |
| fontSize | number | number | 14 |
| fontColor | string | string | — |
| zIndex | number | number | 100 |
| fullscreen | boolean | boolean | false |
| disabled | boolean | boolean | false |
| customClass | string | string | — |
| sx | LhSxProps | LhSxProps | — |
Slot
| Slot |
|---|
| default |

