element-plus/packages/message-box/index.ts
余林夕 c2951875b3
feat(message-box): migrate MessageBox (#300)
* feat(message-box): migrate MessageBox

* refactor(message-box): import sleep from test-utils

* refactor(message-box): optimize props

* refactor(message-box): optimize message-box

* refactor(message-box): optimize message-box

* refactor(message-box): optimize message-box

* refactor(message-box): remove `removeClass` & `addClass`

* refactor(message-box): replace 'HTMLElement' with 'HTMLButtonElement'

* refactor(message-box): review optimize

* refactor(message-box): __test__ optimize

* refactor(message-box): replace addEvent with on and off

* refactor(message-box): remove doc

* feat(message-box): jest add @babel/plugin-proposal-class-properties

Co-authored-by: YuLinXi <yumengyuan@klicen.com>
2020-10-19 13:50:22 +08:00

10 lines
387 B
TypeScript

import { App } from 'vue'
import MessageBox from './src/messageBox'
export default (app: App): void => {
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
}