diff --git a/README.md b/README.md index 2f29600..16b9a66 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ - - + show show or hide search box @@ -217,6 +217,13 @@ Function - + + placeholder + + searchbox placeholder + String + "" + row-action-def diff --git a/example/docs/cn.vue b/example/docs/cn.vue index add8bbb..1d3a82a 100644 --- a/example/docs/cn.vue +++ b/example/docs/cn.vue @@ -244,6 +244,7 @@ export default { getSearchDef() { return { offset: 12, + placeholder: 'please input searchkey', props: ['state', 'flow_type'] // can be string or Array } }, diff --git a/example/docs/en.vue b/example/docs/en.vue index e3d6439..93cbaec 100644 --- a/example/docs/en.vue +++ b/example/docs/en.vue @@ -251,6 +251,7 @@ export default { getSearchDef() { return { offset: 12, + placeholder: 'please input searchkey', props: ['state', 'flow_type'] // can be string or Array } }, diff --git a/package.json b/package.json index 396d885..557b0a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-data-tables", - "version": "1.0.6", + "version": "1.0.7", "description": "vue2.0 DataTables, based on element-ui, el-table + el-pagination + custom filter and sort", "author": "njleonzhang ", "main": "dist/data-tables.js", @@ -36,7 +36,7 @@ "chalk": "^1.1.3", "connect-history-api-fallback": "^1.1.0", "css-loader": "^0.25.0", - "element-ui": "^1.1.5", + "element-ui": "^1.2.3", "eslint": "^3.7.1", "eslint-config-standard": "^6.1.0", "eslint-friendly-formatter": "^2.0.5", diff --git a/readme_table_backup.pug b/readme_table_backup.pug index d11694d..4fd2ccb 100644 --- a/readme_table_backup.pug +++ b/readme_table_backup.pug @@ -114,7 +114,7 @@ table td - tr - td(rowspan='5') + td(rowspan='6') td show td td show or hide search box @@ -149,6 +149,13 @@ table td Function td - + tr + td placeholder + td + td searchbox placeholder + td String + td "" + tr td row-action-def td @@ -209,20 +216,21 @@ table td td define pagination. td Object - td + td - tr td(rowspan='4') td layout td - td + td refer to + a(href='http://element.eleme.io/#/zh-CN/component/pagination') Elmeme Doc td String td [prev, pager, next, jumper, sizes, total] tr td pageSize td - td refer to + td refer to a(href='http://element.eleme.io/#/zh-CN/component/pagination') Elmeme Doc td Number td 20 @@ -230,7 +238,7 @@ table tr td pageSizes td - td refer to + td refer to a(href='http://element.eleme.io/#/zh-CN/component/pagination') Elmeme Doc td Array td [20, 50, 100] @@ -238,7 +246,7 @@ table tr td currentPage td - td refer to + td refer to a(href='http://element.eleme.io/#/zh-CN/component/pagination') Elmeme Doc td Number td 1 diff --git a/src/components/DataTables.vue b/src/components/DataTables.vue index 4ec3818..9da568b 100644 --- a/src/components/DataTables.vue +++ b/src/components/DataTables.vue @@ -43,7 +43,10 @@ :span='innerSearchDef.width', :offset='innerSearchDef.offset', v-if='searchShow') - el-input(v-model='searchKey', icon='search') + el-input( + v-model='searchKey', + :placeholder='innerSearchDef.placeholder', + icon='search') el-table( :data='curTableData', @@ -175,6 +178,7 @@ export default { props: undefined, filterFunction: undefined, width: 5, + placeholder: '', offset: 0 }, this.searchDef) },