1.0.13 • Published 4 years ago

largridview v1.0.13

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Package LarGridView

LarGridView package for working with grid view in Laravel with Vue.js

A simple package to view the data table on Vue with the Laravel web framework. Easy to configure and easy to operate. The main task of the grid package takes on. You do the rest.

Installation

npm install largridview

Usage

  import Vue from 'vue'
  
  import * as LarGridView from 'largridview'
  Vue.use(LarGridView)

...

  <LarGridView :url="'api/all'"
        :fields="[{width: '10%', name: 'id', label: '', isSort: true}, {width: null, name: 'action', label: 'Actions', isAction: true}]"
        @response="onResponse"
        :isBusy="loadingSendingStatus"
        sort-key='id'>
        <tr v-for="(item, index) in items" :key="index">
            ...
        </tr>
  </LarGridView>

Props

Stack

NameTypeRequiredDefaultDescription
urlStringYes'/'URL to get the required data. If the line is empty, then data will not be sent.
fieldsArrayYes[]Fields to display. Example: [{width: '10%', name: 'id', label: '', isSort: true}, {width: null, name: 'action', label: 'Actions', isAction: true}].
dataPathStringNodata.listThe path to receiving data from a pagination request response.
dataObjectNo{}It is necessary in cases when you need to control some data for sending.
isSendBooleanNotrueEnable automatic data sending.
isBusyBooleanNofalseLoading data into a table.
isLoadingOnBooleanNotrueEnable basic data loading.
isSearchBooleanNofalseEnable table search.
isPerPageOnBooleanNotrueEnable selection of the number of table rows per page.
isPaginateOnBooleanNotrueEnable pagination.
isPaginateSimpleBooleanNofalseSimple pagination.
isPaginateAutoBooleanNotrueEnable automatic pagination detection - simple pagination or not.
sortKeyStringNonullDefault Sort Column.
perPageArrayNo[20, 50, 100, 200]The number of rows for the table.
perPageDefaultNumberNo20Default row count for table.
idTableStringNotableIDTable id for better control.
classTableStringNo | Class for the table itself.
classBlockStringNo | Class for the block itself.
placeholderFilterSearchStringNoSearch...Placeholder for search input.
textFromToStringNoShowing :from to :to
textTotalStringNoof :total
textNextStringNoNext ›
textPrevStringNo‹ Prev
paginateDeltaLeftNumberNo2The number of pages to the left of the current page.
paginateDeltaRightNumberNo2The number of pages to the right of the current page.

Events

NameTypeDescription
loadingBooleanData load status change event.
responseObjectEvent when receiving data from the server.
filter:selectNumberThe event of selecting the number of lines displayed on the page.
filter:sortObjectColumn sort selection event.
filter:searchStringThe event of entering text into the search string.
page:selectStringThe event of clicking on the pagination button on.
page:nextStringPagination forward button click event.
page:prevStringPagination back button click event.
1.0.13

4 years ago

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago