All Projects → boussadjra → Vueye Table

boussadjra / Vueye Table

A data table created using Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vueye Table

Vue Burger Menu
🍔 An off-canvas sidebar Vue component - https://vue-burger-menu.netlify.com/
Stars: ✭ 648 (+912.5%)
Mutual labels:  vue-components, vuejs2
Vue Meteor
🌠 Vue first-class integration in Meteor
Stars: ✭ 893 (+1295.31%)
Mutual labels:  vue-components, vuejs2
Vue Snotify
Vuejs 2 Notification Center
Stars: ✭ 755 (+1079.69%)
Mutual labels:  vue-components, vuejs2
Vue Stripe Elements
A Vue 2 component collection for StripeElements
Stars: ✭ 498 (+678.13%)
Mutual labels:  vue-components, vuejs2
Vue Flexboxgrid
Vue components made with Flexboxgrid
Stars: ✭ 37 (-42.19%)
Mutual labels:  vue-components, vuejs2
Vuelayers
Web map Vue components with the power of OpenLayers
Stars: ✭ 532 (+731.25%)
Mutual labels:  vue-components, vuejs2
Vuex Flash
VueJs Flash Message Component within Vuex
Stars: ✭ 54 (-15.62%)
Mutual labels:  vue-components, vuejs2
Vue Material Dashboard
Vue Material Dashboard - Open Source Material Design Admin
Stars: ✭ 403 (+529.69%)
Mutual labels:  vue-components, vuejs2
Vue Flip
A Vue.js component to flip elements.
Stars: ✭ 37 (-42.19%)
Mutual labels:  vue-components, vuejs2
Vue Share Buttons
🔗A set of social buttons for Vue.js
Stars: ✭ 34 (-46.87%)
Mutual labels:  vue-components, vuejs2
Vue Swatches
🎨 Help the user picking beautiful colors!
Stars: ✭ 456 (+612.5%)
Mutual labels:  vue-components, vuejs2
Vue Image Loader
Vue progressive image loader plugin like Medium
Stars: ✭ 47 (-26.56%)
Mutual labels:  vue-components, vuejs2
Vue Touch Ripple
👆 Touch ripple component for @vuejs
Stars: ✭ 443 (+592.19%)
Mutual labels:  vue-components, vuejs2
Vuesax
New Framework Components for Vue.js 2
Stars: ✭ 5,293 (+8170.31%)
Mutual labels:  vue-components, vuejs2
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (+578.13%)
Mutual labels:  vue-components, vuejs2
Vue Quill Editor
🍡@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+10640.63%)
Mutual labels:  vue-components, vuejs2
Vue Goodshare
🍿 Vue.js component for social share. A simple way to share a link on the pages of your website in the most popular (and not so) social networks. Powered by goodshare.js project.
Stars: ✭ 345 (+439.06%)
Mutual labels:  vue-components, vuejs2
Vue Video Player
🎞 @videojs component for @vuejs
Stars: ✭ 4,026 (+6190.63%)
Mutual labels:  vue-components, vuejs2
Semantic Ui Vue
Semantic UI integration for Vue
Stars: ✭ 914 (+1328.13%)
Mutual labels:  vue-components, vuejs2
Vue Lottie
Render After Effects animations on Vue based on Bodymovin
Stars: ✭ 1,037 (+1520.31%)
Mutual labels:  vue-components, vuejs2

Vueye Table

Vueye data table is a responsive data table component based on Vue.js, it organizes your data per pages in order to navigate easily.

Vueye

This component allows you to :

  • Paginate data (server/client side)
  • Filter by field
  • Sort columns
  • Show only desired columns
  • Custom cells rendering

Docs

Documentation

Boilerplate in codesandbox (update the component dependency to the latest version)

Requirement

  • Vue.js ^2.6 + composition-api
  • It doesn't require any CSS framework

Installation

npm install vueye-table --save

Usage

<template>
  <div id="app">
    <VueyeTable :data="employees" :columns="columns" title="Employees" filter-by="employee_salary">
      <template v-slot:employee_salary="{item}">
        <b
          v-if="item.employee_salary>100000"
          style="background:#3bb640;color:white"
        >{{item.employee_salary}}</b>
        <b v-else style="background:#ee4422;color:white">{{item.employee_salary}}</b>
      </template>
      <template v-slot:actions="{item}">
        <div class="ve-table-actions">
          <button class="ve-table-btn ve-table-btn-primary" @click="edit(item)">Edit</button>
          <button class="ve-table-btn ve-table-btn-danger" @click="deleteItem(item)">Delete</button>
        </div>
      </template>
    </VueyeTable>
  </div>
</template>

<script>
import VueyeTable from "./components/VueyeTable.vue";
import employees from "./assets/employees.json";
export default {
  name: "App",
  data: () => ({
    employees: employees,
    columns: [
      {
        key: "id",
        label: "ID",
        sortable: true,
        type: "number",
        display: true
      },
      {
        key: "employee_name",
        label: "Employee Name",
        sortable: true,
        display: true
      },
      {
        key: "employee_salary",
        label: "Employee Salary",
        display: true,
        sortable: true
      },
      {
        key: "employee_age",
        label: "Employee Age",
        sortable: true
      },
      {
        key: "address.city",
        label: "Address",
        display: true,
        sortable: true
      },
      {
        key: "actions",
        label: "Actions",
        sortable: false,
        display: true
      }
    ],
    selectedRows: []
  }),
  methods: {
    edit(item) {
      //open a dialog to edit the selected item
      //or redirect to another page that contains
      // edit form
    },
    deleteItem(item) {
      this.employees = this.employees.filter(
        employee => employee.id !== item.id
      );
    }
  },
  components: {
    VueyeTable
  }
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.ve-table {
  &-actions {
    width: 104px;
    display: flex;
    justify-content: space-around;
    align-items: center;
  }
  &-btn {
    height: 24px;
    min-width: 32px;
    padding: 0 8px;
    text-align: center;
    border-radius: 4px;

    cursor: pointer;
    justify-content: center;
    outline: none;
    border: none;
    position: relative;
    white-space: nowrap;
    &-primary {
      background: #3844cc;
      color: white;
    }
    &-danger {
      background: #e24e40;
      color: white;
    }
  }
}
</style>


In main.js add @vue/composition-api plugin to make work with Vue.js 2 :

import Vue from 'vue';
import App from './App.vue';
import VueComp from '@vue/composition-api';
Vue.config.productionTip = false;

Vue.use(VueComp);

new Vue({
	render: h => h(App),
}).$mount('#app');

Props

Name Description
title the data table title
columns the attributes or columns
data JS array of object or json content
filter-by specify the default column for filter
per-page-values the array of per pages values
per-page the default per page
select-rows add checkbox columns in order to select rows
v-model returns the selected rows
dense Show table rows in small size
striped Apply striped style
bordered make the table bordered
header-display show/hide the table header
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].