1 | ---
|
2 | title: WaterMark 水印
|
3 | preview: https://didi.github.io/mand-mobile/examples/#/water-mark
|
4 | ---
|
5 |
|
6 | 自带水印背景的容器
|
7 |
|
8 | ### 引入
|
9 |
|
10 | ```javascript
|
11 | import { WaterMark } from 'mand-mobile'
|
12 |
|
13 | Vue.component(WaterMask.name, WaterMark)
|
14 | ```
|
15 |
|
16 | ### 代码演示
|
17 |
|
18 |
|
19 | ### API
|
20 |
|
21 | #### WaterMask Props
|
22 | |属性 | 说明 | 类型 | 默认值 | 备注 |
|
23 | |----|-----|------|------ |------|
|
24 | |content|水印内容|String|-|复杂内容使用`scoped slot`|
|
25 | |spacing|水印间距|String|`20vw`|-|
|
26 | |repeat-x|横向重复|Boolean|`true`|-|
|
27 | |repeat-y|纵向重复|Boolean|`true`|-|
|
28 | |rotate|旋转角度|String|`-30`|-|
|
29 | |opacity|透明度|String|`0.1`|-|
|
30 |
|
31 | #### WaterMark Slots
|
32 |
|
33 | ##### default
|
34 | 默认内容插槽
|
35 |
|
36 | ##### watermark
|
37 | 水印内容scoped插槽
|
38 |
|
39 | ```html
|
40 | <div slot="watermark" slot-scope="{ coord }">
|
41 | <!-- coord.row 行索引 -->
|
42 | <!-- coord.col 列索引 -->
|
43 | </div>
|
44 | ``` |
\ | No newline at end of file |