更新Readme
This commit is contained in:
27
README.md
27
README.md
@@ -22,7 +22,8 @@
|
||||
- 多级表头
|
||||
- 排序
|
||||
- 树形数据
|
||||
- 单选、多选
|
||||
- 单选
|
||||
- 多选
|
||||
|
||||
## 体验
|
||||
可直接访问https://peng92055.github.io/smart-table
|
||||
@@ -86,18 +87,18 @@
|
||||
|
||||
### Table Options
|
||||
|
||||
| Property | Type | Required | Description | Default |
|
||||
| :---------------------| :----------------- | :---------- | :------------------------------------------------------------- | :------------ |
|
||||
| selector | string | yes | 需要初始化的表格元素 | |
|
||||
| height | number or function | no | 可指定表格的高度 | |
|
||||
| align | string | no | 表格文本的水平排列方式(left、center、right) | center |
|
||||
| size | string | no | 每一行的垂直高度风格(large、middle、small) | small |
|
||||
| hoverBgColor | string | no | body中每行hover时的背景色 | '#EFF8FF' |
|
||||
| expand | boolean | no | 是否开启树形结构(树形结构会忽略排序及固定列) | false |
|
||||
| defaultExpandAll | boolean | no | 是否默认展开所有树形结构 | false |
|
||||
| selection | string | no | 单选或多选(radio、checkbox),选中值会存储在根节点selected属性上 | false |
|
||||
| selectionKey | string or number | no | 单选或多选时选中取值对应的tbody中有效列的角标(角标从0开始) | 0 |
|
||||
|
||||
| Property | Type | Required | Description | Default |
|
||||
| :---------------------| :----------------- | :---------- | :--------------------------------------------------------- | :------------ |
|
||||
| selector | string | yes | 需要初始化的表格元素 | |
|
||||
| height | number or function | no | 可指定表格的高度 | |
|
||||
| align | string | no | 表格文本的水平排列方式(left、center、right) | center |
|
||||
| size | string | no | 每一行的垂直高度风格(large、middle、small) | small |
|
||||
| hoverBgColor | string | no | body中每行hover时的背景色 | '#EFF8FF' |
|
||||
| expand | boolean | no | 是否开启树形结构(树形结构会忽略排序及固定列) | false |
|
||||
| defaultExpandAll | boolean | no | 是否默认展开所有树形结构 | false |
|
||||
| selection | string | no | 单选或多选(radio、checkbox),选中值会存储在根节点selected属性上 | false |
|
||||
| selectionKey | string or number | no | 单选或多选时选中取值对应的tbody中有效列的角标(角标从0开始) | 0 |
|
||||
| radioBgColor | string | no | 单选时,body中选中行的背景色 | '#D1E7FF' |
|
||||
|
||||
|
||||
|
||||
|
||||
227
dist/smartTable.min.js
vendored
227
dist/smartTable.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -75,9 +75,13 @@
|
||||
GitHub</a></h1>
|
||||
<div class="sidebar">
|
||||
<p>表格类型:</p>
|
||||
<p> <a href="#smartTable1"> ● 单表头</a></p>
|
||||
<p> <a href="#smartTable2"> ● 多表头</a></p>
|
||||
<p> <a href="#smartTable3"> ● 树形表</a></p>
|
||||
<p> <a href="#smartTable1">• 单表头</a></p>
|
||||
<p> <a href="#smartTable1">• 单选</a></p>
|
||||
<p> <a href="#smartTable1">• 排序</a></p>
|
||||
<p> <a href="#smartTable2">• 多表头</a></p>
|
||||
<p> <a href="#smartTable2">• 固定列</a></p>
|
||||
<p> <a href="#smartTable2">• 多选</a></p>
|
||||
<p> <a href="#smartTable3">• 树形表</a></p>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div id="smartTable1">
|
||||
|
||||
@@ -585,7 +585,7 @@ function initExpand(vm, tbody) {
|
||||
data.push(node)
|
||||
}
|
||||
if (hasParent) {
|
||||
styled(querySelector(row, "td"), { paddingLeft: 35 * paddingLength + "px" })
|
||||
styled(querySelector(row, "td"), { paddingLeft: 32 * paddingLength + "px" })
|
||||
styled(row, { display: expandAll ? '' : 'none' })
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user