mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
731 B
33 lines
731 B
import { createApp } from 'vue'
|
|
import App from './App.vue'
|
|
import router from '/@/router/index'
|
|
import { pinia } from '/@/store'
|
|
import { useLayoutStore } from '/@/store/modules/layout'
|
|
import '/@/permission'
|
|
|
|
import '/@/assets/css/index.css'
|
|
import 'virtual:svg-icons-register'
|
|
|
|
const app = createApp(App)
|
|
app.use(router)
|
|
app.use(pinia)
|
|
app.mount('#app')
|
|
|
|
|
|
window.onunhandledrejection = (ev: PromiseRejectionEvent) => {
|
|
showAlert(ev.reason.stack || ev.reason.message)
|
|
|
|
}
|
|
window.onerror = err => {
|
|
if (typeof err === "string") {
|
|
return showAlert(err)
|
|
}
|
|
showAlert(JSON.stringify(err))
|
|
}
|
|
|
|
function showAlert(msg: string) {
|
|
let layout = useLayoutStore()
|
|
if (!layout.globalError) {
|
|
layout.setGlobalError(msg)
|
|
}
|
|
}
|