npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue3-table-lite

v1.4.0

Published

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

Downloads

9,077

Readme

vue3-table-lite

Lincense NPM GitHub release (latest by date) Website npm

GitHub Repo stars GitHub forks

SampleGif

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

Document and demo

Document

Online Demo

Support

  • Row check event Support
  • Custom data display Support
  • Pagging Support
  • Sorting Support
  • Custom message Support
  • V-slot Support
  • TypeScript Support
  • Grouping Support

SampleCode

import

import TableLite from "vue3-table-lite";
import TableLite from "vue3-table-lite/ts"; // TypeScript

QuickStart

component

<table-lite
:is-loading="table.isLoading"
:columns="table.columns"
:rows="table.rows"
:total="table.totalRecordCount"
:sortable="table.sortable"
:messages="table.messages"
@do-search="doSearch"
@is-finished="table.isLoading = false"
/>

data

const table = reactive({
  isLoading: false,
  columns: [
    {
      label: "ID",
      field: "id",
      width: "3%",
      sortable: true,
      isKey: true,
    },
    {
      label: "Name",
      field: "name",
      width: "10%",
      sortable: true,
    },
    {
      label: "Email",
      field: "email",
      width: "15%",
      sortable: true,
    },
  ],
  rows: [],
  totalRecordCount: 0,
  sortable: {
    order: "id",
    sort: "asc",
  },
});

Event

const doSearch = (offset, limit, order, sort) => {
  table.isLoading = true;

  // Start use axios to get data from Server
  let url = 'https://www.example.com/api/some_endpoint?offset=' + offset + '&limit=' + limit + '&order=' + order + '&sort=' + sort;
  axios.get(url)
  .then((response) => {
    // Point: your response is like it on this example.
    //   {
    //   rows: [{
    //     id: 1,
    //     name: 'jack',
    //     email: '[email protected]'
    //   },{
    //     id: 2,
    //     name: 'rose',
    //     email: '[email protected]'
    //   }],
    //   count: 2,
    //   ...something
    // }
    
    // refresh table rows
    table.rows = response.rows;
    table.totalRecordCount = response.count;
    table.sortable.order = order;
    table.sortable.sort = sort;
  });
  // End use axios to get data from Server
};

More...

Go to Check!!

release

ver 1.4.0 : Added checkbox indeterminate state.
ver 1.3.9 : Added Vertical highlight option. `#93`
ver 1.3.8 : Allow HTML in header's label `#91`.
ver 1.3.7 : Fixed `#85`.
ver 1.3.6 : Fixed `#81`.
ver 1.3.5 : Fixed `#79`.
ver 1.3.4 : Fixed `#78`.
ver 1.3.3 : Fixed `#77`.
ver 1.3.2 : Fixed `#75`.
ver 1.3.1 : Fixed `#73`.
ver 1.3.0 : Fixed `#69`.
ver 1.2.9 : Added keep collapsed status option.
ver 1.2.8 : Added grouping collapse features. `#67`
ver 1.2.7 : Fixed `#63`.
ver 1.2.6 : Fixed `#61`.
ver 1.2.5 : Added table max-height prop and `#59` bugs.
ver 1.2.4 : Added grouping features. `#53`
ver 1.2.3 : Added option for fixed first column on horizontal scrolling.
ver 1.2.2 : Fixed result of sorting number as string was wrong on "static-mode" `#47`
ver 1.2.1 : Fixed "setting.pageSize" property is not accessible from outside and is not in sync with the "props.pageSize" property
ver 1.2.0 : Added Row click event `#41`
ver 1.1.9 : New Features `#35` `#36`
ver 1.1.8-1 : Removed unnecessary style-class and changed something class-name `#33`
ver 1.1.8 : Add option to set header/column class and style(in-line) `#32`
ver 1.1.7 : Add option to set custom values in page size dropdown `#29`
ver 1.1.6 : fixed bug. `#28`
ver 1.1.5 : Added classes to element for easier Styling. `#25`
ver 1.1.3 : fixed cannot get localTabel refs bugs.
ver 1.1.2 : changed import file on TypeScript.
ver 1.1.1 : added hide-paging and page number attribute and fixed `#23`.
ver 1.1.0 : remove Vue Dependency at bundle
ver 1.0.9 : column v-slot is not to be required on v-slot mode
ver 1.0.8 : fixed can't rendering customized display data on static mode bus.
ver 1.0.7 : support v-slot.
ver 1.0.6 : support static mode.
ver 1.0.5 : fixed Safari loading-mask is not overlapping the table.
ver 1.0.4 : support TypeScript.