diff --git a/src/components/common/CommonAlert.vue b/src/components/common/CommonAlert.vue new file mode 100644 index 00000000..46b81112 --- /dev/null +++ b/src/components/common/CommonAlert.vue @@ -0,0 +1,70 @@ + + diff --git a/src/utils/dialog.js b/src/utils/dialog.js new file mode 100644 index 00000000..f98e4ffd --- /dev/null +++ b/src/utils/dialog.js @@ -0,0 +1,14 @@ +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 \ No newline at end of file diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index eb8e0d41..f38ad1ca 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -315,96 +315,36 @@ :pagination="false" :scroll="{ x: 'max-content' }" > -