index.js 740 B

12345678910111213141516171819202122232425
  1. import VxeTable from './src/table'
  2. import VxeTableBody from './src/body'
  3. import VXETable from '../v-x-e-table'
  4. export const Table = Object.assign(VxeTable, {
  5. install (Vue) {
  6. if (typeof window !== 'undefined' && window.VXETableMixin) {
  7. VxeTable.mixins.push(window.VXETableMixin)
  8. delete window.VXETableMixin
  9. }
  10. VXETable.Vue = Vue
  11. VXETable.Table = VxeTable
  12. VXETable.TableComponent = VxeTable
  13. if (!Vue.prototype.$vxe) {
  14. Vue.prototype.$vxe = { t: VXETable.t, _t: VXETable._t }
  15. } else {
  16. Vue.prototype.$vxe.t = VXETable.t
  17. Vue.prototype.$vxe._t = VXETable._t
  18. }
  19. Vue.component(VxeTable.name, VxeTable)
  20. Vue.component(VxeTableBody.name, VxeTableBody)
  21. }
  22. })
  23. export default Table