hrms-mgt/src/main.ts

83 lines
2 KiB
TypeScript
Raw Normal View History

2023-06-01 12:54:58 +07:00
import { createApp, defineAsyncComponent } from "vue";
import App from "./App.vue";
import router from "./router";
2023-06-06 20:33:39 +07:00
import { Dialog, Notify, Quasar, Loading } from "quasar";
import "./quasar-user-options";
2024-07-23 16:33:59 +07:00
import qDraggableTable from "quasar-ui-q-draggable-table";
import "quasar-ui-q-draggable-table/dist/index.css";
2023-06-01 12:54:58 +07:00
import "quasar/src/css/index.sass";
import th from "quasar/lang/th";
import "@vuepic/vue-datepicker/dist/main.css";
import http from "./plugins/http";
import { createPinia } from "pinia";
// import './assets/main.css'
2023-06-09 11:39:54 +07:00
import filters from "./plugins/filters";
2023-06-01 12:54:58 +07:00
const app = createApp(App);
const pinia = createPinia();
// เพิ่ม Global Filters ลงใน App
app.config.globalProperties.$filters = filters;
app.use(router);
app.use(pinia);
app.use(qDraggableTable);
2023-06-01 12:54:58 +07:00
app.use(
Quasar,
{
plugins: {
Notify,
Dialog,
2023-06-06 20:33:39 +07:00
Loading,
2023-06-01 12:54:58 +07:00
}, // import Quasar plugins and add here
config: {
notify: {
/* look at QuasarConfOptions from the API card */
},
2023-06-06 20:33:39 +07:00
loading: {
/* look at QuasarConfOptions from the API card */
},
2023-06-01 12:54:58 +07:00
},
lang: th,
}
// quasarUserOptions // build ไม่ผ่านหลัง install code org&structure chart เลยต้องคอมเม้นไว้ก่อน เทสแล้วยังรันได้หลังคอมเม้น
);
//** Global Components */
app.component(
"data-table",
2023-06-09 11:39:54 +07:00
defineAsyncComponent(() => import("@/components/TableView.vue"))
2023-06-01 12:54:58 +07:00
);
app.component(
"datepicker",
defineAsyncComponent(() => import("@vuepic/vue-datepicker"))
);
app.component(
"full-loader",
2023-06-09 11:39:54 +07:00
defineAsyncComponent(() => import("@/components/FullLoader.vue"))
2023-06-01 12:54:58 +07:00
);
app.component(
"selector",
2023-06-09 11:39:54 +07:00
defineAsyncComponent(() => import("@/components/Selector.vue"))
2023-06-01 12:54:58 +07:00
);
app.component(
"d-table",
defineAsyncComponent(() => import("@/components/Table.vue"))
);
2025-09-23 17:24:54 +07:00
app.component(
"p-table",
defineAsyncComponent(() => import("@/components/TablePagination.vue"))
);
2023-06-01 12:54:58 +07:00
app.config.globalProperties.$http = http;
app.mount("#app");