mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 13:08:53 +03:00
chore: fix vite modals
This commit is contained in:
parent
ab6ec174cb
commit
24a473e616
2 changed files with 11 additions and 13 deletions
12
src/main.js
12
src/main.js
|
@ -12,7 +12,17 @@ import vuetify from './plugins/vuetify'
|
||||||
import i18n from './plugins/i18n'
|
import i18n from './plugins/i18n'
|
||||||
import { toast, config } from './plugins/toast'
|
import { toast, config } from './plugins/toast'
|
||||||
Vue.use(toast, config)
|
Vue.use(toast, config)
|
||||||
import './plugins/components'
|
|
||||||
|
// register modals
|
||||||
|
const components = import.meta.glob('./components/Modals/**/*.vue')
|
||||||
|
Object.entries(components).forEach(([path, definition]) => {
|
||||||
|
const componentName = path
|
||||||
|
.split('/')
|
||||||
|
.pop()
|
||||||
|
.replace(/\.\w+$/, '')
|
||||||
|
|
||||||
|
Vue.component(componentName, definition)
|
||||||
|
})
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
// register modals
|
|
||||||
const components = import.meta.glob('./components/Modals/**/*.vue')
|
|
||||||
Object.entries(components).forEach(([path, definition]) => {
|
|
||||||
const componentName = path
|
|
||||||
?.split('/')
|
|
||||||
?.pop()
|
|
||||||
?.replace(/\.\w+$/, '')
|
|
||||||
|
|
||||||
if (componentName) Vue.component(componentName, definition)
|
|
||||||
})
|
|
Loading…
Reference in a new issue