组件
水印 Watermark
Watermark:水印层,显示在内容下方。canvas 先把文字绘制成一张图块(旋转、浅淡,并按屏幕像素密度保持清晰),标记层在默认插槽上重复平铺。prop 变化时水印会重绘,并且不接收指针事件。
#基础用法
The registry holds each entry twice: once in the ledger, once in the seal that marks it as the house's own. The mark beneath the words is quiet by design — it claims the page without taking the reader's attention.
Copies leave the building with the same seal, faint but present, so the paper can always be asked where it was made.
<script setup lang="ts">
import { Watermark } from "@bysages/vue";
</script>
<template>
<!-- The seal redraws itself from the theme's computed styles; it
never takes a pointer. -->
<Watermark content="BY SAGES · 内部资料" class="w-full">
<div class="grid gap-3 p-(--bs-padding-lg) text-sm leading-relaxed text-secondary">
<p>
The registry holds each entry twice: once in the ledger, once in the seal that marks it as
the house's own. The mark beneath the words is quiet by design — it claims the page without
taking the reader's attention.
</p>
<p>
Copies leave the building with the same seal, faint but present, so the paper can always be
asked where it was made.
</p>
</div>
</Watermark>
</template>
The registry holds each entry twice: once in the ledger, once in the seal that marks it as the house's own. The mark beneath the words is quiet by design — it claims the page without taking the reader's attention.
Copies leave the building with the same seal, faint but present, so the paper can always be asked where it was made.
<script setup lang="ts">
import { Watermark } from "@bysages/vue";
</script>
<template>
<!-- The seal answers the caller's hand: a heavier ink, a steeper
angle, a larger measure. -->
<Watermark
content="DRAFT · 草稿"
:opacity="0.12"
:rotate="-45"
font-size="1.125rem"
class="w-full"
>
<div class="grid gap-3 p-(--bs-padding-lg) text-sm leading-relaxed text-secondary">
<p>
The registry holds each entry twice: once in the ledger, once in the seal that marks it as
the house's own. The mark beneath the words is quiet by design — it claims the page without
taking the reader's attention.
</p>
<p>
Copies leave the building with the same seal, faint but present, so the paper can always be
asked where it was made.
</p>
</div>
</Watermark>
</template>
#属性
#Watermark
Watermark:水印层,显示在内容下方。canvas 先把文字绘制成一张图块(旋转、浅淡,并按屏幕像素密度保持清晰),标记层在默认插槽上重复平铺。prop 变化时水印会重绘,并且不接收指针事件。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
content | String | — | |
opacity | Number | 0.06 | — |
rotate | Number | -20 | — |
fontSize | String | "0.875rem" | — |