Skip to content

Commit 884f578

Browse files
committed
Initial commit
0 parents  commit 884f578

3 files changed

Lines changed: 489 additions & 0 deletions

File tree

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#drawTableWithChars
2+
3+
用纯字符画出表格。Draw tables with chars.
4+
5+
###使用 Usage:
6+
@param {Dom} 父级dom节点
7+
@param {Object} 描述表格内容对象
8+
9+
```js
10+
drawTables.init(document.getElementById('ctn'), {
11+
title: ['name', 'age', 'sex'],
12+
direction: [0, 'age'],
13+
data: [
14+
['haasdfha', 10, {content: 'heihei', col: 4, row: 3}],
15+
['hehe', 10],
16+
['haasdfha', 10, 'male'],
17+
[
18+
{content: 'heihei', col: 4, row: 3},
19+
{content: 'heihei', col: 4, row: 3},
20+
],
21+
[
22+
{content: 'heihei', col: 4, row: 3},
23+
{}
24+
]
25+
]
26+
});
27+
```
28+
29+
### 展示 Show:
30+
```
31+
|-----------------------------------------------------------------------|
32+
| name | age | sex | | | | | | | | | | |
33+
|----------|-----|--------|--|--------|--|------|--|--------|--|--|--|--|
34+
| haasdfha | 10 | heihei | | | | | | | |
35+
|----------|-----| |------|--|--------|--|--|--|--|
36+
| hehe | 10 | | | | | | | | |
37+
|----------|-----| |------|--|--------|--|--|--|--|
38+
| haasdfha | 10 | | male | | | | | | |
39+
|----------|-----|--------|--|--------|--|------|--|--------|--|--|--|--|
40+
| heihei | heihei | | | | | |
41+
| | |--------|--|--|--|--|
42+
| | | heihei | |
43+
| | | |--|
44+
| | | | |
45+
|----------|-----|--------|--|--------|--|------|--| |--|
46+
| | | | | | | | | | |
47+
|-----------------------------------------------------------------------|
48+
```

0 commit comments

Comments
 (0)