1
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createApp } from 'vue';
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
import { setupPageRunner } from './pageRunner';
|
||||
|
||||
/**
|
||||
* 将内容脚本应用挂载到页面中。
|
||||
@@ -9,17 +10,15 @@ function mountApp() {
|
||||
return;
|
||||
}
|
||||
|
||||
// 内容脚本在宿主页面中的根容器。
|
||||
// 用于避免污染业务页面结构。
|
||||
const container = document.createElement('div');
|
||||
container.id = 'dianshan-crx-root';
|
||||
// Vue 应用实际挂载的节点。
|
||||
const appRoot = document.createElement('div');
|
||||
|
||||
container.appendChild(appRoot);
|
||||
document.body.appendChild(container);
|
||||
|
||||
createApp(App).mount(appRoot);
|
||||
setupPageRunner();
|
||||
}
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
|
||||
Reference in New Issue
Block a user