You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-20Lines changed: 17 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,15 +39,15 @@ Vue.use(GridGlobal)
39
39
40
40
## Usage
41
41
42
-
Pass `cols` (an array of column headers) and either `rows`, `from`, or `server` as a data source to the component. Everything else is optional. Pass in new data to update the table.
42
+
Pass `columns` (an array of column headers) and either `rows`, `from`, or `server` as a data source to the component. Everything else is optional. Pass in new data to update the table.
43
43
44
44
Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific configuration options. This module may lag behind the main Grid.js module somewhat, so check the API version badge at the top of this README.
45
45
46
46
### Basic Example
47
47
48
48
```html
49
49
<template>
50
-
<grid:cols="cols":rows="rows"></grid>
50
+
<grid:columns="columns":rows="rows"></grid>
51
51
</template>
52
52
53
53
<script>
@@ -60,7 +60,7 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
60
60
},
61
61
data() {
62
62
return {
63
-
cols: ['Make', 'Model', 'Year', 'Color'],
63
+
columns: ['Make', 'Model', 'Year', 'Color'],
64
64
rows: [
65
65
['Ford', 'Fusion', '2011', 'Silver'],
66
66
['Chevrolet', 'Cruz', '2018', 'White']
@@ -76,16 +76,16 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
76
76
```json
77
77
{
78
78
"autoWidth": true,
79
-
"classNames": undefined,
80
-
"cols": [""],
79
+
"className": undefined,
80
+
"columns": [""],
81
81
"from": undefined,
82
82
"language": undefined,
83
83
"pagination": false,
84
84
"rows": undefined,
85
85
"search": false,
86
86
"server": undefined,
87
87
"sort": false,
88
-
"styles": undefined,
88
+
"style": undefined,
89
89
"theme": "mermaid",
90
90
"width": "100%"
91
91
}
@@ -97,16 +97,16 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
97
97
<template>
98
98
<grid
99
99
:auto-width="autoWidth"
100
-
:class-names="classNames"
101
-
:cols="cols"
100
+
:class-name="className"
101
+
:columns="columns"
102
102
:from="from"
103
103
:language="language"
104
104
:pagination="pagination"
105
105
:rows="rows"
106
106
:search="search"
107
107
:server="server"
108
108
:sort="sort"
109
-
:styles="styles"
109
+
:style="style"
110
110
:width="width"
111
111
></grid>
112
112
</template>
@@ -124,11 +124,10 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
124
124
// REQUIRED:
125
125
126
126
// An array containing strings of column headers
127
-
// `columns` in the Grid.js API
128
-
cols: ['col 1', 'col 2'],
127
+
columns: ['col 1', 'col 2'],
129
128
130
129
// OR an array containing objects defining column headers
131
-
cols: [
130
+
columns: [
132
131
{
133
132
name:'Column 1',
134
133
id:'col1'
@@ -189,8 +188,7 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
189
188
autoWidth:true/false,
190
189
191
190
// Object with CSS class names
192
-
// `className` in the Grid.js API
193
-
classNames: {},
191
+
className: {},
194
192
195
193
// Localization dictionary object
196
194
language: {},
@@ -205,11 +203,10 @@ Refer to [Grid.js documentation](https://gridjs.io/docs/config/) for specific co
205
203
sort:true/false|| {},
206
204
207
205
// Object with CSS styles
208
-
// `style` in the Grid.js API
209
-
styles: {},
206
+
style: {},
210
207
211
208
// String with name of theme or 'none' to disable
212
-
theme:'mermaid',
209
+
theme:'mermaid'||'none',
213
210
214
211
// String with css width value
215
212
width:'100%',
@@ -240,7 +237,7 @@ Renders a [Preact virtual DOM instance](https://gridjs.io/docs/examples/virtual-
240
237
Usage:
241
238
242
239
```js
243
-
this.cols= [
240
+
this.columns= [
244
241
{
245
242
name:'Actions',
246
243
formatter: (cell, row) => {
@@ -263,7 +260,7 @@ Renders [HTML in a formatter function](https://gridjs.io/docs/examples/html-cell
0 commit comments