This commit is contained in:
zhu
2026-05-06 10:22:38 +08:00
parent 350d4fc2e2
commit 53e4f0b2f4
10 changed files with 256 additions and 183 deletions

View File

@@ -1,16 +1,19 @@
import { createApp } from 'vue';
import { createApp } from 'vue';
import App from './App.vue';
/** 将内容脚本应用挂载到页面中。 */
/**
* 将内容脚本应用挂载到页面中。
*/
function mountApp() {
if (document.getElementById('dianshan-crx-root')) {
return;
}
/** 内容脚本在宿主页面中的根容器,用于避免污染业务页面结构。 */
// 内容脚本在宿主页面中的根容器
// 用于避免污染业务页面结构。
const container = document.createElement('div');
container.id = 'dianshan-crx-root';
/** Vue 应用实际挂载的节点。 */
// Vue 应用实际挂载的节点。
const appRoot = document.createElement('div');
container.appendChild(appRoot);