Files
workspace/code/container-ocr/ocr-vue/src/components/g3-detail/index.js
T
2026-03-22 21:49:28 +08:00

25 lines
480 B
JavaScript

import G3Detail from "./index.vue";
export function showDetailDrawer(props) {
// 1. 创建容器
const container = document.createElement("div");
document.body.appendChild(container);
// 2. 创建 app
const app = createApp({
render() {
return h(G3Detail, {
...props,
// 关闭时销毁
onClose: () => {
app.unmount();
container.remove();
},
});
},
});
// 3. 挂载
app.mount(container);
}