forked from thomasbertet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBadgesView.vue
executable file
·72 lines (71 loc) · 2.82 KB
/
BadgesView.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
<template lang="pug">
component-view(v-bind:doc="doc" id="badges-view")
</template>
<script>
export default {
data () {
return {
doc: {
title: 'Badge directive',
edit: 'Badges',
directive: 'badge',
desc: `
<p>
Badge directives can be applied to any element using the <code>v-badge</code> directive. By default, a badge will use the application's defined <strong class="primary--text">primary color</strong>. Parameters can be passed using the arg, <code>v-badge:arg</code>, modifier, <code>v-badge:2.modifier</code>, or by passing an object by expression, <code>v-badge="{ value: 2, overlap: true }"</code>
</p>
<p>
The color can be changed by using the color--after helper class, or by apply a class that modifies the background of the badged elements <strong>:after</strong> pseudo-selector.
</p>`,
examples: [
{ header: 'Character', file: 'badges/1', desc: 'Any character can be placed with a badge.' },
{ header: 'Icon', file: 'badges/2', desc: 'The icon badge type only supports Material Design icons.' },
{ header: 'Inline', file: 'badges/3', desc: 'Badges can also be placed inline with text.' },
{ header: 'Visibility', file: 'badges/4', desc: 'The visibility of badges can be controlled either by setting the object property <code>visible</code> to <code>false</code>, or setting the entire object to either <code>false</code> or <code>null</code>.' }
],
props: {
'v-badge': {
params: [
[
'v-badge:arg.icon',
'Boolean',
'False',
'Specifies the use of an icon'
],
[
'v-badge:arg.left',
'Boolean',
'False',
'Positions the badge to the left of the element'
],
[
'v-badge:arg.overlap',
'Boolean',
'False',
'Overlaps badge on element'
],
[
'v-badge:arg.right',
'Boolean',
'False',
'Positions the badge to the right of the element'
],
[
'v-badge:arg.bottom',
'Boolean',
'False',
'Positions the badge to the bottom of the element'
],
[
'visible',
'Boolean',
'False',
'Badge object property for determining visibility, see example #4'
]
]
}
}
}
}
}
}
</script>