mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-08 17:22:26 +03:00
a05e5cef07
* chore: update readme to latest API * chore: release 2.9.0
42 lines
991 B
Markdown
42 lines
991 B
Markdown
# @bbob/vue2
|
|
[](https://packagephobia.now.sh/result?p=@bbob/vue2) [](https://snyk.io/test/github/JiLiZART/bbob?targetFile=packages%2Fbbob-vue2%2Fpackage.json)
|
|
|
|
> Converts @bbob/parser AST tree to Vue 2
|
|
|
|
|
|
```shell
|
|
npm i @bbob/vue2 @bbob/preset-vue
|
|
```
|
|
|
|
```js
|
|
import Vue from 'vue'
|
|
import VueBbob from '@bbob/vue2';
|
|
|
|
Vue.use(VueBbob);
|
|
```
|
|
|
|
```html
|
|
<template>
|
|
<div class="vue2">
|
|
<h2>Generated vue2 here</h2>
|
|
<bbob-bbcode container="div" :plugins="plugins">{{ bbcode }}</bbob-bbcode>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import Vue from 'vue'
|
|
import preset from '@bbob/preset-vue'
|
|
|
|
export default Vue.extend({
|
|
name: 'App',
|
|
data() {
|
|
return {
|
|
bbcode: 'Text [b]bolded[/b] and [i]Some Name[/i]',
|
|
plugins: [
|
|
preset()
|
|
],
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
```
|