ratiw / vuetable-2-tutorial

MIT License
258 stars 67 forks source link

Feedback: using with laravel-mix #102

Open eduardoarandah opened 6 years ago

eduardoarandah commented 6 years ago

Some feedback:

Importing dependencies

I got stuck at importing from laravel-mix, this imports didn't work

import Vuetable from 'vuetable-2/src/components/Vuetable'
import VuetablePagination from 'vuetable-2/src/components/VuetablePagination'

this worked:

<script>
import Vuetable from 'vuetable-2'
import {
  VuetablePagination,
  VuetablePaginationInfo
} from "vuetable-2"

export default {
  components: {
    Vuetable,
    VuetablePagination,
    VuetablePaginationInfo
  },

Dependencies

If you are using laravel defaults, you might not need to import jquery or semantic ui

Bootstrap

this css worked for me:

Properties

<vuetable :css="css.table">
</vuetable>

<vuetable-pagination :css="css.pagination">
</vuetable-pagination>

in data:

css: {
  table: {
    tableClass: 'table bg-white table-striped shadow-custom',
    loadingClass: 'loading',
    ascendingIcon: 'fa fa-chevron-up',
    descendingIcon: 'fa fa-chevron-down',
    handleIcon: 'fa fa-bars',
  },
  pagination: {
    infoClass: 'pull-left',
    wrapperClass: ' pull-right pagination',
    activeClass: 'active',
    disabledClass: 'disabled',
    pageClass: 'page-link',
    linkClass: 'page-link',
    icons: {
      first: '',
      prev: '',
      next: '',
      last: '',
    },
  }
}