Skip to content

movabletype/a-table.js

 
 

Repository files navigation

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/[email protected]/build/a-table.min.js"></script>

css

<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/a-table.css">

fonts

<link rel="stylesheet" type="text/css" href="https://unpkg.com/[email protected]/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

About

Simple Table UI for generating table html

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.8%
  • CSS 2.7%
  • HTML 2.5%