Skip to content

Commit 0b8c138

Browse files
committed
update docs and version
1 parent 1c8ffd9 commit 0b8c138

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
![preview](https://rawgit.com/njleonzhang/vue-data-tables/master/Assets/desc.png)
77

8-
## online demo and example
8+
## Online demo and example
99
* [Demo](https://njleonzhang.github.io/vue-data-tables/)
1010

11-
* [Example](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue)
11+
* [Demo Code](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue)
1212

1313

1414
## Install ElementUI and vue-data-tables
@@ -60,7 +60,7 @@
6060
| has-action-col | Determine wether show action column | Boolean | true |
6161
| col-not-row-click | Indicate the columns which do not trigger row-click | Array | the action column |
6262

63-
For details, check the [example](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue).
63+
For details, check the [Demo](https://njleonzhang.github.io/vue-data-tables/) and [Demo Code](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue).
6464

6565
## Event
6666
| Event | Desc | params |
@@ -71,7 +71,7 @@ For details, check the [example](https://github.com/njleonzhang/vue-data-tables/
7171
| select-all | Emit when select-all is clicked | selection |
7272
| filtered-data | Emit when filter condition changes | filteredData |
7373

74-
For details, check the [example](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue).
74+
For details, check the [Demo](https://njleonzhang.github.io/vue-data-tables/) and [Demo Code](https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue).
7575

7676
## Dev
7777

dist/data-tables.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ return /******/ (function(modules) { // webpackBootstrap
611611

612612
this.filters.forEach(function (filter) {
613613
var val = filter.val;
614-
if (!val) {
614+
if (!val || val.length === 0) {
615615
return true;
616616
}
617617

@@ -626,7 +626,7 @@ return /******/ (function(modules) { // webpackBootstrap
626626
} else if (val instanceof Array && val.length > 0) {
627627
defaultFilterFunction = function defaultFilterFunction(el, filter) {
628628
return filter.props.some(function (prop) {
629-
return filter.value.indexOf(el[prop]) > -1;
629+
return filter.val.indexOf(el[prop]) > -1;
630630
});
631631
};
632632
}

docs/demo.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9102,7 +9102,7 @@
91029102
getCheckFilterDef: function getCheckFilterDef() {
91039103
return {
91049104
width: 14,
9105-
prop: 'state_code',
9105+
props: 'state_code',
91069106
def: [{
91079107
'code': 'created',
91089108
'name': '未处理'
@@ -9411,7 +9411,7 @@
94119411

94129412
this.filters.forEach(function (filter) {
94139413
var val = filter.val;
9414-
if (!val) {
9414+
if (!val || val.length === 0) {
94159415
return true;
94169416
}
94179417

@@ -9426,7 +9426,7 @@
94269426
} else if (val instanceof Array && val.length > 0) {
94279427
defaultFilterFunction = function defaultFilterFunction(el, filter) {
94289428
return filter.props.some(function (prop) {
9429-
return filter.value.indexOf(el[prop]) > -1;
9429+
return filter.val.indexOf(el[prop]) > -1;
94309430
});
94319431
};
94329432
}
@@ -10449,7 +10449,12 @@
1044910449
attrs: {
1045010450
"id": "app"
1045110451
}
10452-
}, [_c('el-card', [_c('div', {
10452+
}, [_c('el-card', [_c('a', {
10453+
attrs: {
10454+
"href": "https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue",
10455+
"target": "_blank"
10456+
}
10457+
}, [_vm._v("compare to the source code")])]), _c('el-card', [_c('div', {
1045310458
staticClass: "desc"
1045410459
}, [_c('h1', [_vm._v("基本用法")]), _c('p', [_vm._v(" checkbox-filter-def: 来定义选择过滤的控件")]), _c('p', [_vm._v(" actions-def: 来定义表格内容")]), _c('p', [_vm._v(" row-action-def: 定义表里各列的操作")]), _c('p', [_vm._v(" action-col-width: 定义动作列的最小宽度")]), _c('p', [_vm._v(" row-click: 行被点击的事件")])]), _c('data-tables', {
1045510460
attrs: {

example/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
<template lang='pug'>
99
#app
10+
el-card
11+
a(href='https://github.com/njleonzhang/vue-data-tables/blob/master/example/App.vue', target='_blank') compare to the source code
12+
1013
el-card
1114
.desc
1215
h1 基本用法

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-data-tables",
3-
"version": "0.0.8",
3+
"version": "1.0.1",
44
"description": "vue2.0 DataTables, based on element-ui, el-table + el-pagination + custom filter and sort",
55
"author": "njleonzhang <scream3616@sina.com>",
66
"main": "dist/data-tables.js",

0 commit comments

Comments
 (0)