Skip to content

Commit

Permalink
docs: update docs with browser example
Browse files Browse the repository at this point in the history
  • Loading branch information
angeliski committed Aug 26, 2019
1 parent 5a7697b commit 3eee520
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ How we can make Tabulator better?

Welcome Vue-Tabulator.

## Getting Started
## Installation

Vue-tabulator is a wrapper to Tabulator, so you need to [install tabulator](http://tabulator.info/docs/4.2/install#sources-npm) to use vue-tabulator.

Expand Down Expand Up @@ -81,6 +81,47 @@ export default {
};
```

### Browser
You can import the vue-tabulator in your browser:

```html
<script src="https://unpkg.com/vue@latest"></script>

<link href="https://unpkg.com/tabulator-tables@4.4.1/dist/css/tabulator.min.css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/tabulator-tables@4.4.1/dist/js/tabulator.min.js"></script>
<script src="https://unpkg.com/vue-tabulator@latest"></script>

<div id="app">
<h1>Vue Tabulator</h1>
<Vue-Tabulator v-model="dados" :options="options" />
</div>


<script>
new Vue({
el: '#app',
data() {
return {
dados: [{
name: 'Teste',
age: 13
}],
options: {
columns: [{
title: 'Name',
field: 'name',
sorter: 'string',
width: 200,
editor: true,
}, ],
}
}
}
});
</script>

```

## Options

The options object can accept any [Tabulator options](http://tabulator.info/docs/4.2/options), which allows you to use the full power of Tabulator on start or configuration.
Expand Down

0 comments on commit 3eee520

Please sign in to comment.