1 | # @bbob/vue2
|
2 | [![install size](https://packagephobia.now.sh/badge?p=@bbob/vue2)](https://packagephobia.now.sh/result?p=@bbob/vue2) [![Known Vulnerabilities](https://snyk.io/test/github/JiLiZART/bbob/badge.svg?targetFile=packages%2Fbbob-vue2%2Fpackage.json)](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-vue2%2Fpackage.json)
|
3 |
|
4 | > Converts @bbob/parser AST tree to Vue 2
|
5 |
|
6 |
|
7 | ```shell
|
8 | npm i @bbob/vue2 @bbob/preset-vue
|
9 | ```
|
10 |
|
11 | ```js
|
12 | import Vue from 'vue'
|
13 | import VueBbob from '@bbob/vue2';
|
14 |
|
15 | Vue.use(VueBbob);
|
16 | ```
|
17 |
|
18 | ```html
|
19 | <template>
|
20 | <div class="vue2">
|
21 | <h2>Generated vue2 here</h2>
|
22 | <bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
|
23 | </div>
|
24 | </template>
|
25 | <script>
|
26 | import Vue from 'vue'
|
27 | import preset from '@bbob/preset-vue'
|
28 |
|
29 | export default Vue.extend({
|
30 | name: 'App',
|
31 | data() {
|
32 | return {
|
33 | bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
|
34 | plugins: [
|
35 | preset()
|
36 | ],
|
37 | }
|
38 | }
|
39 | })
|
40 | </script>
|
41 | ```
|