带有几何图案的背景组件,支持多种图案样式和动画效果。
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| variant | 图案类型 | 'grid' | 'dots' | 'lines' | 'grid' |
| size | 图案尺寸 | 'sm' | 'md' | 'lg' | 'md' |
| mask | 遮罩形状 | 'ellipse' | 'circle' | 'none' | 'ellipse' |
| animate | 是否动画 | boolean | false |
| direction | 动画方向 | 'top' | 'bottom' | 'left' | 'right' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top' |
| speed | 动画速度 (ms) | number | 10000 |
| class | 自定义类名 | HTMLAttributes['class'] | undefined |
| 名称 | 说明 |
|---|---|
| default | 默认插槽,放置内容 |
<template>
<!-- 网格图案 -->
<FaPatternBg variant="grid" />
<!-- 点状图案 -->
<FaPatternBg variant="dots" />
<!-- 线条图案 -->
<FaPatternBg variant="lines" />
</template>