Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

HJava/drawTableWithChars

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 
 
 

Repository files navigation

drawTableWithChars

用纯字符画出表格。Draw tables with chars.

使用 Usage:

@param {Dom} 父级dom节点
@param {Object} 描述表格内容对象

drawTables.init(document.getElementById('ctn'), {
    title: ['name', 'age', 'sex'],
    direction: [0, 'age'],
    data: [
        ['haasdfha', 10, { content: 'heihei', col: 4, row: 3 }],
        ['hehe', 10],
        ['haasdfha', 10, 'male'],
        [
            { content: 'heihei', col: 4, row: 3 },
            { content: 'heihei', col: 4, row: 3 },
        ],
        [
            { content: 'heihei', col: 4, row: 3 },
            {}
        ]
    ]
});

展示 Show:

|-----------------------------------------------------------------------|
|     name | age | sex    |  |        |  |      |  |        |  |  |  |  |
|----------|-----|--------|--|--------|--|------|--|--------|--|--|--|--|
| haasdfha |  10 | heihei                |      |  |        |  |  |  |  |
|----------|-----|                       |------|--|--------|--|--|--|--|
|     hehe |  10 |                       |      |  |        |  |  |  |  |
|----------|-----|                       |------|--|--------|--|--|--|--|
| haasdfha |  10 |                       | male |  |        |  |  |  |  |
|----------|-----|--------|--|--------|--|------|--|--------|--|--|--|--|
|   heihei                   | heihei              |        |  |  |  |  |
|                            |                     |--------|--|--|--|--|
|                            |                     | heihei          |  |
|                            |                     |                 |--|
|                            |                     |                 |  |
|----------|-----|--------|--|--------|--|------|--|                 |--|
|          |     |        |  |        |  |      |  |                 |  |
|-----------------------------------------------------------------------|

About

用纯字符画出表格。Draw tables with chars.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.