1 | ---
|
2 | title: WaterMark
|
3 | preview: https://didi.github.io/mand-mobile/examples/#/water-mark
|
4 | ---
|
5 |
|
6 | Container with watermark background
|
7 |
|
8 | ### 引入
|
9 |
|
10 | ```javascript
|
11 | import { WaterMark } from 'mand-mobile'
|
12 |
|
13 | Vue.component(WaterMark.name, WaterMark)
|
14 | ```
|
15 |
|
16 | ### 代码演示
|
17 |
|
18 |
|
19 | ### API
|
20 |
|
21 | #### WaterMark Props
|
22 | |Props | Description | Type | Default | Note |
|
23 | |----|-----|------|------ |------|
|
24 | |content|-|String|-|complex content using `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 | Default slot of content
|
35 |
|
36 | ##### watermark
|
37 | scoped slot of watermark content
|
38 |
|
39 | ```html
|
40 | <div slot="watermark" slot-scope="{ coord }">
|
41 | <!-- coord.row row index -->
|
42 | <!-- coord.col column index -->
|
43 | </div>
|
44 | ```
|