chore(webui): Migrate to Quasar 2.x and Vue.js 3.x
This commit is contained in:
parent
153765f99f
commit
f7edb394f2
65 changed files with 4374 additions and 7999 deletions
|
@ -1,8 +1,8 @@
|
|||
import { APP } from '../_helpers/APP'
|
||||
import Boot from '../_middleware/Boot'
|
||||
|
||||
export default async ({ app, router, store, Vue }) => {
|
||||
Vue.use(Boot)
|
||||
export default async ({ app, router, store }) => {
|
||||
app.use(Boot)
|
||||
|
||||
APP.root = app
|
||||
APP.router = router
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
import { APP } from '../_helpers/APP'
|
||||
import errors from '../_helpers/Errors'
|
||||
import resize from '../_directives/resize'
|
||||
|
||||
export default async ({ app, router }) => {
|
||||
// Directives
|
||||
app.directive('resize', resize)
|
||||
|
||||
export default async ({ Vue }) => {
|
||||
// Router
|
||||
// ----------------------------------------------
|
||||
APP.router.beforeEach(async (to, from, next) => {
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
// Set APP
|
||||
APP.routeTo = to
|
||||
APP.routeFrom = from
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
import { boot } from 'quasar/wrappers'
|
||||
import axios from 'axios'
|
||||
|
||||
import { APP } from '../_helpers/APP'
|
||||
|
||||
// Set config defaults when creating the instance
|
||||
const API = axios.create({
|
||||
const api = axios.create({
|
||||
baseURL: APP.config.apiUrl
|
||||
})
|
||||
|
||||
export default async ({ app, Vue }) => {
|
||||
Vue.prototype.$api = app.api = APP.api = API
|
||||
}
|
||||
export default boot(({ app }) => {
|
||||
app.config.globalProperties.$axios = axios
|
||||
app.config.globalProperties.$api = api
|
||||
APP.api = api
|
||||
})
|
||||
|
||||
export { api }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue