15368be1
梁灏
Support Badge
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<style scoped>
.demo-badge{
width: 42px;
height: 42px;
background: #eee;
border-radius: 6px;
display: inline-block;
}
</style>
<style>
.demo-badge-alone{
background: #5cb85c !important;
}
</style>
<template>
<div>
|
fdafcd2c
梁灏
Badge add text prop
|
17
|
<Badge :count="count">
|
15368be1
梁灏
Support Badge
|
18
19
|
<a href="#" class="demo-badge"></a>
</Badge>
|
1ca07948
xiaofengsha
增加Badge组件showZero...
|
20
21
22
|
<Badge :count="0" showZero>
<a href="#" class="demo-badge"></a>
</Badge>
|
75c32564
Aresn
fixed #646
|
23
|
<Button @click="setCount">set count</Button>
|
fdafcd2c
梁灏
Badge add text prop
|
24
25
26
27
|
<br><br>
<Badge text="hot">
<Button type="ghost">Hello</Button>
</Badge>
|
0823f88b
梁灏
Badge add status
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<br><br>
<div>
<Badge status="success" />
<Badge status="error" />
<Badge status="default" />
<Badge status="processing" />
<Badge status="warning" />
<br />
<Badge status="success" text="Success" />
<br />
<Badge status="error" text="Error" />
<br />
<Badge status="default" text="Default" />
<br />
<Badge status="processing" text="Processing" />
<br />
<Badge status="warning" text="Warning" />
</div>
|
457fe087
梁灏
update Badge style
|
46
47
48
49
50
51
52
53
54
|
<div style="margin: 50px">
<Badge dot>
<a href="//iviewui.com">我是一个链接</a>
</Badge>
<br><br>
<Badge :count="10" :offset="[-5, -5]">
<a href="//iviewui.com">我是一个链接</a>
</Badge>
</div>
|
cc27c42a
梁灏
Badge add type pr...
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<div>
<Badge :count="count" type="primary">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count" type="success">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count" type="normal">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count" type="info">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count" type="error">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count" type="warning">
<a href="#" class="demo-badge"></a>
</Badge>
<Badge :count="count">
<a href="#" class="demo-badge"></a>
</Badge>
</div>
|
15368be1
梁灏
Support Badge
|
78
79
80
81
82
83
|
</div>
</template>
<script>
export default {
props: {},
data () {
|
75c32564
Aresn
fixed #646
|
84
|
return {
|
fdafcd2c
梁灏
Badge add text prop
|
85
|
count: 5
|
75c32564
Aresn
fixed #646
|
86
|
};
|
15368be1
梁灏
Support Badge
|
87
|
},
|
75c32564
Aresn
fixed #646
|
88
89
90
91
92
|
methods: {
setCount () {
this.count = 10;
}
}
|
15368be1
梁灏
Support Badge
|
93
94
|
};
</script>
|