Skip to content
This repository was archived by the owner on Oct 24, 2019. It is now read-only.

Commit 458c9a6

Browse files
author
jung-han
committed
docs: change readme
1 parent f703d4b commit 458c9a6

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
> This is Vue component wrapping [TOAST UI Grid](https://github.com/nhn/tui.grid).
44
55
[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)
6-
[![github version](https://img.shields.io/github/release/nhnent/toast-ui.vue-grid.svg)](https://github.com/nhn/toast-ui.vue-grid/releases/latest)
6+
[![github version](https://img.shields.io/github/release/nhn/toast-ui.vue-grid.svg)](https://github.com/nhn/toast-ui.vue-grid/releases/latest)
77
[![npm version](https://img.shields.io/npm/v/@toast-ui/vue-grid.svg)](https://www.npmjs.com/package/@toast-ui/vue-grid)
8-
[![license](https://img.shields.io/github/license/nhnent/toast-ui.vue-grid.svg)](https://github.com/nhn/toast-ui.vue-grid/blob/master/LICENSE)
8+
[![license](https://img.shields.io/github/license/nhn/toast-ui.vue-grid.svg)](https://github.com/nhn/toast-ui.vue-grid/blob/master/LICENSE)
99
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg)](https://github.com/nhn/toast-ui.vue-grid/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
10-
[![code with hearth by NHN Entertainment](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN%20Entertainment-ff1414.svg)](https://github.com/nhn)
10+
[![code with hearth by NHN](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN-ff1414.svg)](https://github.com/nhn)
1111

1212
## 🚩 Table of Contents
13+
1314
* [Collect statistics on the use of open source](#collect-statistics-on-the-use-of-open-source)
15+
* [Documents](#-documents)
1416
* [Install](#-install)
1517
* [Using npm](#using-npm)
1618
* [Usage](#-usage)
@@ -20,7 +22,6 @@
2022
* [Event](#event)
2123
* [Method](#method)
2224
* [Pull Request Steps](#-pull-request-steps)
23-
* [Documents](#-documents)
2425
* [Contributing](#-contributing)
2526
* [License](#-license)
2627

@@ -35,6 +36,9 @@ var options = {
3536
}
3637
```
3738

39+
## 📙 Documents
40+
* [Getting Started](https://github.com/nhn/toast-ui.vue-grid/blob/master/docs/getting-started.md)
41+
3842
## 💾 Install
3943

4044
### Using npm
@@ -82,21 +86,23 @@ You can use Toast UI Grid for Vue as moudule format or namespace. Also you can u
8286
First insert `<grid>` in the template or html. `rowData` and `columnData` props are required.
8387

8488
```html
85-
<grid :rowData="rows" :columnData="columns" />
89+
<grid :rowData="options.rows" :columnData="options.columns" />
8690
```
8791

8892
Load grid component and then add it to the `components` in your component or Vue instance.
8993

94+
> Tui-grid has its own reactivity system, and does not use the reactivity system of vue. So, instead of adding props in the `data`, declare props in the `created` lifecycle method.
95+
9096
```js
9197
import 'tui-grid/dist/tui-grid.css'
9298
import { Grid } from '@toast-ui/vue-grid'
9399
94100
export default {
95101
components: {
96-
'grid': Grid
102+
'grid': Grid
97103
},
98-
data() {
99-
return {
104+
created() {
105+
this.options = {
100106
rows: [ // for rowData prop
101107
{
102108
name: 'Beautiful Lies',
@@ -106,14 +112,14 @@ export default {
106112
name: 'X',
107113
artist: 'Ed Sheeran'
108114
}
109-
],
110-
columns: [ // for columnData prop
115+
],
116+
columns: [ // for columnData prop
111117
{
112-
title: 'Name',
118+
header: 'Name',
113119
name: 'name',
114120
},
115121
{
116-
title: 'Artist',
122+
header: 'Artist',
117123
name: 'artist'
118124
}
119125
]
@@ -172,19 +178,16 @@ You can use `rowData`, `columnData`, `options`, `theme` and `language` props. Ex
172178
* mouseout : Occurs when a mouse pointer is moved off from the Grid.
173179
* mousedown : Occurs when a mouse button is downed on the Grid.
174180
* focusChange : Occurs when focused cell is about to change.
175-
* expanded : Occurs when the row having child rows is expanded.
176-
* expandedAll : Occurs when all rows having child rows are expanded.
177-
* collapsed : Occurs when the row having child rows is collapsed.
178-
* collapsedAll : Occurs when all rows having child rows are expanded.
181+
* expande : Occurs when the row having child rows is expanded.
182+
* collapse : Occurs when the row having child rows is collapsed.
179183
* beforeRequest : Occurs before the http request is sent.
180184
* response : Occurs when the response is received from the server.
181185
* successResponse : Occurs after the response event, if the result is true.
182186
* failResponse : Occurs after the response event, if the result is false.
183187
* errorResponse : Occurs after the response event, if the response is Error.
184188
* selection : Occurs when selecting cells.
185-
* deleteRange : Occurs when cells are deleted by 'del' key.
186189

187-
For more information such as the parameters of each event, see [event of tui.grid](https://nhnent.github.io/tui.grid/api/Grid.html). Example of event is in the [Getting Started](https://github.com/nhnent/toast-ui.vue-grid/blob/master/docs/getting-started.md#event).
190+
For more information such as the parameters of each event, see [event of tui.grid](https://nhn.github.io/tui.grid/latest/Grid). Example of event is in the [Getting Started](https://github.com/nhn/toast-ui.vue-grid/blob/master/docs/getting-started.md#event).
188191

189192
### Method
190193

@@ -241,9 +244,6 @@ If it has no error, commit and then push it!
241244
242245
For more information on PR's step, please see links of Contributing section.
243246

244-
## 📙 Documents
245-
* [Getting Started](https://github.com/nhn/toast-ui.vue-grid/blob/master/docs/getting-started.md)
246-
247247
## 💬 Contributing
248248
* [Code of Conduct](https://github.com/nhn/toast-ui.vue-grid/blob/master/CODE_OF_CONDUCT.md)
249249
* [Contributing guideline](https://github.com/nhn/toast-ui.vue-grid/blob/master/CONTRIBUTING.md)

docs/getting-started.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ export default {
9090
],
9191
columns: [ // for columnData prop
9292
{
93-
title: 'Name',
93+
header: 'Name',
9494
name: 'name',
9595
},
9696
{
97-
title: 'Artist',
97+
header: 'Artist',
9898
name: 'artist'
9999
}
100100
]
@@ -144,11 +144,11 @@ You can use `rowData`, `columnData`, `options`, `theme` and `language` props.
144144
],
145145
columns: [ // for columnData prop
146146
{
147-
title: 'Name',
147+
header: 'Name',
148148
name: 'name',
149149
},
150150
{
151-
title: 'Artist',
151+
header: 'Artist',
152152
name: 'artist'
153153
}
154154
]

0 commit comments

Comments
 (0)