From 964197353b5b00f208006800e4036799971bf8b4 Mon Sep 17 00:00:00 2001 From: Nicolas Vargas Ortega Date: Sun, 25 Apr 2021 18:57:13 +0200 Subject: [PATCH] Add primevue datatable --- kemenu-admin-frontend/package.json | 2 + .../src/customers/CustomersView.vue | 44 +++++++++++++------ kemenu-admin-frontend/src/main.ts | 19 +++++++- 3 files changed, 50 insertions(+), 15 deletions(-) diff --git a/kemenu-admin-frontend/package.json b/kemenu-admin-frontend/package.json index 4d9ed30..6c8f902 100644 --- a/kemenu-admin-frontend/package.json +++ b/kemenu-admin-frontend/package.json @@ -12,6 +12,8 @@ "bootstrap": "^5.0.0-0", "core-js": "^3.6.5", "jwt-decode": "^3.1.2", + "primevue": "^3.4.0", + "primeicons": "^4.1.0", "vue": "^3.0.11", "vue-router": "^4.0.6", "vuex": "^4.0.0" diff --git a/kemenu-admin-frontend/src/customers/CustomersView.vue b/kemenu-admin-frontend/src/customers/CustomersView.vue index ec2b538..e161ad4 100644 --- a/kemenu-admin-frontend/src/customers/CustomersView.vue +++ b/kemenu-admin-frontend/src/customers/CustomersView.vue @@ -1,32 +1,50 @@ diff --git a/kemenu-admin-frontend/src/main.ts b/kemenu-admin-frontend/src/main.ts index 9bdd6b1..db5fb4c 100644 --- a/kemenu-admin-frontend/src/main.ts +++ b/kemenu-admin-frontend/src/main.ts @@ -2,7 +2,15 @@ import {createApp} from 'vue'; import App from './App.vue'; import router from './router'; import store from './store'; +import PrimeVue from 'primevue/config'; +import DataTable from 'primevue/datatable'; +import Column from 'primevue/column'; +import Button from 'primevue/button'; +import InputText from 'primevue/inputtext'; import 'bootstrap/dist/css/bootstrap.min.css'; +import 'primevue/resources/themes/saga-blue/theme.css'; +import 'primevue/resources/primevue.min.css'; +import 'primeicons/primeicons.css'; router.beforeEach((to, from, next) => { if (to.matched.some(record => record.meta.requiresAuth)) { @@ -19,7 +27,14 @@ router.beforeEach((to, from, next) => { } }); -createApp(App) +const app = createApp(App) .use(store) .use(router) - .mount('#app'); + .use(PrimeVue); + +app.component('DataTable', DataTable); +app.component('Column', Column); +app.component('Button', Button); +app.component('InputText', InputText); + +app.mount('#app');