Skip to content

Commit

Permalink
Table: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Oct 24, 2016
1 parent f97d885 commit 4e46aeb
Show file tree
Hide file tree
Showing 5 changed files with 402 additions and 8 deletions.
8 changes: 4 additions & 4 deletions examples/docs/zh-cn/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,12 @@
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| data | 显示的数据 | array |||
| height | table 的高度,默认高度为空,即自动高度 | string |||
| height | table 的高度,默认高度为空,即自动高度,单位 px | string, number |||
| stripe | 是否为斑马纹 table | boolean || false |
| border | 是否带有纵向边框 | boolean || false |
| fit | 列的宽度是否自撑开 | boolean || true |
| row-class-name | 行的 className 的回调,会传入 row, index。 | Function | - | - |
| row-key | 行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection 功能的情况下,该属性是必填的 | Function, String | - | |
| row-key | 行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection 功能的情况下,该属性是必填的 | Function, String | - | - |

### Table Events
| 事件名 | 说明 | 参数 |
Expand All @@ -843,9 +843,9 @@
| label | 显示的标题 | string |||
| prop | 对应列内容的字段名,也可以使用 property 属性 | string |||
| width | 对应列的宽度 | string |||
| fixed | 列是否固定在左侧或者右侧 | string, boolean | true, left, right | - |
| fixed | 列是否固定在左侧或者右侧,true 表示固定在左侧 | string, boolean | true, left, right | - |
| sortable | 对应列是否可以排序 | boolean || false |
| resizable | 对应列是否可以通过拖动改变宽度(如果需要,需在 el-table 上设置 border 属性为真) | boolean || false |
| resizable | 对应列是否可以通过拖动改变宽度(如果需要在 el-table 上设置 border 属性为真) | boolean || true |
| type | 对应列的类型。如果设置了 `selection` 则显示多选框,如果设置了 `index` 则显示该行的索引(从 1 开始计算) | string | selection/index ||
| formatter | 用来格式化内容,在 formatter 执行的时候,会传入 row 和 column | function |||
| show-tooltip-when-overflow | 当过长被隐藏时显示 tooltip | Boolean || false |
Expand Down
2 changes: 1 addition & 1 deletion packages/table/src/table-column.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default {
let column = getDefaultColumn(type, {
id: columnId,
label: this.label,
property: this.property,
property,
type,
template,
minWidth,
Expand Down
3 changes: 0 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Sync from './utils/sync';
import Pagination from '../packages/pagination/index.js';
import Dialog from '../packages/dialog/index.js';
import Autocomplete from '../packages/autocomplete/index.js';
Expand Down Expand Up @@ -59,7 +58,6 @@ const install = function(Vue) {
/* istanbul ignore if */
if (install.installed) return;

Vue.directive('sync', Sync);
Vue.component(Pagination.name, Pagination);
Vue.component(Dialog.name, Dialog);
Vue.component(Autocomplete.name, Autocomplete);
Expand Down Expand Up @@ -130,7 +128,6 @@ if (typeof window !== 'undefined' && window.Vue) {
module.exports = {
version: '1.0.0-rc.7',
install,
Sync,
Pagination,
Dialog,
Autocomplete,
Expand Down
Loading

0 comments on commit 4e46aeb

Please sign in to comment.