ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 302 forks source link

Pass vuetable data to Vuex? #69

Open jackbbhua opened 8 years ago

jackbbhua commented 8 years ago

this is my code:

  export default {
      props: ['Appconfig'],
      vuex: {
        actions: {
          increment: actions.create
        },
        getters: {
          findById: findById
        }
      },
        // before is vuex container
      component: {
        'vuetable': vuetable,
        'bootstrap': bootstrap
      },
      data () {
        return {
          searchFor: '',
          fields: tableColumns,
          sortOrder: {
            field: 'name',
            direction: 'asc'
          },
          selectedRow: [],
          perPage: 10,
          paginationComponent: 'vuetable-pagination',
          paginationInfoTemplate: 'แสดง {from} ถึง {to} จากทั้งหมด {total} รายการ',
          itemActions: [

i have no idea to pass data like

searchFor: '',
          fields: tableColumns,
          sortOrder: {
            field: 'name',
            direction: 'asc'
          },
          selectedRow: [],
          perPage: 10,

to Vuex.Please help. thank you.

ratiw commented 8 years ago

@jackbbhua That makes the two of us! Really sorry, can't really help on that as I'm not using Vuex myself.