Commit eaa1ccd3 authored by 纪泽龙's avatar 纪泽龙

合并master

parent 1e8ffe27
/*
* @Author: your name
* @Date: 2021-07-17 16:35:29
* @LastEditTime: 2022-01-17 10:32:50
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-web/src/utils/createPop.js
*/
import Vue from 'vue' import Vue from 'vue'
export default function create (comp, props) { export default function create (comp, props) {
console.log("comp",comp)
const app = new Vue({ const app = new Vue({
render (h) { render (h) {
return h(comp, { props }) return h(comp, { props })
...@@ -9,6 +18,7 @@ export default function create (comp, props) { ...@@ -9,6 +18,7 @@ export default function create (comp, props) {
document.body.appendChild(app.$el) document.body.appendChild(app.$el)
// 销毁 // 销毁
const com = app.$children[0] const com = app.$children[0]
com.remove = function () { com.remove = function () {
document.body.removeChild(app.$el) document.body.removeChild(app.$el)
app.$destroy() app.$destroy()
......
...@@ -572,6 +572,8 @@ class gaodeMap { ...@@ -572,6 +572,8 @@ class gaodeMap {
map: map map: map
}); });
const html = dom.$el; const html = dom.$el;
console.log("html",html)
dom.remove(); dom.remove();
return html; return html;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment