2020-10-19 13:50:22 +08:00
|
|
|
import MessageBox from './src/messageBox'
|
2021-08-24 13:36:48 +08:00
|
|
|
|
|
|
|
import type { App } from 'vue'
|
2022-02-11 11:03:15 +08:00
|
|
|
import type { SFCWithInstall } from '@element-plus/utils'
|
2020-10-29 17:28:26 +08:00
|
|
|
|
2021-08-24 13:36:48 +08:00
|
|
|
const _MessageBox = MessageBox as SFCWithInstall<typeof MessageBox>
|
2021-03-09 21:24:22 +08:00
|
|
|
|
2021-08-24 13:36:48 +08:00
|
|
|
_MessageBox.install = (app: App) => {
|
2021-03-09 21:24:22 +08:00
|
|
|
app.config.globalProperties.$msgbox = _MessageBox
|
|
|
|
app.config.globalProperties.$messageBox = _MessageBox
|
|
|
|
app.config.globalProperties.$alert = _MessageBox.alert
|
|
|
|
app.config.globalProperties.$confirm = _MessageBox.confirm
|
|
|
|
app.config.globalProperties.$prompt = _MessageBox.prompt
|
2020-10-19 13:50:22 +08:00
|
|
|
}
|
2020-10-29 17:28:26 +08:00
|
|
|
|
2021-03-09 21:24:22 +08:00
|
|
|
export default _MessageBox
|
2021-08-24 13:36:48 +08:00
|
|
|
export const ElMessageBox = _MessageBox
|
|
|
|
|
|
|
|
export * from './src/message-box.type'
|