Giter Site home page Giter Site logo

yashwp / lite-table-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from atif0075/lite-table-docs

0.0 1.0 0.0 1.81 MB

A simple and lightweight data table component for Vue.js 3. Features sorting, paging, row check, dynamic data rendering, supported TypeScript, and more.

Home Page: https://vue3-lite-table.vercel.app

JavaScript 3.42% CSS 0.04% HTML 1.87% Vue 94.68%

lite-table-docs's Introduction

Vue 3 Lite Table

A simple and lightweight data table component for Vue.js 3

Features

  • Sorting
  • Paging
  • Row check
  • Dynamic data rendering
  • Supported TypeScript
  • And more!

Installation

NPM

npm install vue3-table-lite --save

Usage

JavaScript

import VueTableLite from "vue3-table-lite";

TypeScript

import VueTableLite from "vue3-table-lite/ts";

Default Mode

import VueTableLite from 'vue3-table-lite'

export default {
  name: 'App',
  components: {
    VueTableLite,
  },
  data() {
    return {
      tableData: [
        { id: 1, name: 'Alice', age: 25 },
        { id: 2, name: 'Bob', age: 30 },
        { id: 3, name: 'Carol', age: 35 },
      ],
    }
  },
}
<template>
  <vue-table-lite
    :data="tableData"
  >
    <th slot="header">ID</th>
    <th slot="header">Name</th>
    <th slot="header">Age</th>
    <td slot="body" scope="row">{{ item.id }}</td>
    <td slot="body">{{ item.name }}</td>
    <td slot="body">{{ item.age }}</td>
  </vue-table-lite>
</template>

V-slot Mode

import VueTableLite from 'vue3-table-lite'

export default {
  name: 'App',
  components: {
    VueTableLite,
  },
  data() {
    return {
      tableData: [
        { id: 1, name: 'Alice', age: 25 },
        { id: 2, name: 'Bob', age: 30 },
        { id: 3, name: 'Carol', age: 35 },
      ],
    }
  },
}
<template>
  <vue-table-lite
    :data="tableData"
  >
    <template slot="header">
      <th>ID</th>
      <th>Name</th>
      <th>Age</th>
    </template>
    <template slot="body" scope="row">
      <td>{{ item.id }}</td>
      <td>{{ item.name }}</td>
      <td>{{ item.age }}</td>
    </template>
  </vue-table-lite>
</template>

Static Mode

import VueTableLite from 'vue3-table-lite'

export default {
  name: 'App',
  components: {
    VueTableLite,
  },
  data() {
    return {
      tableData: [
        { id: 1, name: 'Alice', age: 25 },
        { id: 2, name: 'Bob', age: 30 },
        { id: 3, name: 'Carol', age: 35 },
      ],
    }
  },
}
<template>
  <vue-table-lite
    :data="tableData"
  >
    <thead>
      <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Age</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="(item, index) in tableData" :key="index">
        <td>{{ item.id }}</td>
        <td>{{ item.name }}</td>
        <td>{{ item.age }}</td>
      </tr>
    </tbody>
  </vue-table-lite>
</template>

API Reference

For more information on the API, please see the documentation: https://github.com/linmasahiro/vue3-table-lite.

Contributing

If you have any suggestions or bug reports, please feel free to open an issue on GitHub: https://github.com/linmasahiro/vue3-table-lite.

License

Vue 3 Lite Table is licensed under the MIT license.

lite-table-docs's People

Contributors

atif0075 avatar linmasahiro avatar

Watchers

 avatar

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.