forked from didi/mand-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.vue
103 lines (91 loc) · 1.97 KB
/
index.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<template>
<md-water-mark
class="md-bill"
:content="waterMark"
>
<header class="md-bill-header">
<template v-if="!$slots.header">
<h4 class="md-bill-title" v-if="title" v-text="title"></h4>
<div class="md-bill-no" v-if="no">NO.{{no}}</div>
</template>
<template v-else>
<slot name="header"></slot>
</template>
</header>
<div class="md-bill-neck">
<span></span>
</div>
<div class="md-bill-content">
<div class="md-bill-detail">
<slot></slot>
</div>
<footer v-if="$slots.footer" class="md-bill-footer">
<slot name="footer"></slot>
</footer>
</div>
<template slot="watermark" slot-scope="props" v-if="!!$scopedSlots.watermark">
<slot name="watermark" :coord="props.coord"></slot>
</template>
</md-water-mark>
</template>
<script>import FieldItem from '../field-item'
import WaterMark from '../water-mark'
export default {
name: 'md-bill',
components: {
[FieldItem.name]: FieldItem,
[WaterMark.name]: WaterMark,
},
props: {
title: {
type: String,
default: '',
},
no: {
type: [String, Number],
default: '',
},
waterMark: {
type: String,
default: '',
},
},
}
</script>
<style lang="stylus">
.md-bill
position relative
background bill-bg
.md-bill-header
display flex
align-items center
justify-content space-between
padding 28px 32px 8px
.md-bill-title
color bill-name-color
font-size bill-name-font-size
font-weight font-weight-medium
font-family Songti SC
.md-bill-no
color bill-no-color
font-size bill-no-font-size
.md-bill-neck
position relative
height 36px
padding 10px
margin 0 28px
box-sizing border-box
span
position absolute
display block
top 50%
left 10px
right 10px
height 1px
border-top dashed 1px color-border-element
.md-bill-content
padding 0 32px 20px 32px
.md-bill-detail
padding-bottom 40px
</style>