Skip to content

Commit a66f4c0

Browse files
committed
remove internal repo
1 parent 0feaa60 commit a66f4c0

11 files changed

+733
-2
lines changed

deploy-docs.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env sh
2+
3+
# abort on errors
4+
set -e
5+
6+
# build
7+
npm run docs:build
8+
9+
# navigate into the build output directory
10+
cd docs/.vuepress/dist
11+
12+
# if you are deploying to a custom domain
13+
# echo 'www.example.com' > CNAME
14+
15+
git init
16+
git add -A
17+
git commit -m 'deploy'
18+
19+
# if you are deploying to https://<USERNAME>.github.io
20+
# git push -f [email protected]:<USERNAME>/<USERNAME>.github.io.git master
21+
22+
# if you are deploying to https://<USERNAME>.github.io/<REPO>
23+
git push -f [email protected]:xaksis/vue-good-table.git master:gh-pages
24+
25+
cd -
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<template>
2+
<div>
3+
<vue-good-table
4+
:columns="columns"
5+
:rows="rows">
6+
<template slot="table-row" slot-scope="props">
7+
<span v-if="props.column.field == 'before'">
8+
before
9+
</span>
10+
<span v-else-if="props.column.field == 'after'">
11+
after
12+
</span>
13+
<span v-else>
14+
{{props.formattedRow[props.column.field]}}
15+
</span>
16+
</template>
17+
</vue-good-table>
18+
</div>
19+
</template>
20+
21+
<script>
22+
export default {
23+
name: 'before-after-columns',
24+
props: [],
25+
data() {
26+
return {
27+
columns: [
28+
{
29+
label: 'Before',
30+
field: 'before',
31+
},
32+
{
33+
label: 'Name',
34+
field: 'name',
35+
},
36+
{
37+
label: 'Age',
38+
field: 'age',
39+
type: 'number',
40+
},
41+
{
42+
label: 'Created On',
43+
field: 'createdAt',
44+
type: 'date',
45+
dateInputFormat: 'YYYY-MM-DD',
46+
dateOutputFormat: 'MMM Do YY',
47+
},
48+
{
49+
label: 'Percent',
50+
field: 'score',
51+
type: 'percentage',
52+
},
53+
{
54+
label: 'After',
55+
field: 'after',
56+
}
57+
],
58+
rows: [
59+
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
60+
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
61+
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
62+
],
63+
};
64+
},
65+
computed: {
66+
},
67+
methods: {
68+
},
69+
mounted () {
70+
},
71+
components: {
72+
},
73+
};
74+
</script>
75+
76+
<style>
77+
table{
78+
display: table;
79+
margin: 0;
80+
}
81+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<template>
2+
<div>
3+
<vue-good-table
4+
@on-select-all="selectAll"
5+
@on-row-click="toggleSelectRow"
6+
:columns="columns"
7+
:rows="rows"
8+
:select-options="{ enabled: true }"
9+
:search-options="{ enabled: true }">
10+
</vue-good-table>
11+
</div>
12+
</template>
13+
14+
<script>
15+
export default {
16+
name: 'checkbox-table',
17+
props: [],
18+
data() {
19+
return {
20+
columns: [
21+
{
22+
label: 'Name',
23+
field: 'name',
24+
},
25+
{
26+
label: 'Age',
27+
field: 'age',
28+
type: 'number',
29+
},
30+
{
31+
label: 'Created On',
32+
field: 'createdAt',
33+
type: 'date',
34+
dateInputFormat: 'YYYY-MM-DD',
35+
dateOutputFormat: 'MMM Do YY',
36+
},
37+
{
38+
label: 'Percent',
39+
field: 'score',
40+
type: 'percentage',
41+
},
42+
],
43+
rows: [
44+
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
45+
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
46+
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
47+
],
48+
};
49+
},
50+
computed: {
51+
},
52+
methods: {
53+
selectAll(params) {
54+
// do what you want here
55+
console.log(params);
56+
},
57+
toggleSelectRow(params) {
58+
// row that was clicked
59+
console.log(params);
60+
}
61+
},
62+
mounted() {
63+
},
64+
components: {
65+
},
66+
};
67+
</script>
68+
69+
<style>
70+
table{
71+
display: table;
72+
margin: 0;
73+
}
74+
</style>
+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<template>
2+
<div>
3+
<vue-good-table
4+
:columns="columns"
5+
:rows="rows">
6+
<template slot="table-row" slot-scope="props">
7+
<span v-if="props.column.field == 'age'">
8+
<span style="font-weight: bold; color: blue;">{{props.row.age}}</span>
9+
</span>
10+
<span v-else>
11+
{{props.formattedRow[props.column.field]}}
12+
</span>
13+
</template>
14+
</vue-good-table>
15+
</div>
16+
</template>
17+
18+
<script>
19+
export default {
20+
name: 'custom-row',
21+
props: [],
22+
data() {
23+
return {
24+
columns: [
25+
{
26+
label: 'Name',
27+
field: 'name',
28+
},
29+
{
30+
label: 'Age',
31+
field: 'age',
32+
type: 'number',
33+
},
34+
{
35+
label: 'Created On',
36+
field: 'createdAt',
37+
type: 'date',
38+
dateInputFormat: 'YYYY-MM-DD',
39+
dateOutputFormat: 'MMM Do YY',
40+
},
41+
{
42+
label: 'Percent',
43+
field: 'score',
44+
type: 'percentage',
45+
},
46+
],
47+
rows: [
48+
{ id:1, name:"John", age: 20, createdAt: '201-10-31:9: 35 am',score: 0.03343 },
49+
{ id:2, name:"Jane", age: 24, createdAt: '2011-10-31', score: 0.03343 },
50+
{ id:3, name:"Susan", age: 16, createdAt: '2011-10-30', score: 0.03343 },
51+
],
52+
};
53+
},
54+
computed: {
55+
},
56+
methods: {
57+
},
58+
mounted () {
59+
},
60+
components: {
61+
},
62+
};
63+
</script>
64+
65+
<style>
66+
table{
67+
display: table;
68+
}
69+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<template>
2+
<div>
3+
<vue-good-table
4+
:columns="columns"
5+
:rows="rows"
6+
:group-options="options"
7+
:search-options="{
8+
enabled: true,
9+
}">
10+
</vue-good-table>
11+
</div>
12+
</template>
13+
14+
<script>
15+
export default {
16+
name: 'grouped-table',
17+
props: ['options'],
18+
data() {
19+
return {
20+
columns: [
21+
{
22+
label: 'Name',
23+
field: 'name',
24+
},
25+
{
26+
label: 'Diet',
27+
field: 'diet',
28+
type: 'text',
29+
},
30+
{
31+
label: 'Count',
32+
field: 'count',
33+
type: 'number',
34+
},
35+
],
36+
rows: [
37+
{
38+
mode: 'span',
39+
label: 'Mammal',
40+
children: [
41+
{ name: 'Elephant', diet: 'herbivore', count: 5 },
42+
{ name: 'Cat', diet: 'carnivore', count: 28 },
43+
],
44+
},
45+
{
46+
mode: 'span',
47+
label: 'Reptiles',
48+
children: [
49+
{ name: 'Snake', diet: 'carnivore', count: 40 },
50+
{ name: 'lizard', diet: 'insectivore', count: 34 },
51+
],
52+
},
53+
{
54+
mode: 'span',
55+
label: 'Fish',
56+
children: [
57+
{ name: 'Shark', diet: 'carnivore', count: 2 },
58+
{ name: 'koi', diet: 'omnivore', count: 14 },
59+
],
60+
},
61+
],
62+
};
63+
},
64+
computed: {
65+
},
66+
methods: {
67+
},
68+
mounted() {
69+
},
70+
components: {
71+
},
72+
};
73+
</script>
74+
75+
<style>
76+
table{
77+
display: table;
78+
margin: 0;
79+
}
80+
tr {
81+
border-top: none;
82+
}
83+
tr:nth-child(2n) {
84+
background-color: transparent;
85+
}
86+
th, td {
87+
border: none;
88+
padding: auto auto;
89+
}
90+
</style>

docs/.vuepress/config.js

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
22
title: 'vue-good-table',
33
description: 'A powerful and easy to use data table plugin for VueJS',
4+
base: '/vue-good-table/',
45
themeConfig: {
56
repo: 'xaksis/vue-good-table',
67
sidebar: {
@@ -25,6 +26,16 @@ module.exports = {
2526
'/guide/configuration/column-filter-options',
2627
]
2728
},
29+
{
30+
title: 'Avanced Configuration',
31+
collapsable: false,
32+
children: [
33+
'/guide/advanced/',
34+
'/guide/advanced/checkbox-table',
35+
'/guide/advanced/grouped-table',
36+
'/guide/advanced/remote-workflow',
37+
]
38+
},
2839
{
2940
title: 'Style Configuration',
3041
collapsable: false,

0 commit comments

Comments
 (0)