Files
fe-manage/src/utils/dialog.js
2023-02-24 19:19:56 +08:00

14 lines
445 B
JavaScript

import { createApp } from 'vue'
import CommonAlert from "@/components/common/CommonAlert";
import Antd from "ant-design-vue";
function mountContent (option = {}) {
const dom = document.createElement('div')
document.body.appendChild(dom)
const app = createApp(CommonAlert, {
close: () => { app.unmount(dom); document.body.removeChild(dom) },
...option
})
app.use(Antd).mount(dom)
}
export default mountContent