Skip to content

Commit f9956d6

Browse files
committed
docs: add vue3 related info
1 parent 8070787 commit f9956d6

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed

docs/components/header.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<div class="navbar-nav-scroll">
3232
<b-navbar-nav class="bd-navbar-nav flex-row">
3333
<b-nav-item to="/docs" active-class="active" exact no-prefetch>Docs</b-nav-item>
34+
<b-nav-item to="/vue3" active-class="active" exact no-prefetch>Vue.js 3</b-nav-item>
3435
<b-nav-item to="/docs/components" active-class="active" no-prefetch>Components</b-nav-item>
3536
<b-nav-item to="/docs/directives" active-class="active" no-prefetch>Directives</b-nav-item>
3637
<b-nav-item to="/docs/icons" active-class="active" no-prefetch>Icons</b-nav-item>

docs/markdown/intro/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ v{{ bootstrapVersionMajor }} CSS. Good starting points for these:
4444

4545
In many of the examples shown in BootstrapVue's documentation, you may see the use of CSS classes
4646
such as <code class="text-nowrap">ml-2</code>, <code class="text-nowrap">py-1</code>, etc. These are
47-
Bootstrap v{{bootstrapVersionMinor}} utility classes that help control padding, margins, positioning,
48-
and more. You can find information on these classes in the
47+
Bootstrap v{{bootstrapVersionMinor}} utility classes that help control padding, margins,
48+
positioning, and more. You can find information on these classes in the
4949
[Utility Classes](/docs/reference/utility-classes) reference section.
5050

5151
Many of the examples in this documentation are _live_ and can be edited in-place for an enhanced

docs/pages/index.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<b-col tag="aside" cols="12" md="4" order-md="2" class="logo-aside mb-4 mb-md-0">
88
<BvLogo></bvLogo>
99
</b-col>
10-
1110
<b-col tag="header" cols="12" md="8" order-md="1">
1211
<h1 class="mb-3 text-center text-md-left bd-text-purple-bright">
1312
Bootstrap<span class="text-vue-green">Vue</span>

docs/pages/vue3.vue

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<template>
2+
<b-container id="content" fluid="lg" tag="main" class="py-5">
3+
<header class="pb-4 bd-content">
4+
<h1>Vue.js 3.x initial support</h1>
5+
<p class="bd-lead">
6+
BootstrapVue meets <code class="text-nowrap" translate="no">@vue-compat</code>!
7+
</p>
8+
</header>
9+
<section class="bd-content">
10+
With the release of <b>v2.23.0</b> you can now use <span class="bd-text-purple-bright">BootstrapVue</span> with <a href="https://v3-migration.vuejs.org/migration-build.html" target="_blank">migration build</a> of Vue.js 3
11+
12+
<b-alert show variant="warning" class="mt-3">
13+
@vue/compat support is designed for early migration to Vue.js 3 and will be eventually replaced with bootstrap-vue 3.0
14+
</b-alert>
15+
<h2 id="limitations" class="bv-no-focus-ring mb-3">
16+
<span class="bd-content-title">Important limitations<a href="#prerequisites" aria-labelledby="limitations" class="anchorjs-link"></a></span>
17+
</h2>
18+
<p><code class="text-nowrap" translate="no">@vue-compat</code> support is currently limited to <code class="text-nowrap" translate="no">{ MODE: 2 }</code> configuration both for compiler and Vue.js itself.
19+
You can find more details in <a href="https://v3-migration.vuejs.org/migration-build.html#compat-configuration" target="_blank">compat configuration</a> section of migration guide.
20+
</p>
21+
<p>That means that you can manually configure each your component with <code class="text-nowrap" translate="no">{ compatConfig: { MODE: 3 }}</code> to be ready for switching to Vue.js 3, however global configuration should be kept in legacy mode in order for all BootstrapVue functions to work</p>
22+
23+
<pre class="hljs language-html text-monospace p-2 notranslate" translate="no">{{ cmpCode }}</pre>
24+
25+
26+
<h2 id="start" class="bv-no-focus-ring">
27+
<span class="bd-content-title">Getting started<a href="#prerequisites" aria-labelledby="start" class="anchorjs-link"></a></span>
28+
</h2>
29+
30+
<ul>
31+
<li>Configure your application according to <a target="_blank" href="https://v3-migration.vuejs.org/migration-build.html#upgrade-workflow">upgrade workflow</a></li>
32+
<li>Upgrade bootstrap-vue to <b>v2.23.0</b> or higher</li>
33+
<li>Make sure you're still on bootstrap <b>v4</b></li>
34+
</ul>
35+
36+
<p>You can use this <a href="https://stackblitz.com/edit/bootstrap-vue-with-compat">sandbox</a> for reference or reporting issues with @vue/compat</p>
37+
38+
</section>
39+
</b-container>
40+
</template>
41+
42+
<script>
43+
import hljs from '../utils/hljs'
44+
45+
export default {
46+
head() {
47+
const title = `Vue.js 3 support | BootstrapVue`
48+
return {
49+
title
50+
}
51+
},
52+
computed: {
53+
cmpCode() {
54+
return [
55+
`<template>...</template>`,
56+
`<script>`,
57+
`export default {`,
58+
` data() { /* ... */ },`,
59+
``,
60+
` // This will disable all Vue.js 2 legacy features for your component`,
61+
` compatConfig: { MODE: 3 }`,
62+
``,
63+
` // ... rest of your component configuration ... `,
64+
`}`,
65+
// eslint-disable-next-line no-useless-escape
66+
`<\/script>`
67+
].join('\n')
68+
}
69+
},
70+
mounted() {
71+
// Highlight code blocks
72+
;[...this.$el.querySelectorAll('pre.hljs')].forEach(pre => {
73+
hljs.highlightBlock(pre)
74+
})
75+
}
76+
}
77+
</script>

0 commit comments

Comments
 (0)