u
This commit is contained in:
1 parent
aa813c9649
commit
62550b8182
45 files changed
+12535
-566
No files matched your search
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user