The Wayback Machine - https://web.archive.org/web/20230619042509/https://github.com/appleple/a-table.js
Skip to content

appleple/a-table.js

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

Takayuki Nagatomi and Takayuki Nagatomi v1.5.10
667457a

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
css
 
 
 
 
 
 
lib
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

a-table.js

Simple Table UI for generating table html

CircleCI npm version

Install

npm

npm install a-table

standalone

<script src="https://unpkg.com/a-table@1.4.10/build/a-table.min.js"></script>

css

<link rel="stylesheet" href="https://unpkg.com/a-table@1.4.10/css/a-table.css">

fonts

<link rel="stylesheet" type="text/css" href="https://unpkg.com/a-table@1.4.10/fonts/a-table-icon.css">

Demo

https://appleple.github.io/a-table.js/

Usage

import aTable from 'a-table';
const table = new aTable('.table', {
  lang:'ja',
  mark:{
    btn:{
      group:'acms-admin-btn-group acms-admin-btn-group-inline',
      item:'acms-admin-btn',
      itemActive:'acms-admin-btn acms-admin-btn-active'
    }
  },
  selector:{
    option:[
      {label:'赤',value:'red'},
      {label:'青',value:'blue'},
      {label:'黄色',value:'yellow'}
    ]
  }
});
table.afterRendered =
table.afterEntered = function(){
  document.querySelector('.test').innerText = this.getTable();
  document.querySelector('.markdown').innerText = this.getMarkdown();
}
table.afterRendered();

Licence

MIT