@@ -15,8 +15,7 @@ npm i vue bootstrap-vue bootstrap
15
15
yarn add vue bootstrap-vue bootstrap
16
16
```
17
17
18
- Then, register BootstrapVue plugin in your app entry point (note that this installs ** all**
19
- BootstrapVue components and directives):
18
+ Then, register BootstrapVue plugin in your app entry point:
20
19
21
20
``` js
22
21
// app.js
@@ -67,8 +66,7 @@ yarn add bootstrap-vue
67
66
68
67
Add ` bootstrap-vue/nuxt ` to modules section of ** nuxt.config.js** .
69
68
70
- This will include both ` boostrap.css ` and ` bootstrap-vue.css ` default CSS, as well as all
71
- components and directives.
69
+ This will include both ` boostrap.css ` and ` bootstrap-vue.css ` default CSS.
72
70
73
71
``` js
74
72
{
@@ -238,41 +236,23 @@ You can also import component groups and directives as Vue plugins by importing
238
236
or directive directory:
239
237
240
238
``` js
241
- // This imports all the layout components such as <b-container>, <b-row>, <b-col>
239
+ // This imports all the layout components such as <b-container>, <b-row>, <b-col>:
242
240
import { Layout } from ' bootstrap-vue/es/components'
243
241
Vue .use (Layout)
244
242
245
- // This imports <b-modal> as well as the v-b-modal directive as a plugin
243
+ // This imports <b-modal> as well as the v-b-modal directive as a plugin:
246
244
import { Modal } from ' bootstrap-vue/es/components'
247
245
Vue .use (Modal)
248
246
249
- // This imports <b-card> along with all the <b-card-*> sub-components as a plugin
247
+ // This imports <b-card> along with all the <b-card-*> sub-components as a plugin:
250
248
import { Card } from ' bootstrap-vue/es/components'
251
249
Vue .use (Card)
252
250
253
- // This imports directive v-b-scrollspy as a plugin
251
+ // This imports directive v-b-scrollspy as a plugin:
254
252
import { Scrollspy } from ' bootstrap-vue/es/directives'
255
253
Vue .use (Scrollspy)
256
254
```
257
255
258
- Alternatively, you can import Plugins as follows:
259
-
260
- ``` js
261
- import BootstrapVue from ' bootstrap-vue'
262
-
263
- // This enables all the layout components such as <b-container>, <b-row>, <b-col>
264
- Vue .use (BootstrapVue .componentPlugins .Layout )
265
-
266
- // This enables <b-modal> as well as the v-b-modal directive
267
- Vue .use (BootstrapVue .componentPlugins .Modal )
268
-
269
- // This imports <b-card> along with all the <b-card-*> sub-components
270
- Vue .use (BootstrapVue .componentPlugins .Card )
271
-
272
- // This enables directive v-b-scrollspy
273
- Vue .use (BootstrapVue .directivePlugins .Scrollspy )
274
- ```
275
-
276
256
When importing as plugins, all subcomponents and related directives are imported in most cases. i.e.
277
257
When importing ` <b-nav> ` , all the ` <nav-*> ` sub components are also included, as well all dropdown
278
258
sub components. Component shorthand aliases (if any) are also included in the plugin.
0 commit comments