Giter VIP home page Giter VIP logo

easytable's Introduction

基於jquery的自動生成表格的插件,可以合并單元格,兼容commonjs,amd,cmd规范,可以在node环境中使用

配置參數

new mtable({
        tableId:'',//生成表格的ID
        tableClass:'',//class名
        tableParent:'',//生成的表格插入的div,如果不設置則為body
        theade:'',//表頭
        addDom:''//生成表格的觸發按鈕,可以不設置
},data)

示例

var data = [
      { 'a': '小明', 'b': '100' },
      { 'a': '小明', 'b': '250' },
      { 'a': '小明', 'b': '260' },
      { 'a': '小明', 'b': '270' },
      { 'a': '小花', 'b': '90' },
      { 'a': '小花', 'b': '190' }
  ]
  var c = new mtable({
      tableid: 'm',
      adddom: ".add",
      tableclass: 'table table-bordered',
      tableparent: '.tcon',
      theade: '<td>姓名</td><td>价格</td>',
      mergeCells: true //是否自动合并单元格,默认不合并
  }, data)

  //使用es6
  import mtable from 'easyTable'
  var m=new mtable({

  },data)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.