2024-11-08 09:38:27 +08:00
|
|
|
import { Component, createApp } from 'vue'
|
2022-06-28 16:25:52 +08:00
|
|
|
import '@element-plus/theme-chalk/src/dark/css-vars.scss'
|
2024-05-30 17:29:52 +08:00
|
|
|
import '@element-plus/theme-chalk/src/notification.scss'
|
|
|
|
import '@element-plus/theme-chalk/src/message-box.scss'
|
|
|
|
import '@element-plus/theme-chalk/src/message.scss'
|
2022-02-11 11:04:15 +08:00
|
|
|
;(async () => {
|
2024-11-08 09:38:27 +08:00
|
|
|
const apps = import.meta.glob<
|
|
|
|
true,
|
|
|
|
string,
|
|
|
|
() => Promise<{ default: Component }>
|
|
|
|
>('./src/*.vue')
|
2022-02-11 11:04:15 +08:00
|
|
|
const name = location.pathname.replace(/^\//, '') || 'App'
|
2022-02-12 00:32:03 +08:00
|
|
|
const file = apps[`./src/${name}.vue`]
|
|
|
|
if (!file) {
|
|
|
|
location.pathname = 'App'
|
|
|
|
return
|
|
|
|
}
|
|
|
|
const App = (await file()).default
|
2022-02-11 11:04:15 +08:00
|
|
|
const app = createApp(App)
|
2021-09-17 16:42:20 +08:00
|
|
|
|
2022-02-11 11:04:15 +08:00
|
|
|
app.mount('#play')
|
|
|
|
})()
|