Permalink
Browse files

init online-demo page.

  • Loading branch information...
Galen
Galen committed Sep 3, 2016
1 parent 52ecdd4 commit 413b614e39dd7eefdcf082c0af07907c874f3dcd
Showing with 6,689 additions and 3 deletions.
  1. +1 −3 .babelrc
  2. +3 −0 doc/.babelrc
  3. +6,523 −0 doc/build/app.js
  4. +12 −0 doc/index.html
  5. +82 −0 doc/main.js
  6. +38 −0 doc/package.json
  7. +30 −0 doc/webpack.config.js
View
@@ -1,5 +1,3 @@
{
"presets": ["es2015", "stage-2"],
"plugins": ["transform-runtime"],
"comments": false
"presets": ["es2015"]
}
View
@@ -0,0 +1,3 @@
{
"presets": ["es2015"]
}
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Vue Datatable</title>
</head>
<body>
<data-table :data-table="tableData"></data-table>
<script src="build/app.js"></script>
</body>
</html>
View
@@ -0,0 +1,82 @@
import Vue from 'vue';
import DataTable from '../src/DataTable.vue';
import Chance from 'chance';
(function(){
new Vue({
el: 'body',
data: {
tableData: {
options: {
sortable: true,
editable: true,
pageCount: 10
},
columns: [
{
value: 'id',
text: 'ID',
sortable: true,
editable: false
},
{
value: 'name',
text: 'Name',
sortable: true,
editable: true
},
{
value: 'age',
text: 'Age',
sortable: true,
editable: true
},
{
value: 'sex',
text: 'Sex',
sortable: true,
editable: true
}
],
rows: []
}
},
ready() {
const chance = new Chance();
const length = chance.integer({min: 0, max: 1000});
for(let i = 0; i < length; i++) {
const obj = {
id: {
value: i + 1,
},
name: {
value: chance.name(),
editable: chance.bool()
},
age: {
value: chance.age(),
editable: chance.bool()
},
sex: {
value: chance.gender(),
editable: chance.bool
}
}
this.tableData.rows.push(obj);
}
},
components: {
DataTable
}
});
})();
View
@@ -0,0 +1,38 @@
{
"name": "vue-datatable-doc",
"version": "1.0.0",
"description": "demo of vue-datatable",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"vue-datatable",
"demo"
],
"author": "Galen",
"license": "MIT",
"dependencies": {
"babel-runtime": "^6.11.6",
"chance": "^1.0.4",
"mockjs": "^1.0.1-beta3",
"vue": "^1.0.26",
"vue-datatable": "^1.0.1"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^6.0.0",
"babel-plugin-transform-es2015-arrow-functions": "^6.8.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.0.0",
"babel-preset-stage-2": "^6.0.0",
"babel-register": "^6.0.0",
"css-loader": "^0.23.0",
"node-sass": "^3.8.0",
"sass-loader": "^4.0.0",
"vue-html-loader": "^1.2.3",
"vue-loader": "^8.3.0",
"vue-style-loader": "^1.0.0",
"webpack": "^1.12.2"
}
}
View
@@ -0,0 +1,30 @@
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: './main.js',
output: {
path: path.resolve(__dirname, './build'),
filename: 'app.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel',
include: [
path.resolve(__dirname)
],
},
{ test: /\.vue$/, loader: 'vue' }
]
},
vue: {
loaders: {
scss: "vue-style!css!sass"
}
},
}

0 comments on commit 413b614

Please sign in to comment.