1.0.3 • Published 4 years ago

shapla-data-table-status v1.0.3

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

shapla-data-table-status

A simple status list component to show status of data table.

Table of contents

Installation

npm install --save shapla-data-table-status

Usage

Add the component:

import statusList from 'shapla-data-table-status';

export default {
  name: 'Hello',

  components: {
    statusList
  },
  methods: {
   handleClickEvent(status) {
   //this.$emit('change', status);
   }
}

}
  <status-list :statuses="statuses"></status-list>

Props

PropertyTypeRequiredDefaultDescription
typeStringnohorizontalset vertical to see vertical design
statusesArrayno[]Pass an Array of Objects. See statuses data object

statuses data object

PropertyTypeRequiredDefaultDescription
keyStringyes | Status key.
labelStringyes | Status label
activeBooleanyes | If set true, status will be highlighted.
countNumberyes | How many items has for current status.
<!-- template -->
<status-list :statuses="statuses"></status-list>
<status-list :statuses="statuses" type="vertical"></status-list>

<!-- method -->
  methods: {
   handleClickEvent(status) {
   this.$emit('change', status);
   }
}
1.0.3

4 years ago

1.0.2

5 years ago

1.0.0

5 years ago