Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-ui-grid

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-ui-grid

Simple, fast, powerful grid package for vuejs

  • 0.1.73
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

vue-ui-grid

Simple, fast, powerful grid package for vuejs

Demo

https://mihnsen.github.io/vue-ui-grid/

Installation

npm install vue-ui-grid
or
yarn add vue-ui-grid

Usage

import VGrid from 'vue-ui-grid';

// Use it
Grid.vgrid-center(
  :columns="gridColumns",
  :data="gridData",
  :per-page="2",
  :column-filter="true",
)
  template(
    slot="column-action"
    slot-scope="{ entry }"
  )
    button(
      type="button",
    ) ADD

// Or list

List(
  :columns="listColumns",
  :data="listData",
  :per-page="10",
  :column-visible="true",
  :orderable="true",
  ref="list"
)
  template(
    slot="column-action"
    slot-scope="{ entry }"
  )
    button(
      type="button",
    ) ADD
    a(
      href="gooogle.com"
    ) Edit

// CSS
@import '~vue-ui-grid/src/assets/scss/index'

Setup your promise function as a promise like this.

export default {
  data() {
    return {
      gridColumns: [
        {
          field: 'name',
          lable: 'Actor'
        },
        {
          field: 'power',
          lable: 'Power'
        }
      ],
      gridData: [
        { name: 'Chuck Norris', power: Infinity },
        { name: 'Bruce Lee', power: 9000 },
        { name: 'Jackie Chan', power: 7000 },
        { name: 'Jet Li', power: 8000 }
      ]
    }
  }
}
Column Properties
{
  field: 'id',
  label: 'ID',
  filter: true,
  hidden: true,
  width: 3
}
OptionRequiredDefaultDescription
fieldYesTitle
labelNoLabel of column
typeNoStringfield type (text/number/date)
filterNoFalseSet column filter or not
orderNoFalseSet column order or not
hiddenNoFalseSet hidden column, can't see
widthNoFalseSet width column, use for list
formatNoFormat content: '{name}'
Props
PropsRequiredDefaultDescription
columnsYes[]Column config
dataYes[]Data source
per-pageNo10Number of items per page
searchableNoTrueSearch data in header
filterableNoTrueFilter data in header
column-visibleNoFalseCustom show hide, order column
column-filterableNoFalseFilter column in side grid
indexNo0Initial page
statusNoTrueGrid status
paginationNoTruePaginate data

Development

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Run your tests

yarn run test

Lints and fixes files

yarn run lint

Run your unit tests

yarn run test:unit

Customize configuration

See Configuration Reference.

Keywords

FAQs

Package last updated on 23 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc