1.2.4 • Published 3 years ago

vue-sheets v1.2.4

Weekly downloads
48
License
ISC
Repository
github
Last release
3 years ago

vue-sheets

A vue component library based on the JUI components available in vuejs.

forthebadge forthebadge forthebadge forthebadge

Installation

NPM

npm install --save vue-sheets

Browser (Legacy)

If you are using an existing JUI style, Just download dist/vue-sheets.base.js and include it in your HTML file:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js"></script>
<script src="dist/vue-sheets.base.js"></script>
<link rel="stylesheet" href="jui-grid.classic.css" />
<!--<link rel="stylesheet" href="jui-grid.dark.css" />-->

Browser

Download the dist/vue-sheets.classic.js and dist/vue-sheets.css and include it in your HTML file:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.js"></script>
<script src="dist/vue-sheets.classic.js"></script>
<!--<script src="dist/vue-sheets.dark.js"></script>-->
<link rel="stylesheet" href="dist/vue-sheets.css" />

ES Modules

Plug-In
import Vue from 'vue'
import VueSheets from 'vue-sheets'

Vue.use(VueSheets, { theme: 'classic' })
Components (Legacy)

If you are using an existing JUI style, You must load a non-styled view component.

import Vue from 'vue'
import SheetsTable from 'vue-sheets/src/components/table'

Vue.component(SheetsTable.name, SheetsTable);
Components
import Vue from 'vue'
import SheetsTable from 'vue-sheets/src/components/table.classic'
// import SheetsTable from 'vue-sheets/src/components/table.dark'

Vue.component(SheetsTable.name, SheetsTable);

Implemented components

Props

Common

NameTypeRequiredWatchDefaultDescription
tableTypeStringfalsefalseclassicTable style type (simple, simple headline, expand)
tableSizeStringfalsefalsenormalTable size type (small, large)
tableEffectStringfalsefalsehoverTable effect type (stripeless, borderless)
tableWidthNumber, Stringfalsefalse100%Table width
columnsArraytruefalseundefinedProperties of a column object, Required are key and name (key, name, width, sort, active)
dataArrayfalsetrueundefinedTable row data, The column key must be the same as the row object's key
scrollStringfalsefalsevscrollTable scroll type (page, s-page, scroll)
scrollHeightNumberfalsetrue200The maximum height of the tbody tag
resizeBooleanfalsefalsefalseUse resizing of table columns
sortKeyStringfalsefalsenullColumn key to sort by default
sortOrderStringfalsefalseascSort order type for default sorting (desc)
activeMenuBooleanfalsefalsefalseShow or hide the drop-down menu for column activation
menuLeftNumberfalsefalse0Left coordinate of the drop-down menu
menuTopNumberfalsefalse0Top coordinate of the drop-down menu
selectRowEffectBooleanfalsefalsefalseWhen clicking on a row, apply the selection effect to the row
selectRowIndexNumber, StringfalsefalsefalseThe index of the row to select when the data is first updated
templateRowStringfalsefalsenullTable row template
templateNoneStringfalsefalsenullIf there are no rows, the displayed template
templateExpandStringfalsefalsenullTemplate for table row extension area
templateMenuStringfalsefalsenullTemplate for drop-down menu for column activation

Table

NameTypeRequiredWatchDefaultDescription
dragRowBooleanfalsefalsefalseOption to change table rows by dragging the mouse

X-Table

NameTypeRequiredWatchDefaultDescription
scrollWidthNumberfalsefalse0The maximum width of the table tag
sortTypeStringfalsefalse'single'Only X-Table components support multiple sorting (multi)
sortCacheBooleanfalsefalsefalseOptions that maintain column sorting when new data is updated
xssFilterBooleanfalsefalsefalseOptions to enable the xss filter
rowHeightNumberfalsefalse26When using table virtual scrolling, set the row height for precise calculations
pageCountNumberfalsefalse100When table scrolling is not used, the number of rows per page

Events

Common

NameArgumentsDescription
clickRow, EventEvents that occur when a table row is clicked
rclickRow, EventEvents that occur when right-clicking a table row
dblclickRow, EventEvents that occur when double-clicking a table row
sortRow, EventWhen sorting starts after clicking on a table column
sortendRow, EventWhen sorting is completed after clicking on a table column
expandRow, EventEvents that occur when an extension is opened after clicking a table row
expandendRow, EventEvents that occur when an extension is closed after clicking on a table row
showcolumnColumn, EventThe event that occurs when the column is shown
hidecolumnColumn, EventThe event that occurs when the column is hidden
columnmenuColumn, EventThe event that occurs when the drop-down is shown

Table

NameArgumentsDescription
dragRow, EventEvents that occur when dragging a table row begins
dragendRow, EventEvents that occur when a table row ends dragging
editRow, EventEvents that occur when you modify a table row
editendRow, EventEvents that occur when the table row is modified
1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.11

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

1.0.3

4 years ago

0.9.0

4 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.13

5 years ago

0.6.12

5 years ago

0.6.11

5 years ago

0.6.10

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.6

5 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago