mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
ead1002533
* chore(deps): update vite related dependency for play and docs * fix: type error * fix: unocss * chore: add port * fix: types --------- Co-authored-by: warmthsea <2586244885@qq.com>
23 lines
653 B
TypeScript
23 lines
653 B
TypeScript
import { Component, 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<
|
|
true,
|
|
string,
|
|
() => Promise<{ default: Component }>
|
|
>('./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')
|
|
})()
|