This commit is contained in:
lijing
2026-08-12 17:19:37 +08:00
commit e73d22744e
131 changed files with 66997 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import Vue from "vue";
import confirm from "./confirm.vue";
export default props => {
// 创建实例
const vm = new Vue({
render(h) {
// h为createElement,返回VNode虚拟Node
return h(confirm, { props });
}
}).$mount();
// 手动挂载实例到body
document.body.appendChild(vm.$el);
const comp = vm.$children[0];
// 销毁方法
// comp.remove = function() {
// document.body.removeChild(vm.$el);
// vm.$destroy();
// };
// 返回组件
return comp;
};