Skip to content

Commit

Permalink
new docs getting there
Browse files Browse the repository at this point in the history
  • Loading branch information
xaksis committed Jun 17, 2018
1 parent 059e634 commit 0feaa60
Show file tree
Hide file tree
Showing 19 changed files with 5,053 additions and 218 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ node_modules/
*.log
dev
src
docs
.babelrc
64 changes: 64 additions & 0 deletions docs/.vuepress/components/basic-table.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<template>
<div>
<vue-good-table
:columns="columns"
:rows="rows">
</vue-good-table>
</div>
</template>

<script>
export default {
name: 'basic-table',
props: [],
data() {
return {
columns: [
{
label: 'Name',
field: 'name',
},
{
label: 'Age',
field: 'age',
type: 'number',
},
{
label: 'Created On',
field: 'createdAt',
type: 'date',
dateInputFormat: 'YYYY-MM-DD',
dateOutputFormat: 'MMM Do YY',
},
{
label: 'Percent',
field: 'score',
type: 'percentage',
},
],
rows: [
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
{ id:4, name:"Chris", age: 55, createdAt: '2011-10-11', score: 0.03343 },
{ id:5, name:"Dan", age: 40, createdAt: '2011-10-21', score: 0.03343 },
{ id:6, name:"John", age: 20, createdAt: '2011-10-31', score: 0.03343 },
],
};
},
computed: {
},
methods: {
},
mounted () {
},
components: {
},
};
</script>

<style>
table{
display: table;
}
</style>
76 changes: 76 additions & 0 deletions docs/.vuepress/components/theme-example.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<template>
<div>
<vue-good-table
:columns="columns"
:rows="rows"
:styleClass="styleClasses"
:theme="theme">
</vue-good-table>
</div>
</template>

<script>
export default {
name: 'theme-table',
props: ['theme', 'styleClasses'],
data() {
return {
columns: [
{
label: 'Name',
field: 'name',
filterOptions: {
enabled: true,
}
},
{
label: 'Age',
field: 'age',
type: 'number',
},
{
label: 'Created On',
field: 'createdAt',
type: 'date',
dateInputFormat: 'YYYY-MM-DD',
dateOutputFormat: 'MMM Do YY',
},
{
label: 'Percent',
field: 'score',
type: 'percentage',
},
],
rows: [
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
],
};
},
computed: {
},
methods: {
},
mounted () {
},
components: {
},
};
</script>

<style>
table{
display: table;
}
tr {
border-top: none;
}
tr:nth-child(2n) {
background-color: transparent;
}
th, td {
border: none;
padding: auto auto;
}
</style>
39 changes: 39 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module.exports = {
title: 'vue-good-table',
description: 'A powerful and easy to use data table plugin for VueJS',
themeConfig: {
repo: 'xaksis/vue-good-table',
sidebar: {
'/guide/': [
{
title: 'Introduction',
collapsable: false,
children: [
'',
]
},
{
title: 'Configuration',
collapsable: false,
children: [
'/guide/configuration/',
'/guide/configuration/table-events',
'/guide/configuration/search-options',
'/guide/configuration/sort-options',
'/guide/configuration/pagination-options',
'/guide/configuration/column-options',
'/guide/configuration/column-filter-options',
]
},
{
title: 'Style Configuration',
collapsable: false,
children: [
'/guide/style-configuration/',
'/guide/style-configuration/style-classes',
]
},
],
},
}
}
11 changes: 11 additions & 0 deletions docs/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import VueGoodTable from '../../src';

export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
}) => {
// ...apply enhancements to the app
Vue.use(VueGoodTable);
}
Binary file added docs/.vuepress/public/vgt-table.regular.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
home: true
heroImage: /vgt-table.regular.png
actionText: Get Started →
actionLink: /guide/
features:
- title: Simple to Use
details: You get features like sorting / filtering / paging with minimal setup.
- title: Advanced Customizations
details: Easily customize anything from table cells to column headers.
- title: Performant
details: Creating performant client side tables has never been easier.
footer: MIT Licensed | Copyright © 2018-present Akshay Anand
---
87 changes: 87 additions & 0 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

# Getting Started

## Installation

Install with npm:

```bash
npm install --save vue-good-table
```

Import globally in app:

```javascript
import VueGoodTable from 'vue-good-table';

// import the styles
import 'vue-good-table/dist/vue-good-table.css'

Vue.use(VueGoodTable);
```

Import into your component
```js
import VueGoodTable from 'vue-good-table';

// add to component
components: {
'vue-good-table': VueGoodTable,
}
```


## Basic Example

<basic-table/>

```vue
<template>
<div>
<vue-good-table
:columns="columns"
:rows="rows"/>
</div>
</template>
<script>
export default {
name: 'my-component',
data(){
return {
columns: [
{
label: 'Name',
field: 'name',
},
{
label: 'Age',
field: 'age',
type: 'number',
},
{
label: 'Created On',
field: 'createdAt',
type: 'date',
dateInputFormat: 'YYYY-MM-DD',
dateOutputFormat: 'MMM Do YY',
},
{
label: 'Percent',
field: 'score',
type: 'percentage',
},
],
rows: [
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
{ id:4, name:"Chris", age: 55, createdAt: '2011-10-11', score: 0.03343 },
{ id:5, name:"Dan", age: 40, createdAt: '2011-10-21', score: 0.03343 },
{ id:6, name:"John", age: 20, createdAt: '2011-10-31', score: 0.03343 },
],
};
},
};
</script>
```
Loading

0 comments on commit 0feaa60

Please sign in to comment.