0.1.87 • Published 5 months ago

vue-ui-grid v0.1.87

Weekly downloads
213
License
MIT
Repository
github
Last release
5 months ago

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.

0.1.87

5 months ago

0.1.85

1 year ago

0.1.86

1 year ago

0.1.80

1 year ago

0.1.81

1 year ago

0.1.82

1 year ago

0.1.83

1 year ago

0.1.84

1 year ago

0.1.75

2 years ago

0.1.76

2 years ago

0.1.77

1 year ago

0.1.78

1 year ago

0.1.79

1 year ago

1.0.0

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

0.1.74

3 years ago

0.1.71

3 years ago

0.1.72

3 years ago

0.1.73

3 years ago

0.1.70

3 years ago

0.1.69

3 years ago

0.1.67

3 years ago

0.1.68

3 years ago

0.1.66

3 years ago

0.1.65

3 years ago

0.1.63

3 years ago

0.1.64

3 years ago

0.1.62

3 years ago

0.1.61

4 years ago

0.1.60

4 years ago

0.1.59

4 years ago

0.1.58

4 years ago

0.1.57

4 years ago

0.1.56

4 years ago

0.1.55

4 years ago

0.1.53

4 years ago

0.1.54

4 years ago

0.1.52

4 years ago

0.1.51

4 years ago

0.1.50

4 years ago

0.1.49

4 years ago

0.1.48

4 years ago

0.1.47

4 years ago

0.1.46

4 years ago

0.1.45

4 years ago

0.1.44

4 years ago

0.1.43

4 years ago

0.1.42

4 years ago

0.1.41

4 years ago

0.1.40

4 years ago

0.1.38

4 years ago

0.1.39

4 years ago

0.1.36

4 years ago

0.1.37

4 years ago

0.1.34

4 years ago

0.1.35

4 years ago

0.1.33

4 years ago

0.1.30

4 years ago

0.1.31

4 years ago

0.1.32

4 years ago

0.1.27

4 years ago

0.1.28

4 years ago

0.1.29

4 years ago

0.1.22

4 years ago

0.1.23

4 years ago

0.1.25

4 years ago

0.1.26

4 years ago

0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago