mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 03:08:21 +08:00
19 lines
573 B
TypeScript
19 lines
573 B
TypeScript
import { createApp } from 'vue'
|
|
import '@element-plus/theme-chalk/src/dark/css-vars.scss'
|
|
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'
|
|
;(async () => {
|
|
const apps = import.meta.glob('./src/*.vue')
|
|
const name = location.pathname.replace(/^\//, '') || 'App'
|
|
const file = apps[`./src/${name}.vue`]
|
|
if (!file) {
|
|
location.pathname = 'App'
|
|
return
|
|
}
|
|
const App = (await file()).default
|
|
const app = createApp(App)
|
|
|
|
app.mount('#play')
|
|
})()
|