forked from jigneshbhimani/VueJs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path21Bootstrap.txt
69 lines (47 loc) · 2.01 KB
/
21Bootstrap.txt
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
Add Bootstrap with vue
- install bootstrap
- Make new component
- Try some bootstrap
1) Install bootstrap
vue add bootstrap-vue
Use babel/polyfill? - Yes
2) Make a new component
- src/components/ActiveBoot.vue:
<template>
<h1>Active Boot Component</h1>
// Bootstrap Button
<div> // https://bootstrap-vue.org/docs/components/button
<b-button>Button</b-button>
<b-button variant="danger">Button</b-button>
<b-button variant="success">Button</b-button>
<b-button variant="outline-primary">Button</b-button>
</div>
// Input Groups
<div> // https://bootstrap-vue.org/docs/components/input-group
<!-- Using props -->
<b-input-group size="lg" prepend="$" append=".00">
<b-form-input></b-form-input>
</b-input-group>
<!-- Using slots -->
<b-input-group class="mt-3">
<template #append>
<b-input-group-text><strong class="text-danger">!</strong></b-input-group-text>
</template>
<b-form-input></b-form-input>
</b-input-group>
<!-- Using components -->
<b-input-group prepend="Username" class="mt-3">
<b-form-input></b-form-input>
<b-input-group-append>
<b-button variant="outline-success">Button</b-button>
<b-button variant="info">Button</b-button>
</b-input-group-append>
</b-input-group>
</div>
</template>
<script>
export default {
name: 'ActiveBoot',
}
</script>
3) Import ActiveBoot component in App.vue file